April 2018
Beginner
714 pages
18h 21m
English
As soon as the scene's bounding rectangle exceeds the viewport's size, the view will show scroll bars. Besides using them with the mouse to navigate to a specific item or point on the scene, you can also access them by code. Since the view inherits QAbstractScrollArea, you can use all its functions for accessing the scroll bars; horizontalScrollBar() and verticalScrollBar() return a pointer to QScrollBar, and thus you can query their range with minimum() and maximum(). By invoking value() and setValue(), you get and can set the current value, which results in scrolling the scene.
However, normally, you do not need to control free scrolling inside the view from your source code. The normal task would be ...
Read now
Unlock full access