Focusing on item
-
This is not how the Qt Graphics Framework works (note the link, I'd strongly suggest giving it a read before starting to work with it).
You can't fix an item in the scene and let all the others move around. What you would do is having all the other items fixed and move that one item around.Keeping it centered on the scene is also not possible. all you can do is keeping it centered on the view. For stuff like
QGraphicsView::centerOn()
to work the viewport must actually be able to scroll. This means that if your scene is too small / your view to large (ignoring the scaling here) it won't move at all. You might want to play around in the 40000 Chips example to get a feeling what it means when the scene is moving and when the viewport is just too large to do any panning at all.
I assume that this explanation didn't help at all but increased confusion instead. It should be a lot clearer to you once you read the linked documentation and played around with some of the examples. -
Huge thanks for your support , i got one step forward to solving my problem thanks to your advices .