Qt-interest Archive, December 2006
Can I Overlay/Display Multiple QGraphicsScenes In One QGraphicsView?
Message 1 in thread
I'm writing something that displays multiple layers of QGraphicsItems in
one QGraphicsView. Each of these layers has distinct properties for how
to draw its QGraphicsItems, so I would like each layer to be its own
QGraphicsScene. I want to be able to overlay these scenes on top of
each other so all the items from all scenes are displayed in one view.
Is there a way to do this? I thought of just putting all the
QGraphicsItems from all layers into one scene - but I want to be able to
change all the items in one particular layer and leave all other items
alone. This corresponds perfectly with changing all the items in one
scene, but other items from other scenes are left alone. Displaying
scenes on top of each other seems like an obvious feature for the
graphics view framework, but I can't find documentation for it anywhere.
It looks like they specifically designed QGraphicsView to only be able
to view one scene, why? Am I overlooking something? Does anybody know
a better way of doing this? Any help would be greatly appreciated.
Chris
--
[ signature omitted ]