Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
sqldatabase.cpp File Reference

(e04af5b9ea60f17787e4cf81cfe1b79a69be3406)

#include <QCoreApplication>
#include <QtSql>
#include <iostream>
+ Include dependency graph for sqldatabase.cpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  MyModel
 
class  XyzResult
 [47] More...
 
class  XyzDriver
 [47] More...
 

Functions

void QSqlDatabase_snippets ()
 
void QSqlField_snippets ()
 
void doSomething (const QString &)
 
void QSqlQuery_snippets ()
 
void QSqlQueryModel_snippets ()
 
void QSqlTableModel_snippets ()
 [23]
 
void sql_intro_snippets ()
 
int main (int argc, char **argv)
 [48]
 

Function Documentation

◆ doSomething()

void doSomething ( const QString & )

Definition at line 60 of file sqldatabase.cpp.

◆ main()

int main ( int argc,
char ** argv )

[48]

[0]

[0]

[0]

[1]

[1]

[2]

[2]

[3]

[3]

[0]

[0]

[1]

[1]

[0]

[0]

[0]

[0]

Definition at line 465 of file sqldatabase.cpp.

References app, QSqlDatabase_snippets(), QSqlField_snippets(), QSqlQuery_snippets(), QSqlQueryModel_snippets(), and QSqlTableModel_snippets().

+ Here is the call graph for this function:

◆ QSqlDatabase_snippets()

void QSqlDatabase_snippets ( )

[0]

[0]

[1]

[1]

Definition at line 10 of file sqldatabase.cpp.

References QSqlDatabase::addDatabase(), QSqlDatabase::database(), db, ok, and Q_UNUSED.

Referenced by main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ QSqlField_snippets()

void QSqlField_snippets ( )

[3]

[3]

[4]

[4] //! [5]

[5] //! [6]

[6]

Definition at line 31 of file sqldatabase.cpp.

References record(), and QSqlField::setValue().

Referenced by main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ QSqlQuery_snippets()

void QSqlQuery_snippets ( )

[7]

[7]

[8]

[8]

[9]

[9]

[10]

[10]

[11]

[11]

[12]

[12]

[13]

[13]

[14]

[14]

Definition at line 64 of file sqldatabase.cpp.

References QList< T >::at(), doSomething(), i, list, QSql::Out, QSqlQuery::prepare(), Q_UNUSED, qDebug, and QList< T >::size().

Referenced by main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ QSqlQueryModel_snippets()

void QSqlQueryModel_snippets ( )

[21]

[21]

[22]

[22]

Definition at line 166 of file sqldatabase.cpp.

References QSqlQueryModel::columnCount(), QSqlQueryModel::data(), QAbstractTableModel::index(), model, Q_UNUSED, qDebug, QSqlQueryModel::record(), QSqlQueryModel::rowCount(), salary, QSqlQueryModel::setQuery(), QVariant::toInt(), and QSqlRecord::value().

Referenced by main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ QSqlTableModel_snippets()

void QSqlTableModel_snippets ( )

[23]

[25]

[25]

Definition at line 209 of file sqldatabase.cpp.

References model, Q_UNUSED, QSqlQueryModel::record(), salary, QVariant::toInt(), and QSqlRecord::value().

Referenced by main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sql_intro_snippets()

void sql_intro_snippets ( )

[26]

[26]

[27]

[27]

[28]

[28] //! [29]

[29] //! [30]

[30]

[31]

[31]

[32]

[32]

[33]

[33]

[34]

[34]

[35]

[35]

[36]

[36]

[37]

[37]

[38]

[38]

[39]

[39]

[40]

[40]

[41]

[41]

[42]

[42]

[43]

[43]

[44]

[44]

[45]

[45] //! [46]

[46]

Definition at line 222 of file sqldatabase.cpp.

References QSqlDatabase::addDatabase(), QSqlDatabase::database(), db, Qt::DescendingOrder, QSqlQuery::exec(), i, QAbstractTableModel::index(), model, QString::number(), ok, QSqlQuery::prepare(), Q_UNUSED, qDebug, QSqlDriver::QuerySize, record(), QSqlQueryModel::record(), QSqlQueryModel::rowCount(), salary, QAbstractItemModel::setData(), QSqlQueryModel::setQuery(), QVariant::toInt(), QString::toInt(), QVariant::toString(), and QSqlRecord::value().

+ Here is the call graph for this function: