Hello.
I'm using QSqlTableModel:
QSqlTableModel* sqltm = new QSqlTableModel;
sqltm->setTable(table);
sqltm->setFilter(filter);
I'm inserting there one row:
sqltm->insertRow(0);
And modifying data in this row:
sqltm->setData(sqltm->index(0,tab_col::Col1),data1);
sqltm->setData(sqltm->index(0,tab_col::Col2),data2);
And doing submitAll() request:
sqltm->submitAll();
Everything works fine, data inserted to DB.
Then in same session I'm making another set of
sqltm->setData(sqltm->index(0,tab_col::Col1),data3);
sqltm->setData(sqltm->index(0,tab_col::Col2),data4);
operations.
And trying sqltm->submitAll() again.
Nothing happening. Inside submitAll()
case OnManualSubmit:
for (QSqlTableModelPrivate::CacheMap::ConstIterator it = d->cache.constBegin();
it != d->cache.constEnd(); ++it)
"for" cycle skiped.
Anyone have any thoughts?
Bookmarks