Reputation: 11
Let's say I have two images, image A and image B. Using QGraphicsScene and QGraphicsView, how can I draw image A to the background, and layer image B on top of image A?
Thanks in advance.
Upvotes: 1
Views: 2627
Reputation: 29390
If you have QGraphicsItems that you draw your images on you can use setZValue to set custom stack order.
If you only need background on the scene you can take advantage of scene layers, for example use backgroundBrush to change the background and then draw other things on top of that.
Upvotes: 3