Details
-
Suggestion
-
Resolution: Done
-
P2: Important
-
4.3.0
-
None
Description
Using the QSqlTableModel::OnFieldChange as edit strategy will cause the QTableView to change the scrollbar position by reseting on top.
Answer from Trolltech:
The reason for this behaviour is that after the field change has been written to the database the model will reselect the data, which causes the view to be repopulated. This can't be changed in Qt 4. A possible workaround is to remember where in the list you are before the update is done and then scroll to this possition after the view is repopulated, but as data may have been inserted or deleted in the meantime this isn't reliable.