I am visualizing some data in both a QTreeView and a QGraphicsView.
(No, the QGraphicsView does not use the QAbstractItemModel... yet.)
I want to keep the selections in sync.
Right now, I have connected to the respective selection changed signals, and update the other view's selection in the connectd slot.
This would lead to recursion, as updating one selection, causes a change in the other etc.
I protect against this 'manually': I set a bool flag to mark that I am already updating the selection and thus prevent endless updates.
Is there a better way to do it?
Regards
Christoph
Bookmarks