Details
-
Suggestion
-
Resolution: Out of scope
-
Not Evaluated
-
4.5.2
-
None
Description
My problem is that I have a QTreeView using a QSqlTableModel model, and there are other clients and other parts of my application modifying my database in real time, not using the model used by the view. I need these external changes to be reflected in the view.
Calling QSqlTableModel::select() works – the contents of the view are updated. But calling select has the very undesirable effect of deleting the active selection(s) in the model view(s).
It would be useful to have a way to update the model and preserve any current selection.
Tthe best solution in most cases would be to update the model and remove any deleted items from the selection model. A signal to indicate changes to the selection in cases where selected items have changed would also be welcome.