tags:

views:

210

answers:

1

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
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
sorry for formatting, i'm novice here.
aluuu
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