You can use QGraphicsScene::setSceneRect(QRectF),. It will set logical coordinates you want.
Ex : if your scene geomerty is 0,0, width , height
I think what you can do is :Qt Code:
scene->setSceneRect(0, heigh, width, -height);To copy to clipboard, switch view to plain text mode
Last edited by prasad_N; 4th January 2016 at 06:40.
Thanks :-)
Thank you for reply.
I tried, not working.
5.pngself.ui.graphicsView.scene = QtWidgets.QGraphicsScene()
self.ui.graphicsView.setScene(self.ui.graphicsView .scene)
self.ui.graphicsView.scene.setSceneRect(0, 650, 500, -650)
self.ui.graphicsView.setRenderHints(QPainter.Antia liasing)
path = QPainterPath()
path.moveTo(20.0, 20.0)
path.lineTo(50, 20)
path.moveTo(20.0, 20.0)
path.lineTo(20, 50)
self.ui.graphicsView.scene.addPath(path)
No more ways to do this?
You could try a transformation.
Translate to the bottom left point and scale with 1/-1
Cheers,
_
Do you have example how to do this?
Bookmarks