Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Jendker last edited by
In order to allow caching the changes in
QSqlRelationalTableModeli changed it's EditStrategy to
OnManualSubmit, but at the same time I am using
QSqlQueriesto update values of records or to copy the records.
I was trying to work 100% on the models by getting the records (I can paste the exact code, but here it is for the brevity):
QSqlRecord record_basis = table_model->database().record(table_name); record.setValue(...); ... table_model->insertRecord(record );
but it failed with the
QSqlRelationalTableModel, was workingo only fine with
QSqlTableModelso I switched to work with table queries.
Is there any neat way of caching
QSqlQueriesand executing them on submit? I guess no, because QSqlQueries work directly on the table, not on the model. Should I just create queue and call them one buy one before submit?