can we add multiple QGraphicscene to QGraphicsView?
-
wrote on 11 May 2021, 06:21 last edited by
I have created a GUI application in which I have to add multiple scene having many QGraphicsItems in it.
Is there any possibility to add multiple QGraphicscene to QGraphicsview? or
If we add multiple QGraphicsview to Horizontal Layout it shows some gap inbetween each QGraphicsView. -
I have created a GUI application in which I have to add multiple scene having many QGraphicsItems in it.
Is there any possibility to add multiple QGraphicscene to QGraphicsview? or
If we add multiple QGraphicsview to Horizontal Layout it shows some gap inbetween each QGraphicsView.@Selvajothi
no its not directly possible. unless you duplicate all items from the scene into the other (which might not always be possible).If we add multiple QGraphicsview to Horizontal Layout it shows some gap inbetween each QGraphicsView.
remove the gap in the layout. using its margin/spacing/etc. properties
-
wrote on 11 May 2021, 08:49 last edited by
can we scale/resize both the view and the Graphicsitem ?
-
Hi,
Why multiple scene under a view ? It's usually the other way around, you have multiple views on top of a scene.
-
wrote on 11 May 2021, 09:03 last edited byThis post is deleted!
-
Hi,
Why multiple scene under a view ? It's usually the other way around, you have multiple views on top of a scene.
wrote on 11 May 2021, 09:05 last edited by@SGaist
I have multiple designs . I have to add multiple designs(made of QGraphicsItems) side by side like adding in horizontal layout. -
You can do that in one scene. Just put your items one beside the other. You can use QGraphicsItemGroup to keep those relevant together as a unit. If you want to then visualize each group separately use as many views as needed on top of that scene.
-
@SGaist
I have multiple designs . I have to add multiple designs(made of QGraphicsItems) side by side like adding in horizontal layout.wrote on 11 May 2021, 12:33 last edited by@Selvajothi
You could create one QGraphicsWidget per design, then arrange them into one scene using QGraphicsLinearLayout.
6/8