Hi,
Imagine i have this:
{
record.setValue("id", generateId("tablename"));
record.setValue("a", "xxx");
record.setValue("b", "yyy");
...
}
void Dialog::insertX()
{
int row = model->rowCount();
model->insertRow(row);
// ???
}
void Dialog::beforeInsertX(QSqlRecord &record)
{
record.setValue("id", generateId("tablename"));
record.setValue("a", "xxx");
record.setValue("b", "yyy");
...
}
void Dialog::insertX()
{
int row = model->rowCount();
model->insertRow(row);
// ???
}
To copy to clipboard, switch view to plain text mode
What showl i type in the // ??? in order to have model and view sinchronized when no editing is necessary?
Thanks
Bookmarks