如何在QGraphicsScene上方绘制一条线

时间:2014-01-21 19:19:16

标签: qt qt4

实际上我正在编写一个在QGraphicsScene“内部”移动的尺度:

QPixmap scale("./images/skala.xpm");
pScene = new QGraphicsScene(this);
Label = new QGraphicsView();
pScene->addPixmap(scale);
pScene->setSceneRect(ScalePos_X, ScalePos_Y, ScaleWidth, ScaleHeight);
Label->setScene(pScene);
Label->show();

移动是通过setSceneRect()完成的。

现在我想绘制一个固定的中间线,标记比例的中间(pScene的中间)。 我可以在QGraphicsScene中画一条线,但这条线在移动场景时移动(逻辑上)

是否有可能以某种方式画出一条关于QGraphicsScene的线?

0 个答案:

没有答案
相关问题