How to put QGraphicsScene's (0,0) to top-left corner of QGraphicsView?
A:
QGraphicsScene
will be filled in the whole QGraphicsView
but You have the setSceneRect
function to choose the QGraphicsScene
part you want to see in the QGraphicsView
.
Patrice Bernassola
2009-11-16 09:46:37
i tried this method, but still can't get what i want.i call setSceneRect(0, 0, width, height) and point (0,0) of scene displays at the center(~) of GraphicsView.now i'm doing something like that:point = View.mapFromScene(QtCore.QPointF(0,0))obj.setPos(point.x(), point.y())
aluuu
2009-11-16 16:40:28
sorry for formatting, i'm novice here.
aluuu
2009-11-16 16:41:02
Scene is center in the view when view size is superior than scene size. So you need to manage scene size in function of view size in that case.
Patrice Bernassola
2009-11-16 20:07:32