Solved QGraphicsView reach outside scene
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)
Yes that worked, by using setSceneRect.