开发者

How to add a QPixmap to QGraphicsView that is static?

hope someone of you can help me. I have a QGraphicsView, that is displaying a jpeg. The jpeg is much bigger than the QGraphicsView, so you can drag the jpeg (with the mouse). Over that jpeg I want to add a QPixmap. But this QPixmap needs to be static. If I move the jpeg, the开发者_运维知识库 QPixmap needs to always on the same position. With a QLabel that has only text, it isn't a problem. But if I set a QPixmap to the QLabel, it isn't displayed. How can I solve my problem? Does anyone have an idea?

Best, Oli


You may try to subclass QGraphicsScene and reimplement drawBackground method to display your static QPixmap.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜