QGraphicsSceneis a model for QGraphicsView. Just think if you need the model-view for something else, because if not, there is no point in implementing a model for the scene. In my case I wanted to show the object hierarchy using QTreeView and QGraphicsView at the same time, so I had no other choice but to implement a QAbstractItemModel subclass.
Yes, that's my intention too. I want to have a singular QAbstractItemModel interface to a multiplicity of views, including QAbstractItemView based views and the QGraphicsView. Which is why it kinda bothers me that its not naturally integrated already.
Last edited by travlr; 7th February 2008 at 21:57.
Bookmarks