Hi,

Imagine i have this:
Qt Code:
  1. void Dialog::beforeInsertX(QSqlRecord &record)
  2. {
  3. record.setValue("id", generateId("tablename"));
  4. record.setValue("a", "xxx");
  5. record.setValue("b", "yyy");
  6. ...
  7. }
  8.  
  9. void Dialog::insertX()
  10. {
  11.  
  12. int row = model->rowCount();
  13. model->insertRow(row);
  14. // ???
  15. }
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