PySide6.QtGui.QScrollEvent¶
- class QScrollEvent¶
- The - QScrollEventclass is sent when scrolling. More…- Synopsis¶- Methods¶- def - __init__()
- def - contentPos()
- def - scrollState()
 - Note - This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE - Detailed Description¶- The scroll event is sent to indicate that the receiver should be scrolled. Usually the receiver should be something visual like QWidget or QGraphicsObject. - Some care should be taken that no conflicting QScrollEvents are sent from two sources. Using QScroller::scrollTo is save however. - See also - class ScrollState¶
- This enum describes the states a scroll event can have. - Constant - Description - QScrollEvent.ScrollStarted - Set for the first scroll event of a scroll activity. - QScrollEvent.ScrollUpdated - Set for all but the first and the last scroll event of a scroll activity. - QScrollEvent.ScrollFinished - Set for the last scroll event of a scroll activity. - See also 
 - __init__(arg__1)¶
- Parameters:
- arg__1 – - QScrollEvent
 
 - __init__(contentPos, overshoot, scrollState)
- Parameters:
- contentPos – - QPointF
- overshoot – - QPointF
- scrollState – - ScrollState
 
 
 - Creates a new - QScrollEvent- contentPosis the new content position,- overshootDistanceis the new overshoot distance while- scrollStateindicates if this scroll event is the first one, the last one or some event in between.- Returns the new scroll position. - Returns the new overshoot distance. See QScroller for an explanation of the term overshoot. - See also - scrollState()¶
- Return type:
 
 - Returns the current scroll state as a combination of ScrollStateFlag values. - ScrollStarted(or- 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- ScrollUpdated.- A widget could for example revert selections when scrolling is started and stopped.