<class name="QSqlQueryModel" doc="/**
&lt;p&gt;The &lt;a href=&quot;QSqlQueryModel.html#QSqlQueryModel(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSqlQueryModel&lt;/tt&gt;&lt;/a&gt; class provides a read-only data model for SQL result sets.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QSqlQueryModel.html#QSqlQueryModel(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSqlQueryModel&lt;/tt&gt;&lt;/a&gt; is a high-level interface for executing SQL statements and traversing the result set. It is built 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;        QSqlQueryModel *model = new QSqlQueryModel;
        model-&amp;gt;setQuery(&amp;quot;SELECT name, salary FROM employee&amp;quot;);
        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 model's query, then we set up the labels displayed in the view header.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QSqlQueryModel.html#QSqlQueryModel(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSqlQueryModel&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;        QSqlQueryModel model;
        model.setQuery(&amp;quot;SELECT * FROM employee&amp;quot;);
        int salary = model.record(4).value(&amp;quot;salary&amp;quot;).toInt();&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;. Assuming that &lt;tt&gt;salary&lt;/tt&gt; is column 2, we can rewrite the last line as follows:&lt;/p&gt;
&lt;pre&gt;        int salary = model.data(model.index(4, 2)).toInt();&lt;/pre&gt;
&lt;p&gt;The model is read-only by default. To make it read-write, you must subclass it and reimplement &lt;a href=&quot;%2E%2E/core/%2E%2E/core/QAbstractItemModel.html#setData(com.trolltech.qt.core.QModelIndex, java.lang.Object, int)&quot;&gt;&lt;tt&gt;setData&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;%2E%2E/core/%2E%2E/core/QAbstractItemModel.html#flags(com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;flags&lt;/tt&gt;&lt;/a&gt;. Another option is to use &lt;a href=&quot;QSqlTableModel.html&quot;&gt;&lt;tt&gt;QSqlTableModel&lt;/tt&gt;&lt;/a&gt;, which provides a read-write model based on a single database table.&lt;/p&gt;
&lt;p&gt;The sql/querymodel&lt;/tt&gt; example illustrates how to use &lt;a href=&quot;QSqlQueryModel.html#QSqlQueryModel(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSqlQueryModel&lt;/tt&gt;&lt;/a&gt; to display the result of a query. It also shows how to subclass &lt;a href=&quot;QSqlQueryModel.html#QSqlQueryModel(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSqlQueryModel&lt;/tt&gt;&lt;/a&gt; to customize the contents of the data before showing it to the user, and how to create a read-write model based on &lt;a href=&quot;QSqlQueryModel.html#QSqlQueryModel(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSqlQueryModel&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If the database doesn't return the amount of selected rows in a query, the model will fetch rows incrementally. See &lt;a href=&quot;QSqlQueryModel.html#fetchMore(com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;fetchMore&lt;/tt&gt;&lt;/a&gt; for more information.&lt;/p&gt;

@see &lt;a href=&quot;QSqlTableModel.html&quot;&gt;&lt;tt&gt;QSqlTableModel&lt;/tt&gt;&lt;/a&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 Query Model Example&lt;/tt&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;%2E%2E/core/%2E%2E/core/QAbstractItemModel.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;QSqlQueryModel.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#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;QSqlQueryModel.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;QSqlQueryModel.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;QSqlQueryModel.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;QSqlQueryModel.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;QSqlQueryModel.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;QSqlQueryModel.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;QSqlQueryModel.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;QSqlQueryModel.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;QSqlQueryModel.html#layoutAboutToBeChanged()&quot;&gt;&lt;tt&gt;layoutAboutToBeChanged&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QSqlQueryModel.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;QSqlQueryModel.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;
 */"/>
    <method name="public QSqlQueryModel(com.trolltech.qt.core.QObject parent)" doc="/**
&lt;p&gt;Creates an empty &lt;a href=&quot;QSqlQueryModel.html#QSqlQueryModel(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSqlQueryModel&lt;/tt&gt;&lt;/a&gt; with the given &lt;tt&gt;parent&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public QSqlQueryModel()" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSqlQueryModel.html#QSqlQueryModel(com.trolltech.qt.core.QObject)&quot;&gt;&lt;tt&gt;QSqlQueryModel&lt;/tt&gt;&lt;/a&gt;(0). */"/>
    <method name="protected 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;QSqlTableModel::indexInQuery&lt;/tt&gt;
@see &lt;a href=&quot;QSqlQueryModel.html#insertColumns(int, int, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;insertColumns&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlQueryModel.html#removeColumns(int, int, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;removeColumns&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.sql.QSqlError lastError()" doc="/**
&lt;p&gt;Returns information about the last error that occurred on the database.&lt;/p&gt;

@see &lt;a href=&quot;QSqlQueryModel.html#setLastError(com.trolltech.qt.sql.QSqlError)&quot;&gt;&lt;tt&gt;setLastError&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.sql.QSqlQuery query()" doc="/**
&lt;p&gt;Returns the &lt;a href=&quot;QSqlQuery.html&quot;&gt;&lt;tt&gt;QSqlQuery&lt;/tt&gt;&lt;/a&gt; associated with this model.&lt;/p&gt;

@see &lt;a href=&quot;QSqlQueryModel.html#setQuery(java.lang.String, com.trolltech.qt.sql.QSqlDatabase)&quot;&gt;&lt;tt&gt;setQuery&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.sql.QSqlRecord record(int row)" doc="/**
&lt;p&gt;Returns the record containing information about the fields of the current query. If &lt;tt&gt;row&lt;/tt&gt; is the index of a valid row, the record will be populated with values from that row.&lt;/p&gt;
&lt;p&gt;If the model is not initialized, an empty record will be returned.&lt;/p&gt;

@see &lt;tt&gt;QSqlRecord::isEmpty&lt;/tt&gt; */"/>
    <method name="public final com.trolltech.qt.sql.QSqlRecord record()" doc="/**
&lt;p&gt;Returns an empty record containing information about the fields of the current query.&lt;/p&gt;
&lt;p&gt;If the model is not initialized, an empty record will be returned.&lt;/p&gt;

@see &lt;tt&gt;QSqlRecord::isEmpty&lt;/tt&gt; */"/>
    <method name="protected final void setLastError(com.trolltech.qt.sql.QSqlError error)" doc="/**
&lt;p&gt;Protected function which allows derived classes to set the value of the last error that occurred on the database to &lt;tt&gt;error&lt;/tt&gt;.&lt;/p&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 setQuery(com.trolltech.qt.sql.QSqlQuery query)" doc="/**
&lt;p&gt;Resets the model and sets the data provider to be the given &lt;tt&gt;query&lt;/tt&gt;. Note that the query must be active and must not be isForwardOnly().&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QSqlQueryModel.html#lastError()&quot;&gt;&lt;tt&gt;lastError&lt;/tt&gt;&lt;/a&gt; can be used to retrieve verbose information if there was an error setting the query.&lt;/p&gt;

@see &lt;a href=&quot;QSqlQueryModel.html#query()&quot;&gt;&lt;tt&gt;query&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;QSqlQuery::isActive&lt;/tt&gt;
@see &lt;tt&gt;QSqlQuery::setForwardOnly&lt;/tt&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 void setQuery(java.lang.String query, com.trolltech.qt.sql.QSqlDatabase db)" doc="/**
&lt;p&gt;Executes the query &lt;tt&gt;query&lt;/tt&gt; for the given database connection &lt;tt&gt;db&lt;/tt&gt;. If no database is specified, the default connection is used.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QSqlQueryModel.html#lastError()&quot;&gt;&lt;tt&gt;lastError&lt;/tt&gt;&lt;/a&gt; can be used to retrieve verbose information if there was an error setting the query.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;    QSqlQueryModel model;
    model.setQuery(&amp;quot;select * from MyTable&amp;quot;);
    if (model.lastError().isValid())
        qDebug() &amp;lt;&amp;lt; model.lastError();&lt;/pre&gt;

@see &lt;a href=&quot;QSqlQueryModel.html#query()&quot;&gt;&lt;tt&gt;query&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlQueryModel.html#queryChange()&quot;&gt;&lt;tt&gt;queryChange&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 void setQuery(java.lang.String query)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSqlQueryModel.html#setQuery(java.lang.String, com.trolltech.qt.sql.QSqlDatabase)&quot;&gt;&lt;tt&gt;setQuery&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;query&lt;/tt&gt;, QSqlDatabase()). */"/>
    <method name="public boolean canFetchMore(com.trolltech.qt.core.QModelIndex parent)" doc="/**
&lt;p&gt;Returns true if it is possible to read more rows from the database. This only affects databases that don't report back the size of a query (see QSqlDriver::hasFeature()).&lt;/p&gt;
&lt;p&gt;&lt;tt&gt;parent&lt;/tt&gt; should always be an invalid QModelIndex.&lt;/p&gt;

@see &lt;a href=&quot;QSqlQueryModel.html#fetchMore(com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;fetchMore&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean canFetchMore()" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSqlQueryModel.html#canFetchMore(com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;canFetchMore&lt;/tt&gt;&lt;/a&gt;(QModelIndex()). */"/>
    <method name="public void clear()" doc="/**
&lt;p&gt;Clears the model and releases any acquired resource.&lt;/p&gt;
 */"/>
    <method name="public int columnCount(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 columnCount()" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSqlQueryModel.html#columnCount(com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;columnCount&lt;/tt&gt;&lt;/a&gt;(QModelIndex()). */"/>
    <method name="public java.lang.Object data(com.trolltech.qt.core.QModelIndex item, int role)" doc="/**
&lt;p&gt;Returns the value for the specified &lt;tt&gt;item&lt;/tt&gt; and &lt;tt&gt;role&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;If &lt;tt&gt;item&lt;/tt&gt; is out of bounds or if an error occurred, an invalid &lt;a href=&quot;%2E%2E/porting4.html#qvariant&quot;&gt;&lt;tt&gt;QVariant&lt;/tt&gt;&lt;/a&gt; is returned.&lt;/p&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.Object data(com.trolltech.qt.core.QModelIndex item)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSqlQueryModel.html#data(com.trolltech.qt.core.QModelIndex, int)&quot;&gt;data&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;item&lt;/tt&gt;, Qt::DisplayRole). */"/>
    <method name="public void fetchMore(com.trolltech.qt.core.QModelIndex parent)" doc="/**
&lt;p&gt;Fetches more rows from a database. This only affects databases that don't report back the size of a query (see QSqlDriver::hasFeature()).&lt;/p&gt;
&lt;p&gt;To force fetching of the entire database, you can use the following:&lt;/p&gt;
&lt;pre&gt;    while (myModel-&amp;gt;canFetchMore())
        myModel-&amp;gt;fetchMore();&lt;/pre&gt;
&lt;p&gt;&lt;tt&gt;parent&lt;/tt&gt; should always be an invalid QModelIndex.&lt;/p&gt;

@see &lt;a href=&quot;QSqlQueryModel.html#canFetchMore(com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;canFetchMore&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void fetchMore()" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSqlQueryModel.html#fetchMore(com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;fetchMore&lt;/tt&gt;&lt;/a&gt;(QModelIndex()). */"/>
    <method name="public java.lang.Object headerData(int section, com.trolltech.qt.core.Qt.Orientation orientation, int role)" doc="/**
&lt;p&gt;Returns the header data for the given &lt;tt&gt;role&lt;/tt&gt; in the &lt;tt&gt;section&lt;/tt&gt; of the header with the specified &lt;tt&gt;orientation&lt;/tt&gt;.&lt;/p&gt;

@see &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; */"/>
    <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;QSqlQueryModel.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="public boolean insertColumns(int column, int count, com.trolltech.qt.core.QModelIndex parent)" doc="/**
&lt;p&gt;Inserts &lt;tt&gt;count&lt;/tt&gt; columns into the model at position &lt;tt&gt;column&lt;/tt&gt;. The &lt;tt&gt;parent&lt;/tt&gt; parameter must always be an invalid QModelIndex, since the model does not support parent-child relationships.&lt;/p&gt;
&lt;p&gt;Returns true if &lt;tt&gt;column&lt;/tt&gt; is within bounds; otherwise returns false.&lt;/p&gt;
&lt;p&gt;By default, inserted columns are empty. To fill them with data, reimplement &lt;a href=&quot;QSqlQueryModel.html#data(com.trolltech.qt.core.QModelIndex, int)&quot;&gt;&lt;tt&gt;data&lt;/tt&gt;&lt;/a&gt; and handle any inserted column separately:&lt;/p&gt;
&lt;pre&gt;    QVariant MyModel::data(const QModelIndex &amp;amp;item, int role) const
    {
        if (item.column() == m_specialColumnNo) {
            &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; handle column separately
        }
        return QSqlQueryModel::data(item, role);
    }&lt;/pre&gt;

@see &lt;a href=&quot;QSqlQueryModel.html#removeColumns(int, int, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;removeColumns&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean insertColumns(int column, int count)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSqlQueryModel.html#insertColumns(int, int, com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;insertColumns&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;column&lt;/tt&gt;, &lt;tt&gt;count&lt;/tt&gt;, QModelIndex()). */"/>
    <method name="protected void queryChange()" doc="/**
&lt;p&gt;This virtual function is called whenever the query changes. The default implementation does nothing.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QSqlQueryModel.html#query()&quot;&gt;&lt;tt&gt;query&lt;/tt&gt;&lt;/a&gt; returns the new query.&lt;/p&gt;

@see &lt;a href=&quot;QSqlQueryModel.html#query()&quot;&gt;&lt;tt&gt;query&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlQueryModel.html#setQuery(java.lang.String, com.trolltech.qt.sql.QSqlDatabase)&quot;&gt;&lt;tt&gt;setQuery&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 model starting from position &lt;tt&gt;column&lt;/tt&gt;. The &lt;tt&gt;parent&lt;/tt&gt; parameter must always be an invalid QModelIndex, since the model does not support parent-child relationships.&lt;/p&gt;
&lt;p&gt;Removing columns effectively hides them. It does not affect the underlying &lt;a href=&quot;QSqlQuery.html&quot;&gt;&lt;tt&gt;QSqlQuery&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Returns true if the columns were removed; otherwise returns false.&lt;/p&gt;
 */"/>
    <method name="public final boolean removeColumns(int column, int count)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSqlQueryModel.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 int rowCount(com.trolltech.qt.core.QModelIndex parent)" doc="/**
&lt;p&gt;If the database supports returning the size of a query (see QSqlDriver::hasFeature()), the amount of rows of the current query is returned. Otherwise, returns the amount of rows currently cached on the client.&lt;/p&gt;
&lt;p&gt;&lt;tt&gt;parent&lt;/tt&gt; should always be an invalid QModelIndex.&lt;/p&gt;

@see &lt;a href=&quot;QSqlQueryModel.html#canFetchMore(com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;canFetchMore&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;QSqlDriver::hasFeature&lt;/tt&gt; */"/>
    <method name="public final int rowCount()" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSqlQueryModel.html#rowCount(com.trolltech.qt.core.QModelIndex)&quot;&gt;&lt;tt&gt;rowCount&lt;/tt&gt;&lt;/a&gt;(QModelIndex()). */"/>
    <method name="public boolean setHeaderData(int section, com.trolltech.qt.core.Qt.Orientation orientation, java.lang.Object value, int role)" doc="/**
&lt;p&gt;Sets the caption for a horizontal header for the specified &lt;tt&gt;role&lt;/tt&gt; to &lt;tt&gt;value&lt;/tt&gt;. This is useful if the model is used to display data in a view (e.g&amp;#x2e;, &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;Returns true if &lt;tt&gt;orientation&lt;/tt&gt; is Qt::Horizontal and the &lt;tt&gt;section&lt;/tt&gt; refers to a valid section; otherwise returns false.&lt;/p&gt;
&lt;p&gt;Note that this function cannot be used to modify values in the database since the model is read-only.&lt;/p&gt;

@see &lt;a href=&quot;QSqlQueryModel.html#headerData(int, com.trolltech.qt.core.Qt.Orientation, int)&quot;&gt;&lt;tt&gt;headerData&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlQueryModel.html#data(com.trolltech.qt.core.QModelIndex, int)&quot;&gt;&lt;tt&gt;data&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean setHeaderData(int section, com.trolltech.qt.core.Qt.Orientation orientation, java.lang.Object value)" doc="/**
&lt;p&gt;Equivalent to &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;tt&gt;section&lt;/tt&gt;, &lt;tt&gt;orientation&lt;/tt&gt;, &lt;tt&gt;value&lt;/tt&gt;, Qt::EditRole). */"/>
</class>
