# QSqlTableModel Class Reference

### [com.trolltech.qt.sql package]

Inherits QSqlQueryModel.

### Constructor

- void QSqlTableModel(QObject parent, QSqlDatabase db)

### Constructor Properties

- prototype: The QSqlTableModel prototype object
- OnFieldChange
- OnRowChange
- OnManualSubmit
- EditStrategy( value )

### Prototype Object Properties

The QSqlTableModel prototype object inherits properties from the QSqlQueryModel prototype object and also has the following properties.

- QSqlDatabase database()
- EditStrategy editStrategy()
- int fieldIndex(String fieldName)
- String filter()
- bool insertRecord(int row, QSqlRecord record)
- bool isDirty(QModelIndex index)
- QSqlIndex primaryKey()
- void revertRow(int row)
- bool select()
- void setEditStrategy(EditStrategy strategy)
- void setFilter(String filter)
- bool setRecord(int row, QSqlRecord record)
- void setSort(int column, SortOrder order)
- void setTable(String tableName)
- String tableName()

### Instance Properties

QSqlTableModel objects have no special properties beyond those inherited from the QSqlTableModel prototype object.