Showing multiple scene/view at a same time
-
No its not satisfies my requirement. Im having one scene with the map, that I want to show it in background and another scene which contains other items, And my requirement is that I want to display both the map and other items at a same time with some transparency. So that all should be visible at the same time.
-
It might be possible in scene, but I will rather go for a QGraphicsObject, or QGraphicsItem or QGraphicsWidget subclass and play with its visible property. If you have more than one item which you intend to show on the proposed new scene, you can make them a group.
-
Im not telling its not possible to combine the items from both the scene and display. That is possible but I dont want to do, moreover its already there in my application(map and other items) and im able to see all the items nicely in the single view and scene.
Since I want to use the QGIS for the map loading, I have removed the map item from my application scene and using QGIS code to load the same. I have written sample code in QGIS( which uses Qt's GraphicsView concept internally) and I want to use same piece of code in my application to load the map. -
AFAIK, you can implement exactly what you want if you make your layer as a QGraphicsItem subclass. Otherwise, more than one view can show the same scene. You can keep the your qgis item on main scene, or use a new scene for it. And point the scene to the new view.
The view being a qwidget subclass itself, it must be possible to play with its background and transparency. Those methods however happen to be more messy than to my liking.
Thus, one scene can have many views. But not vice-versa, to the best of my understanding -
bq. The method what ever Ur telling Im not getting.
One scene can have many views. But not vice-versa. So you cannot have two or more scenes on the same view as per your requirement. At best you can switch, which is more easily implementable in QStackWidget, but that doesn;t serve you right.
For your exact requirement, which may be thought of as a layer(ala photoshop). One way of implementing it, is to have the items as QGraphicsItem subclass. But you are not ok with it.
The second way is to have another scene for your qgis, and create another view for it. It will be something similar to QMdiArea solution. Then for the graphics view widget, you can go for widget transparency method. However, those transparency tricks are troublesome according to me.