Skip to content

PythonQt.QtGui.QScrollEvent · declarations 001

Back to PythonQt.QtGui.QScrollEvent

ScrollFinished instance-attribute

ScrollFinished: Any

ScrollStarted instance-attribute

ScrollStarted: Any

ScrollState instance-attribute

ScrollState: type

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

ScrollUpdated instance-attribute

ScrollUpdated: Any

contentPos

contentPos() -> Any

X.contentPos() -> PythonQt.QtCore.QPointF

Supplemental documentation: Qt 5 reference:

QPointF QScrollEvent::contentPos() const

Returns the new scroll position.

Upstream PySide2 reference signatures (binding differences may apply):

contentPos(self) -> PySide2.QtCore.QPointF

Source: https://doc.qt.io/archives/qt-5.15/qscrollevent.html#contentPos

overshootDistance

overshootDistance() -> Any

X.overshootDistance() -> PythonQt.QtCore.QPointF

Supplemental documentation: Qt 5 reference:

QPointF QScrollEvent::overshootDistance() const

Returns the new overshoot distance. See QScroller for an explanation of the term overshoot.

See also QScroller.

Upstream PySide2 reference signatures (binding differences may apply):

overshootDistance(self) -> PySide2.QtCore.QPointF

Source: https://doc.qt.io/archives/qt-5.15/qscrollevent.html#overshootDistance

scrollState

scrollState() -> Any

X.scrollState()

Supplemental documentation: Qt 5 reference:

QScrollEvent::ScrollState QScrollEvent::scrollState() const

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.

Upstream PySide2 reference signatures (binding differences may apply):

scrollState(self) -> PySide2.QtGui.QScrollEvent.ScrollState

Source: https://doc.qt.io/archives/qt-5.15/qscrollevent.html#scrollState