Hi again,
I've got everything working now with my delegate, however there is one very annoying thing that happens after a field has been updated:
The whole view re-populates itself!
I want to have the change commited to the database immediately so I have set my editStrategy to OnFieldChange. If I change to OnManualSubmit it works as expected.
I looked at the original source code and the QSqlTableModel does a select() after an update when the editStrategy is OnFieldChange.
What I'm wondering about is what happens if you use a QSqlTableModel to edit a large table? After scrolling far down the list and then edit a field, the view is re-populated and the position is lost, so you have to scroll down again
Is it really like this, or have I missed something?
Regards,
/ Ingemar





Reply With Quote
Bookmarks