[Qt-interest] QSqlRelationalTableModel/QTableView delegate functions for row navigation

Harry Sfougaris hsfougaris at gmail.com
Sun Apr 25 18:04:15 CEST 2010


I would like to have a QTableView with a model set to a QSqlRelationalTableMode and a manual submit policy, where I handle when the data is submitted to the server.
So after using code like:
    myModel->insertRow(row);
    QModelIndex index = myModel->index(row, MyFld1);
    myVw->setCurrentIndex(index);
    myVw->edit(index)
I need to know when the current row is about to change, so I may do my validations and call submitAll.
I know of the currentRowChanged signal of QTableView, but is there something like a delegate function that can be hooked  (like shouldChangeCurrentRow), where I can control what happens navigations away from the currently edited row?
Thanks,
Harry Sfougaris




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100425/47ec1533/attachment.html 


More information about the Qt-interest-old mailing list