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
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.