Using a QGraphicsView as the viewport for a (different) QGraphicsView?
Should this work?
Perhaps there is a better solution to what I wish to do: using a QGraphicsScene, I will draw a bunch of polygons (actually a map) and wish to overlay information on top of this using a different QGraphicsScene so that the user may zoom the map without affecting the scale of the overlayed information.
My naive approach of simply using the "map" QGraphicsView to draw the background on the "overlay" QGraphicsView (similar to how drawing a background with OpenGL functions) doesn't work. Any suggestions?
have you seen the Chips demo that ships with Qt SDK ... you have a scene and multiple views using it
I think meejah wants to overlay items over his map, that don't scale or transform with the map itself. So, that is not about multiple views on the same scene, but about overlaying items. Did I get that right?
Did you look into the different GraphicsItemFlags? There are flags for marking an item to ignore transformations...
Thanks Andre, yes that is what I want to do.
What I needed is exactly what QGraphicsItem::ItemIgnoresTransformations provides, namely ignoring scale.