<class name="QSqlTableModel" doc="/**
&lt;p&gt;The &lt;a href=&quot;QSqlTableModel.html#QSqlTableModel(com.trolltech.qt.core.QObject, com.trolltech.qt.sql.QSqlDatabase)&quot;&gt;&lt;tt&gt;QSqlTableModel&lt;/tt&gt;&lt;/a&gt; class provides an editable data model for a single database table.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QSqlTableModel.html#QSqlTableModel(com.trolltech.qt.core.QObject, com.trolltech.qt.sql.QSqlDatabase)&quot;&gt;&lt;tt&gt;QSqlTableModel&lt;/tt&gt;&lt;/a&gt; is a high-level interface for reading and writing database records from a single table. It is build on top of the lower-level &lt;a href=&quot;QSqlQuery.html&quot;&gt;&lt;tt&gt;QSqlQuery&lt;/tt&gt;&lt;/a&gt; and can be used to provide data to view classes such as &lt;a href=&quot;%2E%2E/gui/QTableView.html&quot;&gt;&lt;tt&gt;QTableView&lt;/tt&gt;&lt;/a&gt;. For example:&lt;/p&gt;
&lt;pre&gt;        QSqlTableModel *model = new QSqlTableModel;
        model-&amp;gt;setTable(&amp;quot;employee&amp;quot;);
        model-&amp;gt;setEditStrategy(QSqlTableModel::OnManualSubmit);
        model-&amp;gt;select();
        model-&amp;gt;removeColumn(0); &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; don't show the ID
        model-&amp;gt;setHeaderData(0, Qt::Horizontal, tr(&amp;quot;Name&amp;quot;));
        model-&amp;gt;setHeaderData(1, Qt::Horizontal, tr(&amp;quot;Salary&amp;quot;));

        QTableView *view = new QTableView;
        view-&amp;gt;setModel(model);
        view-&amp;gt;show();&lt;/pre&gt;
&lt;p&gt;We set the SQL table's name and the edit strategy, then we set up the labels displayed in the view header. The edit strategy dictates when the changes done by the user in the view are actually applied to the database. The possible values are &lt;a href=&quot;QSqlTableModel.html#EditStrategy-enum&quot;&gt;&lt;tt&gt;OnFieldChange&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QSqlTableModel.html#EditStrategy-enum&quot;&gt;&lt;tt&gt;OnRowChange&lt;/tt&gt;&lt;/a&gt;, and &lt;a href=&quot;QSqlTableModel.html#EditStrategy-enum&quot;&gt;&lt;tt&gt;OnManualSubmit&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QSqlTableModel.html#QSqlTableModel(com.trolltech.qt.core.QObject, com.trolltech.qt.sql.QSqlDatabase)&quot;&gt;&lt;tt&gt;QSqlTableModel&lt;/tt&gt;&lt;/a&gt; can also be used to access a database programmatically, without binding it to a view:&lt;/p&gt;
&lt;pre&gt;        QSqlTableModel model;
        model.setTable(&amp;quot;employee&amp;quot;);
        QString name = model.record(4).value(&amp;quot;name&amp;quot;).toString();&lt;/pre&gt;
&lt;p&gt;The code snippet above extracts the &lt;tt&gt;salary&lt;/tt&gt; field from record 4 in the result set of the query &lt;tt&gt;SELECT * from employee&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;It is possible to set filters using &lt;a href=&quot;QSqlTableModel.html#setFilter(java.lang.String)&quot;&gt;&lt;tt&gt;setFilter&lt;/tt&gt;&lt;/a&gt;, or modify the sort order using &lt;a href=&quot;QSqlTableModel.html#setSort(int, com.trolltech.qt.core.Qt.SortOrder)&quot;&gt;&lt;tt&gt;setSort&lt;/tt&gt;&lt;/a&gt;. At the end, you must call &lt;a href=&quot;QSqlTableModel.html#select()&quot;&gt;&lt;tt&gt;select&lt;/tt&gt;&lt;/a&gt; to populate the model with data.&lt;/p&gt;
&lt;p&gt;The sql/tablemodel&lt;/tt&gt; example illustrates how to use &lt;a href=&quot;QSqlTableModel.html#QSqlTableModel(com.trolltech.qt.core.QObject, com.trolltech.qt.sql.QSqlDatabase)&quot;&gt;&lt;tt&gt;QSqlTableModel&lt;/tt&gt;&lt;/a&gt; as the data source for a &lt;a href=&quot;%2E%2E/gui/QTableView.html&quot;&gt;&lt;tt&gt;QTableView&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QSqlTableModel.html#QSqlTableModel(com.trolltech.qt.core.QObject, com.trolltech.qt.sql.QSqlDatabase)&quot;&gt;&lt;tt&gt;QSqlTableModel&lt;/tt&gt;&lt;/a&gt; provides no direct support for foreign keys. Use the &lt;a href=&quot;QSqlRelationalTableModel.html&quot;&gt;&lt;tt&gt;QSqlRelationalTableModel&lt;/tt&gt;&lt;/a&gt; and QSqlRelationalDelegate if you want to resolve foreign keys.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;%2E%2E/sql-driver.html#qsqlite&quot;&gt;QSQLITE&lt;/tt&gt;&lt;/a&gt; driver locks for updates until a select is finished. &lt;a href=&quot;QSqlTableModel.html#QSqlTableModel(com.trolltech.qt.core.QObject, com.trolltech.qt.sql.QSqlDatabase)&quot;&gt;&lt;tt&gt;QSqlTableModel&lt;/tt&gt;&lt;/a&gt; fetches data (QSqlQuery::fetchMore()) as needed; this may cause the updates to time out.&lt;/p&gt;

@see &lt;a href=&quot;QSqlRelationalTableModel.html&quot;&gt;&lt;tt&gt;QSqlRelationalTableModel&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlQuery.html&quot;&gt;&lt;tt&gt;QSqlQuery&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;%2E%2E/model-view-programming.html&quot;&gt;Model/View Programming&lt;/tt&gt;&lt;/a&gt;
@see Table Model Example&lt;/tt&gt;
@see &lt;a href=&quot;%2E%2E/qtjambi-cachedtable.html&quot;&gt;Cached Table Example&lt;/tt&gt;&lt;/a&gt; */">
    <signal name="protected final void beforeDelete(int row)" doc="/**
&lt;p&gt;This signal is emitted before the &lt;tt&gt;row&lt;/tt&gt; is deleted.&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;Compatible Slot Signatures:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot(int row)&lt;/tt&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot()&lt;/tt&gt;&lt;/dd&gt;
&lt;/dl&gt;
 */"/>
    <signal name="protected final void beforeInsert(com.trolltech.qt.sql.QSqlRecord record)" doc="/**
&lt;p&gt;This signal is emitted before a new row is inserted. The values that are about to be inserted are stored in &lt;tt&gt;record&lt;/tt&gt; and can be modified before they will be inserted.&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;Compatible Slot Signatures:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot(com.trolltech.qt.sql.QSqlRecord record)&lt;/tt&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot()&lt;/tt&gt;&lt;/dd&gt;
&lt;/dl&gt;
 */"/>
    <signal name="protected final void beforeUpdate(int row, com.trolltech.qt.sql.QSqlRecord record)" doc="/**
&lt;p&gt;This signal is emitted before the &lt;tt&gt;row&lt;/tt&gt; is updated with the values from &lt;tt&gt;record&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;Note that only values that are marked as generated will be updated. The generated flag can be set with &lt;tt&gt;QSqlRecord::setGenerated&lt;/tt&gt; and checked with &lt;tt&gt;QSqlRecord::isGenerated&lt;/tt&gt;.&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;Compatible Slot Signatures:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot(int row, com.trolltech.qt.sql.QSqlRecord record)&lt;/tt&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot(int row)&lt;/tt&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot()&lt;/tt&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;See Also:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;tt&gt;QSqlRecord::isGenerated&lt;/tt&gt;&lt;/dd&gt;
&lt;/dl&gt;
 */"/>
    <signal name="protected final void dataChanged(com.trolltech.qt.core.QModelIndex topLeft, com.trolltech.qt.core.QModelIndex bottomRight)" doc="/**
&lt;p&gt;This signal is emitted whenever the data in an existing item changes. The affected items are those between &lt;tt&gt;topLeft&lt;/tt&gt; and &lt;tt&gt;bottomRight&lt;/tt&gt; inclusive (of the same parent).&lt;/p&gt;
&lt;p&gt;Note that this signal must be emitted explicitly when reimplementing the &lt;a href=&quot;QSqlTableModel.html#setData(com.trolltech.qt.core.QModelIndex, java.lang.Object, int)&quot;&gt;&lt;tt&gt;setData&lt;/tt&gt;&lt;/a&gt; function.&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;Compatible Slot Signatures:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot(com.trolltech.qt.core.QModelIndex topLeft, com.trolltech.qt.core.QModelIndex bottomRight)&lt;/tt&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot(com.trolltech.qt.core.QModelIndex topLeft)&lt;/tt&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot()&lt;/tt&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;See Also:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;a href=&quot;QSqlTableModel.html#headerDataChanged(com.trolltech.qt.core.Qt.Orientation, int, int)&quot;&gt;&lt;tt&gt;headerDataChanged&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QSqlTableModel.html#setData(com.trolltech.qt.core.QModelIndex, java.lang.Object, int)&quot;&gt;&lt;tt&gt;setData&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QSqlTableModel.html#layoutChanged()&quot;&gt;&lt;tt&gt;layoutChanged&lt;/tt&gt;&lt;/a&gt;&lt;/dd&gt;
&lt;/dl&gt;
 */"/>
    <signal name="protected final void headerDataChanged(com.trolltech.qt.core.Qt.Orientation orientation, int first, int last)" doc="/**
&lt;p&gt;This signal is emitted whenever a header is changed. The &lt;tt&gt;orientation&lt;/tt&gt; indicates whether the horizontal or vertical header has changed. The sections in the header from the &lt;tt&gt;first&lt;/tt&gt; to the &lt;tt&gt;last&lt;/tt&gt; need to be updated.&lt;/p&gt;
&lt;p&gt;Note that this signal must be emitted explicitly when reimplementing the &lt;a href=&quot;QSqlQueryModel.html#setHeaderData(int, com.trolltech.qt.core.Qt.Orientation, java.lang.Object, int)&quot;&gt;&lt;tt&gt;setHeaderData&lt;/tt&gt;&lt;/a&gt; function.&lt;/p&gt;
&lt;p&gt;If you are changing the number of columns or rows you don't need to emit this signal, but use the begin/end functions.&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;Compatible Slot Signatures:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot(com.trolltech.qt.core.Qt.Orientation orientation, int first, int last)&lt;/tt&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot(com.trolltech.qt.core.Qt.Orientation orientation, int first)&lt;/tt&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot(com.trolltech.qt.core.Qt.Orientation orientation)&lt;/tt&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot()&lt;/tt&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;See Also:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;a href=&quot;QSqlTableModel.html#headerData(int, com.trolltech.qt.core.Qt.Orientation, int)&quot;&gt;&lt;tt&gt;headerData&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QSqlQueryModel.html#setHeaderData(int, com.trolltech.qt.core.Qt.Orientation, java.lang.Object, int)&quot;&gt;&lt;tt&gt;setHeaderData&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QSqlTableModel.html#dataChanged(com.trolltech.qt.core.QModelIndex, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;dataChanged&lt;/tt&gt;&lt;/a&gt;&lt;/dd&gt;
&lt;/dl&gt;
 */"/>
    <signal name="protected final void layoutAboutToBeChanged()" doc="/**
&lt;p&gt;This signal is emitted just before the layout of a model is changed. Components connected to this signal use it to adapt to changes in the model's layout.&lt;/p&gt;
&lt;p&gt;Subclasses should update any persistent model indexes after emitting &lt;a href=&quot;QSqlTableModel.html#layoutAboutToBeChanged()&quot;&gt;&lt;tt&gt;layoutAboutToBeChanged&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;Compatible Slot Signature:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot()&lt;/tt&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;See Also:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;a href=&quot;QSqlTableModel.html#layoutChanged()&quot;&gt;&lt;tt&gt;layoutChanged&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;%2E%2E/core/%2E%2E/core/QAbstractItemModel.html#changePersistentIndex(com.trolltech.qt.core.QModelIndex, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;changePersistentIndex&lt;/tt&gt;&lt;/a&gt;&lt;/dd&gt;
&lt;/dl&gt;
 */"/>
    <signal name="protected final void layoutChanged()" doc="/**
&lt;p&gt;This signal is emitted whenever the layout of items exposed by the model has changed; for example, when the model has been sorted. When this signal is received by a view, it should update the layout of items to reflect this change.&lt;/p&gt;
&lt;p&gt;When subclassing &lt;a href=&quot;%2E%2E/core/%2E%2E/core/QAbstractItemModel.html#QAbstractItemModel(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QAbstractItemModel&lt;/tt&gt;&lt;/a&gt; or &lt;a href=&quot;%2E%2E/gui/QAbstractProxyModel.html&quot;&gt;&lt;tt&gt;QAbstractProxyModel&lt;/tt&gt;&lt;/a&gt;, ensure that you emit &lt;a href=&quot;QSqlTableModel.html#layoutAboutToBeChanged()&quot;&gt;&lt;tt&gt;layoutAboutToBeChanged&lt;/tt&gt;&lt;/a&gt; before changing the order of items or altering the structure of the data you expose to views, and emit &lt;a href=&quot;QSqlTableModel.html#layoutChanged()&quot;&gt;&lt;tt&gt;layoutChanged&lt;/tt&gt;&lt;/a&gt; after changing the layout.&lt;/p&gt;
&lt;p&gt;Subclasses should update any persistent model indexes before emitting &lt;a href=&quot;QSqlTableModel.html#layoutChanged()&quot;&gt;&lt;tt&gt;layoutChanged&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;Compatible Slot Signature:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot()&lt;/tt&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;See Also:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;a href=&quot;QSqlTableModel.html#layoutAboutToBeChanged()&quot;&gt;&lt;tt&gt;layoutAboutToBeChanged&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QSqlTableModel.html#dataChanged(com.trolltech.qt.core.QModelIndex, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;dataChanged&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QSqlTableModel.html#headerDataChanged(com.trolltech.qt.core.Qt.Orientation, int, int)&quot;&gt;&lt;tt&gt;headerDataChanged&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;%2E%2E/core/%2E%2E/core/QAbstractItemModel.html#reset()&quot;&gt;&lt;tt&gt;reset&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;%2E%2E/core/%2E%2E/core/QAbstractItemModel.html#changePersistentIndex(com.trolltech.qt.core.QModelIndex, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;changePersistentIndex&lt;/tt&gt;&lt;/a&gt;&lt;/dd&gt;
&lt;/dl&gt;
 */"/>
    <signal name="protected final void primeInsert(int row, com.trolltech.qt.sql.QSqlRecord record)" doc="/**
&lt;p&gt;This signal is emitted when an insertion is initiated in the given &lt;tt&gt;row&lt;/tt&gt;. The &lt;tt&gt;record&lt;/tt&gt; parameter can be written to (since it is a reference), for example to populate some fields with default values.&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;Compatible Slot Signatures:&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot(int row, com.trolltech.qt.sql.QSqlRecord record)&lt;/tt&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot(int row)&lt;/tt&gt;&lt;/dd&gt;
&lt;dd&gt;&lt;tt&gt;void mySlot()&lt;/tt&gt;&lt;/dd&gt;
&lt;/dl&gt;
 */"/>
    <method name="public QSqlTableModel(com.trolltech.qt.core.QObject parent, com.trolltech.qt.sql.QSqlDatabase db)" doc="/**
&lt;p&gt;Creates an empty &lt;a href=&quot;QSqlTableModel.html#QSqlTableModel(com.trolltech.qt.core.QObject, com.trolltech.qt.sql.QSqlDatabase)&quot;&gt;&lt;tt&gt;QSqlTableModel&lt;/tt&gt;&lt;/a&gt; and sets the parent to &lt;tt&gt;parent&lt;/tt&gt; and the database connection to &lt;tt&gt;db&lt;/tt&gt;. If &lt;tt&gt;db&lt;/tt&gt; is not valid, the default database connection will be used.&lt;/p&gt;
&lt;p&gt;The default edit strategy is &lt;a href=&quot;QSqlTableModel.html#EditStrategy-enum&quot;&gt;&lt;tt&gt;OnRowChange&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
 */"/>
    <method name="public QSqlTableModel(com.trolltech.qt.core.QObject parent)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSqlTableModel.html#QSqlTableModel(com.trolltech.qt.core.QObject, com.trolltech.qt.sql.QSqlDatabase)&quot;&gt;&lt;tt&gt;QSqlTableModel&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;parent&lt;/tt&gt;, QSqlDatabase()). */"/>
    <method name="public QSqlTableModel()" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSqlTableModel.html#QSqlTableModel(com.trolltech.qt.core.QObject, com.trolltech.qt.sql.QSqlDatabase)&quot;&gt;&lt;tt&gt;QSqlTableModel&lt;/tt&gt;&lt;/a&gt;(0, QSqlDatabase()). */"/>
    <method name="public final com.trolltech.qt.sql.QSqlDatabase database()" doc="/**
&lt;p&gt;Returns a pointer to the used &lt;a href=&quot;QSqlDatabase.html&quot;&gt;&lt;tt&gt;QSqlDatabase&lt;/tt&gt;&lt;/a&gt; or 0 if no database was set.&lt;/p&gt;
 */"/>
    <method name="public final com.trolltech.qt.sql.QSqlTableModel.EditStrategy editStrategy()" doc="/**
&lt;p&gt;Returns the current edit strategy.&lt;/p&gt;

@see &lt;a href=&quot;QSqlTableModel.html#setEditStrategy(com.trolltech.qt.sql.QSqlTableModel.EditStrategy)&quot;&gt;&lt;tt&gt;setEditStrategy&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int fieldIndex(java.lang.String fieldName)" doc="/**
&lt;p&gt;Returns the index of the field &lt;tt&gt;fieldName&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public final java.lang.String filter()" doc="/**
&lt;p&gt;Returns the currently set filter.&lt;/p&gt;

@see &lt;a href=&quot;QSqlTableModel.html#setFilter(java.lang.String)&quot;&gt;&lt;tt&gt;setFilter&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#select()&quot;&gt;&lt;tt&gt;select&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="protected final com.trolltech.qt.core.QModelIndex indexInQuery(com.trolltech.qt.core.QModelIndex item)" doc="/**
&lt;p&gt;Returns the index of the value in the database result set for the given &lt;tt&gt;item&lt;/tt&gt; in the model.&lt;/p&gt;
&lt;p&gt;The return value is identical to &lt;tt&gt;item&lt;/tt&gt; if no columns or rows have been inserted, removed, or moved around.&lt;/p&gt;
&lt;p&gt;Returns an invalid model index if &lt;tt&gt;item&lt;/tt&gt; is out of bounds or if &lt;tt&gt;item&lt;/tt&gt; does not point to a value in the result set.&lt;/p&gt;

@see &lt;tt&gt;QSqlQueryModel::indexInQuery&lt;/tt&gt; */"/>
    <method name="public final boolean insertRecord(int row, com.trolltech.qt.sql.QSqlRecord record)" doc="/**
&lt;p&gt;Inserts the &lt;tt&gt;record&lt;/tt&gt; after &lt;tt&gt;row&lt;/tt&gt;. If &lt;tt&gt;row&lt;/tt&gt; is negative, the record will be appended to the end. Calls &lt;a href=&quot;QSqlTableModel.html#insertRows(int, int, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;insertRows&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QSqlTableModel.html#setRecord(int, com.trolltech.qt.sql.QSqlRecord)&quot;&gt;&lt;tt&gt;setRecord&lt;/tt&gt;&lt;/a&gt; internally.&lt;/p&gt;
&lt;p&gt;Returns true if the row could be inserted, otherwise false.&lt;/p&gt;

@see &lt;a href=&quot;QSqlTableModel.html#insertRows(int, int, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;insertRows&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#removeRows(int, int, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;removeRows&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean isDirty(com.trolltech.qt.core.QModelIndex index)" doc="/**
&lt;p&gt;Returns true if the value at the index &lt;tt&gt;index&lt;/tt&gt; is dirty, otherwise false. Dirty values are values that were modified in the model but not yet written into the database.&lt;/p&gt;
&lt;p&gt;If &lt;tt&gt;index&lt;/tt&gt; is invalid or points to a non-existing row, false is returned.&lt;/p&gt;
 */"/>
    <method name="public final com.trolltech.qt.sql.QSqlIndex primaryKey()" doc="/**
&lt;p&gt;Returns the primary key for the current table, or an empty &lt;a href=&quot;QSqlIndex.html&quot;&gt;&lt;tt&gt;QSqlIndex&lt;/tt&gt;&lt;/a&gt; if the table is not set or has no primary key.&lt;/p&gt;

@see &lt;a href=&quot;QSqlTableModel.html#setTable(java.lang.String)&quot;&gt;&lt;tt&gt;setTable&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#setPrimaryKey(com.trolltech.qt.sql.QSqlIndex)&quot;&gt;&lt;tt&gt;setPrimaryKey&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;QSqlDatabase::primaryIndex&lt;/tt&gt; */"/>
    <method name="public final void revertAll()" doc="/**
&lt;p&gt;Reverts all pending changes.&lt;/p&gt;

@see &lt;a href=&quot;QSqlTableModel.html#revert()&quot;&gt;&lt;tt&gt;revert&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#revertRow(int)&quot;&gt;&lt;tt&gt;revertRow&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#submitAll()&quot;&gt;&lt;tt&gt;submitAll&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="protected final void setPrimaryKey(com.trolltech.qt.sql.QSqlIndex key)" doc="/**
&lt;p&gt;Protected method that allows subclasses to set the primary key to &lt;tt&gt;key&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;Normally, the primary index is set automatically whenever you call &lt;a href=&quot;QSqlTableModel.html#setTable(java.lang.String)&quot;&gt;&lt;tt&gt;setTable&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QSqlTableModel.html#primaryKey()&quot;&gt;&lt;tt&gt;primaryKey&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;QSqlDatabase::primaryIndex&lt;/tt&gt; */"/>
    <method name="public final void setQuery(com.trolltech.qt.sql.QSqlQuery query)" doc="/**
&lt;p&gt;This function simply calls QSqlQueryModel::setQuery(&lt;tt&gt;query&lt;/tt&gt;). You should normally not call it on a &lt;a href=&quot;QSqlTableModel.html#QSqlTableModel(com.trolltech.qt.core.QObject, com.trolltech.qt.sql.QSqlDatabase)&quot;&gt;&lt;tt&gt;QSqlTableModel&lt;/tt&gt;&lt;/a&gt;. Instead, use &lt;a href=&quot;QSqlTableModel.html#setTable(java.lang.String)&quot;&gt;&lt;tt&gt;setTable&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QSqlTableModel.html#setSort(int, com.trolltech.qt.core.Qt.SortOrder)&quot;&gt;&lt;tt&gt;setSort&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QSqlTableModel.html#setFilter(java.lang.String)&quot;&gt;&lt;tt&gt;setFilter&lt;/tt&gt;&lt;/a&gt;, etc., to set up the query.&lt;/p&gt;

@see &lt;a href=&quot;QSqlTableModel.html#selectStatement()&quot;&gt;&lt;tt&gt;selectStatement&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean setRecord(int row, com.trolltech.qt.sql.QSqlRecord record)" doc="/**
&lt;p&gt;Sets the values at the specified &lt;tt&gt;row&lt;/tt&gt; to the values of &lt;tt&gt;record&lt;/tt&gt;. Returns true if all the values could be set; otherwise returns false.&lt;/p&gt;

@see &lt;a href=&quot;QSqlQueryModel.html#record()&quot;&gt;&lt;tt&gt;record&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean submitAll()" doc="/**
&lt;p&gt;Submits all pending changes and returns true on success. Returns false on error, detailed error information can be obtained with &lt;a href=&quot;QSqlQueryModel.html#lastError()&quot;&gt;&lt;tt&gt;lastError&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;On success the model will be repopulated. Any views presenting it will lose their selections.&lt;/p&gt;
&lt;p&gt;Note: In &lt;a href=&quot;QSqlTableModel.html#EditStrategy-enum&quot;&gt;&lt;tt&gt;OnManualSubmit&lt;/tt&gt;&lt;/a&gt; mode, already submitted changes won't be cleared from the cache when &lt;a href=&quot;QSqlTableModel.html#submitAll()&quot;&gt;&lt;tt&gt;submitAll&lt;/tt&gt;&lt;/a&gt; fails. This allows transactions to be rolled back and resubmitted again without losing data.&lt;/p&gt;

@see &lt;a href=&quot;QSqlTableModel.html#revertAll()&quot;&gt;&lt;tt&gt;revertAll&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlQueryModel.html#lastError()&quot;&gt;&lt;tt&gt;lastError&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final java.lang.String tableName()" doc="/**
&lt;p&gt;Returns the name of the currently selected table.&lt;/p&gt;
 */"/>
    <method name="public void clear()" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public java.lang.Object data(com.trolltech.qt.core.QModelIndex idx, int role)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;

@see &lt;a href=&quot;QSqlTableModel.html#setData(com.trolltech.qt.core.QModelIndex, java.lang.Object, int)&quot;&gt;&lt;tt&gt;setData&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final java.lang.Object data(com.trolltech.qt.core.QModelIndex idx)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSqlTableModel.html#data(com.trolltech.qt.core.QModelIndex, int)&quot;&gt;data&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;idx&lt;/tt&gt;, Qt::DisplayRole). */"/>
    <method name="protected boolean deleteRowFromTable(int row)" doc="/**
&lt;p&gt;Deletes the given &lt;tt&gt;row&lt;/tt&gt; from the currently active database table.&lt;/p&gt;
&lt;p&gt;This is a low-level method that operates directly on the database and should not be called directly. Use &lt;a href=&quot;%2E%2E/core/%2E%2E/core/QAbstractItemModel.html#removeRow(int, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;removeRow&lt;/tt&gt;&lt;/a&gt; or &lt;a href=&quot;QSqlTableModel.html#removeRows(int, int, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;removeRows&lt;/tt&gt;&lt;/a&gt; to delete values. The model will decide depending on its edit strategy when to modify the database.&lt;/p&gt;
&lt;p&gt;Returns true if the row was deleted; otherwise returns false.&lt;/p&gt;

@see &lt;a href=&quot;%2E%2E/core/%2E%2E/core/QAbstractItemModel.html#removeRow(int, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;removeRow&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#removeRows(int, int, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;removeRows&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public com.trolltech.qt.core.Qt.ItemFlags flags(com.trolltech.qt.core.QModelIndex index)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public java.lang.Object headerData(int section, com.trolltech.qt.core.Qt.Orientation orientation, int role)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public final java.lang.Object headerData(int section, com.trolltech.qt.core.Qt.Orientation orientation)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSqlTableModel.html#headerData(int, com.trolltech.qt.core.Qt.Orientation, int)&quot;&gt;&lt;tt&gt;headerData&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;section&lt;/tt&gt;, &lt;tt&gt;orientation&lt;/tt&gt;, Qt::DisplayRole). */"/>
    <method name="protected boolean insertRowIntoTable(com.trolltech.qt.sql.QSqlRecord values)" doc="/**
&lt;p&gt;Inserts the values &lt;tt&gt;values&lt;/tt&gt; into the currently active database table.&lt;/p&gt;
&lt;p&gt;This is a low-level method that operates directly on the database and should not be called directly. Use &lt;a href=&quot;%2E%2E/core/%2E%2E/core/QAbstractItemModel.html#insertRow(int, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;insertRow&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QSqlTableModel.html#setData(com.trolltech.qt.core.QModelIndex, java.lang.Object, int)&quot;&gt;&lt;tt&gt;setData&lt;/tt&gt;&lt;/a&gt; to insert values. The model will decide depending on its edit strategy when to modify the database.&lt;/p&gt;
&lt;p&gt;Returns true if the values could be inserted, otherwise false. Error information can be retrieved with &lt;a href=&quot;QSqlQueryModel.html#lastError()&quot;&gt;&lt;tt&gt;lastError&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QSqlQueryModel.html#lastError()&quot;&gt;&lt;tt&gt;lastError&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;%2E%2E/core/%2E%2E/core/QAbstractItemModel.html#insertRow(int, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;insertRow&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#insertRows(int, int, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;insertRows&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public boolean insertRows(int row, int count, com.trolltech.qt.core.QModelIndex parent)" doc="/**
&lt;p&gt;Inserts &lt;tt&gt;count&lt;/tt&gt; empty rows at position &lt;tt&gt;row&lt;/tt&gt;. Note that &lt;tt&gt;parent&lt;/tt&gt; must be invalid, since this model does not support parent-child relations.&lt;/p&gt;
&lt;p&gt;Only one row at a time can be inserted when using the &lt;a href=&quot;QSqlTableModel.html#EditStrategy-enum&quot;&gt;&lt;tt&gt;OnFieldChange&lt;/tt&gt;&lt;/a&gt; or &lt;a href=&quot;QSqlTableModel.html#EditStrategy-enum&quot;&gt;&lt;tt&gt;OnRowChange&lt;/tt&gt;&lt;/a&gt; update strategies.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;QSqlTableModel.html#primeInsert(int, com.trolltech.qt.sql.QSqlRecord)&quot;&gt;&lt;tt&gt;primeInsert&lt;/tt&gt;&lt;/a&gt; signal will be emitted for each new row. Connect to it if you want to initialize the new row with default values.&lt;/p&gt;
&lt;p&gt;Returns false if the parameters are out of bounds; otherwise returns true.&lt;/p&gt;

@see &lt;a href=&quot;QSqlTableModel.html#primeInsert(int, com.trolltech.qt.sql.QSqlRecord)&quot;&gt;&lt;tt&gt;primeInsert&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#insertRecord(int, com.trolltech.qt.sql.QSqlRecord)&quot;&gt;&lt;tt&gt;insertRecord&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean insertRows(int row, int count)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSqlTableModel.html#insertRows(int, int, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;insertRows&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;row&lt;/tt&gt;, &lt;tt&gt;count&lt;/tt&gt;, QModelIndex()). */"/>
    <method name="protected java.lang.String orderByClause()" doc="/**
&lt;p&gt;Returns an SQL &lt;tt&gt;ORDER BY&lt;/tt&gt; clause based on the currently set sort order.&lt;/p&gt;

@see &lt;a href=&quot;QSqlTableModel.html#setSort(int, com.trolltech.qt.core.Qt.SortOrder)&quot;&gt;&lt;tt&gt;setSort&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#selectStatement()&quot;&gt;&lt;tt&gt;selectStatement&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public boolean removeColumns(int column, int count, com.trolltech.qt.core.QModelIndex parent)" doc="/**
&lt;p&gt;Removes &lt;tt&gt;count&lt;/tt&gt; columns from the &lt;tt&gt;parent&lt;/tt&gt; model, starting at index &lt;tt&gt;column&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;Returns if the columns were successfully removed; otherwise returns false.&lt;/p&gt;

@see &lt;a href=&quot;QSqlTableModel.html#removeRows(int, int, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;removeRows&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean removeColumns(int column, int count)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSqlTableModel.html#removeColumns(int, int, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;removeColumns&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;column&lt;/tt&gt;, &lt;tt&gt;count&lt;/tt&gt;, QModelIndex()). */"/>
    <method name="public boolean removeRows(int row, int count, com.trolltech.qt.core.QModelIndex parent)" doc="/**
&lt;p&gt;Removes &lt;tt&gt;count&lt;/tt&gt; rows starting at &lt;tt&gt;row&lt;/tt&gt;. Since this model does not support hierarchical structures, &lt;tt&gt;parent&lt;/tt&gt; must be an invalid model index.&lt;/p&gt;
&lt;p&gt;Emits the &lt;a href=&quot;QSqlTableModel.html#beforeDelete(int)&quot;&gt;&lt;tt&gt;beforeDelete&lt;/tt&gt;&lt;/a&gt; signal before a row is deleted.&lt;/p&gt;
&lt;p&gt;Returns true if all rows could be removed; otherwise returns false. Detailed error information can be retrieved using &lt;a href=&quot;QSqlQueryModel.html#lastError()&quot;&gt;&lt;tt&gt;lastError&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QSqlTableModel.html#removeColumns(int, int, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;removeColumns&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#insertRows(int, int, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;insertRows&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean removeRows(int row, int count)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSqlTableModel.html#removeRows(int, int, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;removeRows&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;row&lt;/tt&gt;, &lt;tt&gt;count&lt;/tt&gt;, QModelIndex()). */"/>
    <method name="public void revert()" doc="/**
&lt;p&gt;This reimplemented slot is called by the item delegates when the user canceled editing the current row.&lt;/p&gt;
&lt;p&gt;Reverts the changes if the model's strategy is set to &lt;a href=&quot;QSqlTableModel.html#EditStrategy-enum&quot;&gt;&lt;tt&gt;OnRowChange&lt;/tt&gt;&lt;/a&gt;. Does nothing for the other edit strategies.&lt;/p&gt;
&lt;p&gt;Use &lt;a href=&quot;QSqlTableModel.html#revertAll()&quot;&gt;&lt;tt&gt;revertAll&lt;/tt&gt;&lt;/a&gt; to revert all pending changes for the &lt;a href=&quot;QSqlTableModel.html#EditStrategy-enum&quot;&gt;&lt;tt&gt;OnManualSubmit&lt;/tt&gt;&lt;/a&gt; strategy or &lt;a href=&quot;QSqlTableModel.html#revertRow(int)&quot;&gt;&lt;tt&gt;revertRow&lt;/tt&gt;&lt;/a&gt; to revert a specific row.&lt;/p&gt;

@see &lt;a href=&quot;QSqlTableModel.html#submit()&quot;&gt;&lt;tt&gt;submit&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#submitAll()&quot;&gt;&lt;tt&gt;submitAll&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#revertRow(int)&quot;&gt;&lt;tt&gt;revertRow&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#revertAll()&quot;&gt;&lt;tt&gt;revertAll&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public void revertRow(int row)" doc="/**
&lt;p&gt;Reverts all changes for the specified &lt;tt&gt;row&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QSqlTableModel.html#revert()&quot;&gt;&lt;tt&gt;revert&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#revertAll()&quot;&gt;&lt;tt&gt;revertAll&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#submit()&quot;&gt;&lt;tt&gt;submit&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#submitAll()&quot;&gt;&lt;tt&gt;submitAll&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public int rowCount(com.trolltech.qt.core.QModelIndex parent)" doc="/**
&lt;p&gt;This function is reimplemented for internal reasons.&lt;/p&gt;
 */"/>
    <method name="public final int rowCount()" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSqlTableModel.html#rowCount(com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;rowCount&lt;/tt&gt;&lt;/a&gt;(QModelIndex()). */"/>
    <method name="public boolean select()" doc="/**
&lt;p&gt;Populates the model with data from the table that was set via &lt;a href=&quot;QSqlTableModel.html#setTable(java.lang.String)&quot;&gt;&lt;tt&gt;setTable&lt;/tt&gt;&lt;/a&gt;, using the specified filter and sort condition, and returns true if successful; otherwise returns false.&lt;/p&gt;

@see &lt;a href=&quot;QSqlTableModel.html#setTable(java.lang.String)&quot;&gt;&lt;tt&gt;setTable&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#setFilter(java.lang.String)&quot;&gt;&lt;tt&gt;setFilter&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#selectStatement()&quot;&gt;&lt;tt&gt;selectStatement&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="protected java.lang.String selectStatement()" doc="/**
&lt;p&gt;Returns the SQL &lt;tt&gt;SELECT&lt;/tt&gt; statement used internally to populate the model. The statement includes the filter and the &lt;tt&gt;ORDER BY&lt;/tt&gt; clause.&lt;/p&gt;

@see &lt;a href=&quot;QSqlTableModel.html#filter()&quot;&gt;&lt;tt&gt;filter&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#orderByClause()&quot;&gt;&lt;tt&gt;orderByClause&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public boolean setData(com.trolltech.qt.core.QModelIndex index, java.lang.Object value, int role)" doc="/**
&lt;p&gt;Sets the data for the item &lt;tt&gt;index&lt;/tt&gt; for the role &lt;tt&gt;role&lt;/tt&gt; to &lt;tt&gt;value&lt;/tt&gt;. Depending on the edit strategy, the value might be applied to the database at once or cached in the model.&lt;/p&gt;
&lt;p&gt;Returns true if the value could be set or false on error, for example if &lt;tt&gt;index&lt;/tt&gt; is out of bounds.&lt;/p&gt;

@see &lt;a href=&quot;QSqlTableModel.html#editStrategy()&quot;&gt;&lt;tt&gt;editStrategy&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#data(com.trolltech.qt.core.QModelIndex, int)&quot;&gt;&lt;tt&gt;data&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#submit()&quot;&gt;&lt;tt&gt;submit&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#submitAll()&quot;&gt;&lt;tt&gt;submitAll&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#revertRow(int)&quot;&gt;&lt;tt&gt;revertRow&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean setData(com.trolltech.qt.core.QModelIndex index, java.lang.Object value)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSqlTableModel.html#setData(com.trolltech.qt.core.QModelIndex, java.lang.Object, int)&quot;&gt;&lt;tt&gt;setData&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;index&lt;/tt&gt;, &lt;tt&gt;value&lt;/tt&gt;, Qt::EditRole). */"/>
    <method name="public void setEditStrategy(com.trolltech.qt.sql.QSqlTableModel.EditStrategy strategy)" doc="/**
&lt;p&gt;Sets the strategy for editing values in the database to &lt;tt&gt;strategy&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;This will revert any pending changes.&lt;/p&gt;

@see &lt;a href=&quot;QSqlTableModel.html#editStrategy()&quot;&gt;&lt;tt&gt;editStrategy&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#revertAll()&quot;&gt;&lt;tt&gt;revertAll&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public void setFilter(java.lang.String filter)" doc="/**
&lt;p&gt;Sets the current filter to &lt;tt&gt;filter&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;The filter is a SQL &lt;tt&gt;WHERE&lt;/tt&gt; clause without the keyword &lt;tt&gt;WHERE&lt;/tt&gt; (for example, &lt;tt&gt;name='Josephine')&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;If the model is already populated with data from a database, the model re-selects it with the new filter. Otherwise, the filter will be applied the next time &lt;a href=&quot;QSqlTableModel.html#select()&quot;&gt;&lt;tt&gt;select&lt;/tt&gt;&lt;/a&gt; is called.&lt;/p&gt;

@see &lt;a href=&quot;QSqlTableModel.html#filter()&quot;&gt;&lt;tt&gt;filter&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#select()&quot;&gt;&lt;tt&gt;select&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#selectStatement()&quot;&gt;&lt;tt&gt;selectStatement&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#orderByClause()&quot;&gt;&lt;tt&gt;orderByClause&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public void setSort(int column, com.trolltech.qt.core.Qt.SortOrder order)" doc="/**
&lt;p&gt;Sets the sort order for &lt;tt&gt;column&lt;/tt&gt; to &lt;tt&gt;order&lt;/tt&gt;. This does not affect the current data, to refresh the data using the new sort order, call &lt;a href=&quot;QSqlTableModel.html#select()&quot;&gt;&lt;tt&gt;select&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QSqlTableModel.html#sort(int, com.trolltech.qt.core.Qt.SortOrder)&quot;&gt;&lt;tt&gt;sort&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#select()&quot;&gt;&lt;tt&gt;select&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#orderByClause()&quot;&gt;&lt;tt&gt;orderByClause&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public void setTable(java.lang.String tableName)" doc="/**
&lt;p&gt;Sets the database table on which the model operates to &lt;tt&gt;tableName&lt;/tt&gt;. Does not select data from the table, but fetches its field information.&lt;/p&gt;
&lt;p&gt;To populate the model with the table's data, call &lt;a href=&quot;QSqlTableModel.html#select()&quot;&gt;&lt;tt&gt;select&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Error information can be retrieved with &lt;a href=&quot;QSqlQueryModel.html#lastError()&quot;&gt;&lt;tt&gt;lastError&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QSqlTableModel.html#select()&quot;&gt;&lt;tt&gt;select&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#setFilter(java.lang.String)&quot;&gt;&lt;tt&gt;setFilter&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlQueryModel.html#lastError()&quot;&gt;&lt;tt&gt;lastError&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public void sort(int column, com.trolltech.qt.core.Qt.SortOrder order)" doc="/**
&lt;p&gt;Sorts the data by &lt;tt&gt;column&lt;/tt&gt; with the sort order &lt;tt&gt;order&lt;/tt&gt;. This will immediately select data, use &lt;a href=&quot;QSqlTableModel.html#setSort(int, com.trolltech.qt.core.Qt.SortOrder)&quot;&gt;&lt;tt&gt;setSort&lt;/tt&gt;&lt;/a&gt; to set a sort order without populating the model with data.&lt;/p&gt;

@see &lt;a href=&quot;QSqlTableModel.html#setSort(int, com.trolltech.qt.core.Qt.SortOrder)&quot;&gt;&lt;tt&gt;setSort&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#select()&quot;&gt;&lt;tt&gt;select&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#orderByClause()&quot;&gt;&lt;tt&gt;orderByClause&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public boolean submit()" doc="/**
&lt;p&gt;This reimplemented slot is called by the item delegates when the user stopped editing the current row.&lt;/p&gt;
&lt;p&gt;Submits the currently edited row if the model's strategy is set to &lt;a href=&quot;QSqlTableModel.html#EditStrategy-enum&quot;&gt;&lt;tt&gt;OnRowChange&lt;/tt&gt;&lt;/a&gt; or &lt;a href=&quot;QSqlTableModel.html#EditStrategy-enum&quot;&gt;&lt;tt&gt;OnFieldChange&lt;/tt&gt;&lt;/a&gt;. Does nothing for the &lt;a href=&quot;QSqlTableModel.html#EditStrategy-enum&quot;&gt;&lt;tt&gt;OnManualSubmit&lt;/tt&gt;&lt;/a&gt; strategy.&lt;/p&gt;
&lt;p&gt;Use &lt;a href=&quot;QSqlTableModel.html#submitAll()&quot;&gt;&lt;tt&gt;submitAll&lt;/tt&gt;&lt;/a&gt; to submit all pending changes for the &lt;a href=&quot;QSqlTableModel.html#EditStrategy-enum&quot;&gt;&lt;tt&gt;OnManualSubmit&lt;/tt&gt;&lt;/a&gt; strategy.&lt;/p&gt;
&lt;p&gt;Returns true on success; otherwise returns false. Use &lt;a href=&quot;QSqlQueryModel.html#lastError()&quot;&gt;&lt;tt&gt;lastError&lt;/tt&gt;&lt;/a&gt; to query detailed error information.&lt;/p&gt;
&lt;p&gt;On success the model will be repopulated. Any views presenting it will lose their selections.&lt;/p&gt;

@see &lt;a href=&quot;QSqlTableModel.html#revert()&quot;&gt;&lt;tt&gt;revert&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#revertRow(int)&quot;&gt;&lt;tt&gt;revertRow&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#submitAll()&quot;&gt;&lt;tt&gt;submitAll&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlTableModel.html#revertAll()&quot;&gt;&lt;tt&gt;revertAll&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlQueryModel.html#lastError()&quot;&gt;&lt;tt&gt;lastError&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="protected boolean updateRowInTable(int row, com.trolltech.qt.sql.QSqlRecord values)" doc="/**
&lt;p&gt;Updates the given &lt;tt&gt;row&lt;/tt&gt; in the currently active database table with the specified &lt;tt&gt;values&lt;/tt&gt;. Returns true if successful; otherwise returns false.&lt;/p&gt;
&lt;p&gt;This is a low-level method that operates directly on the database and should not be called directly. Use &lt;a href=&quot;QSqlTableModel.html#setData(com.trolltech.qt.core.QModelIndex, java.lang.Object, int)&quot;&gt;&lt;tt&gt;setData&lt;/tt&gt;&lt;/a&gt; to update values. The model will decide depending on its edit strategy when to modify the database.&lt;/p&gt;
&lt;p&gt;Note that only values that have the generated-flag set are updated. The generated-flag can be set with QSqlRecord::setGenerated() and tested with QSqlRecord::isGenerated().&lt;/p&gt;

@see &lt;tt&gt;QSqlRecord::isGenerated&lt;/tt&gt;
@see &lt;a href=&quot;QSqlTableModel.html#setData(com.trolltech.qt.core.QModelIndex, java.lang.Object, int)&quot;&gt;&lt;tt&gt;setData&lt;/tt&gt;&lt;/a&gt; */"/>
    <enum name="EditStrategy" doc="/**
&lt;p&gt;This enum type describes which strategy to choose when editing values in the database.&lt;/p&gt;
&lt;p&gt;Note: To prevent inserting only partly initialized rows into the database, &lt;tt&gt;OnFieldChange&lt;/tt&gt; will behave like &lt;tt&gt;OnRowChange&lt;/tt&gt; for newly inserted rows.&lt;/p&gt;

@see &lt;a href=&quot;QSqlTableModel.html#setEditStrategy(com.trolltech.qt.sql.QSqlTableModel.EditStrategy)&quot;&gt;&lt;tt&gt;setEditStrategy&lt;/tt&gt;&lt;/a&gt; */">
        <enum-value name="OnFieldChange" doc="/**
&lt;p&gt;All changes to the model will be applied immediately to the database.&lt;/p&gt;
 */"/>
        <enum-value name="OnRowChange" doc="/**
&lt;p&gt;Changes to a row will be applied when the user selects a different row.&lt;/p&gt;
 */"/>
        <enum-value name="OnManualSubmit" doc="/**
&lt;p&gt;All changes will be cached in the model until either &lt;a href=&quot;QSqlTableModel.html#submitAll()&quot;&gt;&lt;tt&gt;submitAll&lt;/tt&gt;&lt;/a&gt; or &lt;a href=&quot;QSqlTableModel.html#revertAll()&quot;&gt;&lt;tt&gt;revertAll&lt;/tt&gt;&lt;/a&gt; is called.&lt;/p&gt;
 */"/>
</enum>
</class>
