[Solved]Qt QGraphicsItem - always in center of QGraphicsView
-
-
Sounds like you are not explicitly setting a sceneRect on your scene. If you do not explicitly set a scene rect then the QGV framework calculates one for you and with just one item it will appear as if that item is centered in the view.
Try calling QGraphicsScene::setSceneRect() with a suitable boundng rectangle.
If you wish to move an item with the mouse then you need to enable the QGraphicsItem::ItemIsMovable flag too.