Hi. I've got a model/view architecture with several custom QTreeView / QTableView views and I'd like to add a QGraphicsView of this model also. My approach was to subclass QAbstractItemView, adding a QGraphicsScene and QGraphicsView to this class. Any updates to the model will then add/modify the associated QGraphicsItems in the graphics scene.
I'm just starting out on this part, and the problem is that I can't get the QAbstractItemView viewport to properly display the QGraphicsView. My QGraphicsView is constructed with the QAbstractItemView as a parent widget, and then I setViewport(graphicsview). The graphics view is displayed in the QAbstractItemView window, but as a small rect in the upper corner. If I scale the GraphicsView it changes in size, but scrolling doesn't work. If I resize the window, the graphicsview doesn't resize or scroll. What am I missing here?
Bookmarks