QGraphicsScene, Fixed sceneRect, Prevent resizing
General and Desktop
4
Posts
2
Posters
2.3k
Views
1
Watching
-
In the QGraphicsScene, is it possible to fix the sceneRect to prevent growing it when an item is added.
For example suppose I have a view with size of 300*120px. I want the scene to be exactly fit in the view with no scroll.
How can i do that? -
Just "setSceneRect":http://qt-project.org/doc/qt-5/qgraphicsscene.html#sceneRect-prop .
-
That's right, but when user moves items around the scene, the sceneRect changes automatically.