1

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.

Calvin
  • 11
  • 2

1 Answers1

3

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.

kuanyui
  • 782
  • 13
  • 23
Davor Lucic
  • 28,970
  • 8
  • 66
  • 76
  • 1
    Three of your links are "reserved for customers" which I'm assuming wasn't the case when you answered. Please consider providing an example so that future visitors to this question will not have the same problem. – Frikster Feb 12 '16 at 11:48