Hello,
what I want to achieve is the following:
I have data from a sql database in a subclass of QSqlQueryModel and refresh this model every 10 seconds from the database. The user ideally shouldn´t notice the refresh at all. The view is set so it selects whole rows only, and only one at a time.
So far, I save the rowID selected in the view (not the QModelIndex but a non-ambiguous value in the table), then refresh the model and afterwards reselect the saved rowID in the view.
The problem now is that this reselection in the view automatically jumps to the selection, even if the selected row was far down the scrollbar originally. Also, when the project is finished the data in the sql database will grow and new items will automatically be added with the 10 second refresh. What are your suggestions to achieve a refresh with minimal optical impact on the view and hence the user?

Thanks in advance