开发者

How can I layer images in PyQt using QGraphicsScene and QGraphicsView

Let's say I have two images, image A and image B. Using QGraphicsScene and QGraphicsView, how can I draw image A to th开发者_JS百科e background, and layer image B on top of image A?

Thanks in advance.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜