[SOLVED] QSqlTableModel refuses to write data in database
General and Desktop
4
Posts
2
Posters
2.5k
Views
1
Watching
-
I do write a a couple of applications similar to this one. All of them work, but this doesn't work properly! The problem is that QSqlTableModel can't change content of table in database. When I select a row and edit a cell, then apply query again, anything is not changed.
This is connection method:
@
if(Database::instance.open())
{
model = new QSqlTableModel (this,Database::instance);
model->setTable("myTable");
tableView->setModel(model);
mapper = new QDataWidgetMapper(this);
//...
}
@