Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to prevent QGraphicsView from re centering every time an item is added to the scene



  • Normally, when you add a new item to the scene, the view moves to the very center of all the items on the scene. How can I prevent this? In other words, I don't want the view to change at all when a new item is added to the scene?

    Thanks in advance!



  • Maybe this is connected to the sceneRect: Unless you set the sceneRect explicitly, it is automatically expanded every time you add an item.


Log in to reply