mpi
5th October 2009, 15:08
1. I have two views on the same model. If I let the views share their selection models, then the selections between the two views are in sync.
2. To make everything even smarter, I implement my own selection model that inherits from QItemSelectionModel.
3. Then I decide that I want sort functionality in one of the views. So this view then uses a QSortFilterProxyModel.
4. But then the selection model can no longer be shared between the two views, since each view have two different model: The original and a proxy to the original.
5. As a result, selections are no longer in sync.
What a I doing wrong?
2. To make everything even smarter, I implement my own selection model that inherits from QItemSelectionModel.
3. Then I decide that I want sort functionality in one of the views. So this view then uses a QSortFilterProxyModel.
4. But then the selection model can no longer be shared between the two views, since each view have two different model: The original and a proxy to the original.
5. As a result, selections are no longer in sync.
What a I doing wrong?