can QGraphicsView hold several QGraphicsScenes at a time? or it's only true for QGraphicsItems?
can QGraphicsView hold several QGraphicsScenes at a time? or it's only true for QGraphicsItems?
QGraphicsView can't hold many QGraphicsScenes simultaneously.
And QGraphicsItems are related to QGraphicsScene not QGraphicsView.
The exact scenario is as follows:
- QGraphicsScene may contains single or multiple graphicsItems.
- One graphicsview can display only one graphicsscene at a time.
sincnarf (4th July 2007)
No, a QGraphicsView represents a single QGraphicsScene. You can adjust QGraphicsItem::zValue() if you want to make layers.
J-P Nurmi
sincnarf (4th July 2007)
Also, you can have multiples scenes in memory and change them in the GraphicsView
sincnarf (4th July 2007)
Technically it's possible to write a QGraphicsSceneItem, if you want multiple scenes inside the same view. If you don't mind skipping the scrollbars, you do have everything available in QGraphicsScene's API to make an item:
QGraphicsItem::boundingRect: returns anything suitable / a subscene rect.
QGraphicsItem:aint: calls QGraphicsScene::render().
We actually have a registered suggestion for such an item, and we might provide one for 4.4.
Bitto / Andreas Aardal Hanssen - andreas dot aardal dot hanssen at nokia
Nokia Software Manager, Qt Development
sincnarf (12th July 2007)
Bookmarks