The scroll event is sent to indicate that the receiver should be scrolled. Usually the receiver should be something visual like
Some care should be taken that no conflicting QScrollEvents are sent from two sources. Using
scrollTo is save however.
- class PySide6.QtGui.QScrollEvent(contentPos, overshoot, scrollState)#
Creates a new
contentPos is the new content position,
overshootDistance is the new overshoot distance while
scrollState indicates if this scroll event is the first one, the last one or some event in between.
This enum describes the states a scroll event can have.
Set for the first scroll event of a scroll activity.
Set for all but the first and the last scroll event of a scroll activity.
Set for the last scroll event of a scroll activity.
Returns the new scroll position.
Returns the new overshoot distance. See
QScroller for an explanation of the term overshoot.
Returns the current scroll state as a combination of ScrollStateFlag values.
ScrollFinished ) will be set, if this scroll event is the first (or last) event in a scrolling activity. Please note that both values can be set at the same time, if the activity consists of a single
QScrollEvent . All other scroll events in between will have their state set to
A widget could for example revert selections when scrolling is started and stopped.