13while (myModel->canFetchMore())
bool isValid() const
Returns true if an error is set, otherwise false.
The QSqlQueryModel class provides a read-only data model for SQL result sets.
void setQuery(QSqlQuery &&query)
Resets the model and sets the data provider to be the given query.
void fetchMore(const QModelIndex &parent=QModelIndex()) override
Fetches more rows from a database.
QSqlError lastError() const
Returns information about the last error that occurred on the database.
QSqlQueryModel * model
[16]