How to insert new data rows to QSqlQueryModel?
-
Dear all,
I made QSqlQueryModel link with SQLite database.
I would like to add new data rows to that model before setting to ModelView.Plz guide me how to do that.
Thanks all
-
"QSqlQueryModel":http://doc.qt.nokia.com/latest/qsqlquerymodel.html#details
bq. The QSqlQueryModel class provides a read-only data model for SQL result sets.
However, you can
- use a QSqlTableModel instead or
- insert the data to the database first or
- create your own QAbstractItemModel which incorporates a QSqlQueryModel and allows for adding rows