[Qt-interest] QSqlRelationalTableModel/QTableView delegate functions for row navigation
Jan
janusius at gmx.net
Sun Apr 25 19:35:27 CEST 2010
I am not sure if I get exactly what you are looking for:
I could subclass the delegate and do your validation inside of
setModelData() (not sure if its the exact name) function.
Jan
Am 25.04.2010 18:04, schrieb Harry Sfougaris:
> 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
>
>
>
>
>
>
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list