Whenever this model submits its data to the storage, it is also being refreshed (which does a reset of the model), so if you use any other edit strategy than QSqlTableModel::OnManualSubmit, then you experience the behaviour I described in my previous post. Try changing the edit strategy and you'll see the view starts to behave properly. I suggest you use manual submit and submit the data just before you exit the application (or when all views using the model are closed).
Bookmarks