- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions

# QSqlQueryModel Class Reference

Search for all occurrences

## Detailed Description

Definition at line 59 of file qsqlquerymodel.h.

`#include <qsqlquerymodel.h>`

Inheritance diagram for QSqlQueryModel:
[legend]

List of all members.

## Public Member Functions
| QSqlQueryModel (QObject *parent=0)
virtual | ~QSqlQueryModel ()
int | rowCount (const QModelIndex &parent=QModelIndex()) const
int | columnCount (const QModelIndex &parent=QModelIndex()) const
QSqlRecord | record (int row) const
QSqlRecord | record () const
QVariant | data (const QModelIndex &item, int role=Qt::DisplayRole) const
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
bool | setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role=Qt::EditRole)
bool | insertColumns (int column, int count, const QModelIndex &parent=QModelIndex())
bool | removeColumns (int column, int count, const QModelIndex &parent=QModelIndex())
void | setQuery (const QSqlQuery &query)
void | setQuery (const QString &query, const QSqlDatabase &db=QSqlDatabase())
QSqlQuery | query () const
virtual void | clear ()
QSqlError | lastError () const
void | fetchMore (const QModelIndex &parent=QModelIndex())
bool | canFetchMore (const QModelIndex &parent=QModelIndex()) const
## Protected Member Functions
virtual void | queryChange ()
QModelIndex | indexInQuery (const QModelIndex &item) const
void | setLastError (const QSqlError &error)
| QSqlQueryModel (QSqlQueryModelPrivate &dd, QObject *parent=0)

## Constructor & Destructor Documentation

QSqlQueryModel | ( | QObject * | parent = `0` | ) | `[explicit]`

virtual ~QSqlQueryModel | ( |  | ) | `[virtual]`

QSqlQueryModel | ( | QSqlQueryModelPrivate & | dd,
|  | QObject * | parent = `0`
| ) |  | `[protected]`

## Member Function Documentation

int rowCount | ( | const QModelIndex & | parent = `QModelIndex()` | ) | const `[virtual]`

Search for all occurrences

Implements QAbstractItemModel.

Reimplemented in QSqlTableModel.

int columnCount | ( | const QModelIndex & | parent = `QModelIndex()` | ) | const `[virtual]`

Search for all occurrences

Implements QAbstractItemModel.

QSqlRecord record | ( | int | row | ) | const

Search for all occurrences

QSqlRecord record | ( |  | ) | const

Search for all occurrences

QVariant data | ( | const QModelIndex & | item,
|  | int | role = `Qt::DisplayRole`
| ) |  | const `[virtual]`

Search for all occurrences

Implements QAbstractItemModel.

Reimplemented in QSqlRelationalTableModel, and QSqlTableModel.

QVariant headerData | ( | int | section,
|  | Qt::Orientation | orientation,
|  | int | role = `Qt::DisplayRole`
| ) |  | const `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

Reimplemented in QSqlTableModel.

bool setHeaderData | ( | int | section,
|  | Qt::Orientation | orientation,
|  | const QVariant & | value,
|  | int | role = `Qt::EditRole`
| ) |  | `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

bool insertColumns | ( | int | column,
|  | int | count,
|  | const QModelIndex & | parent = `QModelIndex()`
| ) |  | `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

bool removeColumns | ( | int | column,
|  | int | count,
|  | const QModelIndex & | parent = `QModelIndex()`
| ) |  | `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

Reimplemented in QSqlRelationalTableModel, and QSqlTableModel.

void setQuery | ( | const QSqlQuery & | query | ) |

Search for all occurrences

Reimplemented in QSqlTableModel.

void setQuery | ( | const QString & | query,
|  | const QSqlDatabase & | db = `QSqlDatabase()`
| ) |  |

Search for all occurrences

QSqlQuery query | ( |  | ) | const

Search for all occurrences

virtual void clear | ( |  | ) | `[virtual]`

Search for all occurrences

Reimplemented in QSqlRelationalTableModel, and QSqlTableModel.

QSqlError lastError | ( |  | ) | const

Search for all occurrences

void fetchMore | ( | const QModelIndex & | parent = `QModelIndex()` | ) | `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

bool canFetchMore | ( | const QModelIndex & | parent = `QModelIndex()` | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

virtual void queryChange | ( |  | ) | `[protected, virtual]`

Search for all occurrences

QModelIndex indexInQuery | ( | const QModelIndex & | item | ) | const `[protected]`

Search for all occurrences

Reimplemented in QSqlTableModel.

void setLastError | ( | const QSqlError & | error | ) | `[protected]`

Search for all occurrences

The documentation for this class was generated from the following file:

- QtSql/qsqlquerymodel.h

QSqlQueryModel QSqlQueryModel QSqlQueryModel QSqlQueryModel QSqlQueryModel QSqlQueryModel QSqlQueryModel QSqlQueryModel QSqlQueryModel QSqlQueryModel
QSqlQueryModel QSqlQueryModel QSqlQueryModel QSqlQueryModel QSqlQueryModel QSqlQueryModel QSqlQueryModel QSqlQueryModel QSqlQueryModel QSqlQueryModel