Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QGraphicsView reach outside scene
amsantosr last edited by amsantosr
I have a QGraphicsScene which I have added some rectangles. The QGraphicsView is able to display them with the horizontal and vertical scrollbars such that the view can only scroll to the leftmost/rightmost uppermost/lowermost rectangle. but i want the QGraphicsView to be able to scroll a distance far from the leftmost/rightmost, etc. How do I achieve that?
Pl45m4 last edited by Pl45m4
You need to enlarge your
QGraphicsViewjust the view of a specific part of your scene.
If you increase your scene's width and height, you can scroll to empty areas (where you dont have any rectangles)
amsantosr last edited by
Yes that worked, by using setSceneRect.