Skip to content

PythonQt.QtGui.QScroller · declarations 001

Back to PythonQt.QtGui.QScroller

Dragging instance-attribute

Dragging: Any

Input instance-attribute

Input: 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

InputMove instance-attribute

InputMove: Any

InputPress instance-attribute

InputPress: Any

InputRelease instance-attribute

InputRelease: Any

LeftMouseButtonGesture instance-attribute

LeftMouseButtonGesture: Any

MiddleMouseButtonGesture instance-attribute

MiddleMouseButtonGesture: Any

Pressed instance-attribute

Pressed: Any

RightMouseButtonGesture instance-attribute

RightMouseButtonGesture: Any

ScrollerGestureType instance-attribute

ScrollerGestureType: 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

Scrolling instance-attribute

Scrolling: Any

TouchGesture instance-attribute

TouchGesture: Any

activeScrollers

activeScrollers() -> tuple

X.activeScrollers() -> tuple

Supplemental documentation: Qt 5 reference:

[static] QList\<QScroller *> QScroller::activeScrollers()

Returns an application wide list of currently active QScroller objects. Active QScroller objects are in a state() that is not QScroller::Inactive. This function is useful when writing your own gesture recognizer.

Upstream PySide2 reference signatures (binding differences may apply):

activeScrollers() -> typing.List[PySide2.QtWidgets.QScroller]

Source: https://doc.qt.io/archives/qt-5.15/qscroller.html#activeScrollers

destroyed

destroyed(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QScroller.destroyed; argument details are not documented.

ensureVisible

ensureVisible(rect: Any, xmargin: float, ymargin: float, scrollTime: Any) -> None

X.ensureVisible(rect, xmargin, ymargin, scrollTime)

Supplemental documentation: Qt 5 reference:

[slot] void QScroller::ensureVisible(const QRectF \&rect, qreal xmargin, qreal ymargin, int scrollTime)

This is an overloaded function.

This version will reach its destination position in scrollTime milliseconds.

[slot] void QScroller::ensureVisible(const QRectF \&rect, qreal xmargin, qreal ymargin)

Starts scrolling so that the rectangle rect is visible inside the viewport with additional margins specified in pixels by xmargin and ymargin around the rect.

In cases where it is not possible to fit the rect plus margins inside the viewport the contents are scrolled so that as much as possible is visible from rect.

The scrolling speed is calculated so that the given position is reached after a platform-defined time span.

This function performs the actual scrolling by calling scrollTo().

See also scrollTo().

Upstream PySide2 reference signatures (binding differences may apply):

ensureVisible(self, rect: PySide2.QtCore.QRectF, xmargin: float, ymargin: float) -> None
ensureVisible(self, rect: PySide2.QtCore.QRectF, xmargin: float, ymargin: float, scrollTime: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qscroller.html#ensureVisible

finalPosition

finalPosition() -> Any

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

Supplemental documentation: Qt 5 reference:

QPointF QScroller::finalPosition() const

Returns the estimated final position for the current scroll movement. Returns the current position if the scroller state is not Scrolling. The result is undefined when the scroller state is Inactive.

The target position is in pixel.

See also pixelPerMeter() and scrollTo().

Upstream PySide2 reference signatures (binding differences may apply):

finalPosition(self) -> PySide2.QtCore.QPointF

Source: https://doc.qt.io/archives/qt-5.15/qscroller.html#finalPosition

grabGesture

grabGesture(target: Any, gestureType: Any) -> Any

X.grabGesture(target, gestureType)

Supplemental documentation: Qt 5 reference:

[static] Qt::GestureType QScroller::grabGesture(QObject *target, QScroller::ScrollerGestureType scrollGestureType \= TouchGesture)

Registers a custom scroll gesture recognizer, grabs it for the target and returns the resulting gesture type. If scrollGestureType is set to TouchGesture the gesture triggers on touch events. If it is set to one of LeftMouseButtonGesture, RightMouseButtonGesture or MiddleMouseButtonGesture it triggers on mouse events of the corresponding button.

Only one scroll gesture can be active on a single object at the same time. If you call this function twice on the same object, it will ungrab the existing gesture before grabbing the new one.

Note: To avoid unwanted side-effects, mouse events are consumed while the gesture is triggered. Since the initial mouse press event is not consumed, the gesture sends a fake mouse release event at the global position (INT_MIN, INT_MIN). This ensures that internal states of the widget that received the original mouse press are consistent.

See also ungrabGesture() and grabbedGesture().

Upstream PySide2 reference signatures (binding differences may apply):

grabGesture(target: PySide2.QtCore.QObject, gestureType: PySide2.QtWidgets.QScroller.ScrollerGestureType=...) -> PySide2.QtCore.Qt.GestureType

Source: https://doc.qt.io/archives/qt-5.15/qscroller.html#grabGesture

grabbedGesture

grabbedGesture(target: Any) -> Any

X.grabbedGesture(target)

Supplemental documentation: Qt 5 reference:

[static] Qt::GestureType QScroller::grabbedGesture(QObject *target)

Returns the gesture type currently grabbed for the target or 0 if no gesture is grabbed.

See also grabGesture() and ungrabGesture().

Upstream PySide2 reference signatures (binding differences may apply):

grabbedGesture(target: PySide2.QtCore.QObject) -> PySide2.QtCore.Qt.GestureType

Source: https://doc.qt.io/archives/qt-5.15/qscroller.html#grabbedGesture

handleInput

handleInput(input: Any, position: Any, timestamp: int) -> bool

X.handleInput(input, position, timestamp) -> bool

Supplemental documentation: Qt 5 reference:

bool QScroller::handleInput(QScroller::Input input, const QPointF \&position, qint64 timestamp \= 0)

This function is used by gesture recognizers to inform the scroller about a new input event. The scroller changes its internal state() according to the input event and its attached scroller properties. The scroller doesn't distinguish between the kind of input device the event came from. Therefore the event needs to be split into the input type, a position and a milli-second timestamp. The position needs to be in the target's coordinate system.

The return value is true if the event should be consumed by the calling filter or false if the event should be forwarded to the control.

Note: Using grabGesture() should be sufficient for most use cases.

Upstream PySide2 reference signatures (binding differences may apply):

handleInput(self, input: PySide2.QtWidgets.QScroller.Input, position: PySide2.QtCore.QPointF, timestamp: int=...) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qscroller.html#handleInput

hasScroller

hasScroller(target: Any) -> bool

X.hasScroller(target) -> bool

Supplemental documentation: Qt 5 reference:

[static] bool QScroller::hasScroller(QObject *target)

Returns true if a QScroller object was already created for target; false otherwise.

See also scroller().

Upstream PySide2 reference signatures (binding differences may apply):

hasScroller(target: PySide2.QtCore.QObject) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qscroller.html#hasScroller

objectNameChanged

objectNameChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QScroller.objectNameChanged; argument details are not documented.

pixelPerMeter

pixelPerMeter() -> Any

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

Supplemental documentation: Qt 5 reference:

QPointF QScroller::pixelPerMeter() const

Returns the pixel per meter metric for the scrolled widget.

The value is reported for both the x and y axis separately by using a QPointF.

Note: Please note that this value should be physically correct. The actual DPI settings that Qt returns for the display may be reported wrongly on purpose by the underlying windowing system, for example on macOS.

Upstream PySide2 reference signatures (binding differences may apply):

pixelPerMeter(self) -> PySide2.QtCore.QPointF

Source: https://doc.qt.io/archives/qt-5.15/qscroller.html#pixelPerMeter

resendPrepareEvent

resendPrepareEvent() -> None

X.resendPrepareEvent()

Supplemental documentation: Qt 5 reference:

[slot] void QScroller::resendPrepareEvent()

This function resends the QScrollPrepareEvent. Calling resendPrepareEvent triggers a QScrollPrepareEvent from the scroller. This allows the receiver to re-set content position and content size while scrolling. Calling this function while in the Inactive state is useless as the prepare event is sent again before scrolling starts.

Upstream PySide2 reference signatures (binding differences may apply):

resendPrepareEvent(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qscroller.html#resendPrepareEvent

scrollTo

scrollTo(pos: Any, scrollTime: Any) -> None

X.scrollTo(pos, scrollTime)

Supplemental documentation: Qt 5 reference:

[slot] void QScroller::scrollTo(const QPointF \&pos, int scrollTime)

This is an overloaded function.

This version will reach its destination position in scrollTime milliseconds.

[slot] void QScroller::scrollTo(const QPointF \&pos)

Starts scrolling the widget so that point pos is at the top-left position in the viewport.

The behaviour when scrolling outside the valid scroll area is undefined. In this case the scroller might or might not overshoot.

The scrolling speed will be calculated so that the given position will be reached after a platform-defined time span.

pos is given in viewport coordinates.

See also ensureVisible().

Upstream PySide2 reference signatures (binding differences may apply):

scrollTo(self, pos: PySide2.QtCore.QPointF) -> None
scrollTo(self, pos: PySide2.QtCore.QPointF, scrollTime: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qscroller.html#scrollTo

scroller

scroller(target: Any) -> Any

X.scroller(target) -> PythonQt.QtGui.QScroller

Supplemental documentation: Qt 5 reference:

[static] QScroller *QScroller::scroller(QObject *target)

Returns the scroller for the given target. As long as the object exists this function will always return the same QScroller instance. If no QScroller exists for the target, one will implicitly be created. At no point more than one QScroller will be active on an object.

See also hasScroller() and target().

[static] const QScroller *QScroller::scroller(const QObject *target)

This is an overloaded function.

This is the const version of scroller().

Upstream PySide2 reference signatures (binding differences may apply):

scroller(target: PySide2.QtCore.QObject) -> PySide2.QtWidgets.QScroller

Source: https://doc.qt.io/archives/qt-5.15/qscroller.html#scroller

scrollerProperties instance-attribute

scrollerProperties: QScrollerProperties

Qt 5 reference:

scrollerProperties : QScrollerProperties

This property holds the scroller properties of this scroller. The properties are used by the QScroller to determine its scrolling behavior.

Access functions:

QScrollerProperties scrollerProperties() const
void setScrollerProperties(const QScrollerProperties \&prop)

Notifier signal:

void scrollerPropertiesChanged(const QScrollerProperties \&newProperties)

Source: https://doc.qt.io/archives/qt-5.15/qscroller.html#scrollerProperties

scrollerPropertiesChanged

scrollerPropertiesChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QScroller.scrollerPropertiesChanged; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QScroller::scrollerPropertiesChanged(const QScrollerProperties \&newProperties)

QScroller emits this signal whenever its scroller properties change. newProperties are the new scroller properties.

Note: Notifier signal for property scrollerProperties.

See also scrollerProperties.

Source: https://doc.qt.io/archives/qt-5.15/qscroller.html#scrollerPropertiesChanged

setScrollerProperties

setScrollerProperties(prop: Any) -> None

X.setScrollerProperties(prop)

Upstream PySide2 reference signatures (binding differences may apply):

setScrollerProperties(self, prop: PySide2.QtWidgets.QScrollerProperties) -> None

Source: https://doc.qt.io/archives/qt-5.15/qscroller.html#setScrollerProperties

setSnapPositionsX

setSnapPositionsX(first: Any, interval: Any) -> None

X.setSnapPositionsX(first, interval)

Supplemental documentation: Qt 5 reference:

void QScroller::setSnapPositionsX(const QList\<qreal> \&positions)

Set the snap positions for the horizontal axis to a list of positions. This overwrites all previously set snap positions and also a previously set snapping interval. Snapping can be deactivated by setting an empty list of positions.

void QScroller::setSnapPositionsX(qreal first, qreal interval)

Set the snap positions for the horizontal axis to regular spaced intervals. The first snap position is at first. The next at first + interval. This can be used to implement a list header. This overwrites all previously set snap positions and also a previously set snapping interval. Snapping can be deactivated by setting an interval of 0.0

Upstream PySide2 reference signatures (binding differences may apply):

setSnapPositionsX(self, first: float, interval: float) -> None
setSnapPositionsX(self, positions: typing.Sequence[float]) -> None

Source: https://doc.qt.io/archives/qt-5.15/qscroller.html#setSnapPositionsX

setSnapPositionsY

setSnapPositionsY(first: Any, interval: Any) -> None

X.setSnapPositionsY(first, interval)

Supplemental documentation: Qt 5 reference:

void QScroller::setSnapPositionsY(const QList\<qreal> \&positions)

Set the snap positions for the vertical axis to a list of positions. This overwrites all previously set snap positions and also a previously set snapping interval. Snapping can be deactivated by setting an empty list of positions.

void QScroller::setSnapPositionsY(qreal first, qreal interval)

Set the snap positions for the vertical axis to regular spaced intervals. The first snap position is at first. The next at first + interval. This overwrites all previously set snap positions and also a previously set snapping interval. Snapping can be deactivated by setting an interval of 0.0

Upstream PySide2 reference signatures (binding differences may apply):

setSnapPositionsY(self, first: float, interval: float) -> None
setSnapPositionsY(self, positions: typing.Sequence[float]) -> None

Source: https://doc.qt.io/archives/qt-5.15/qscroller.html#setSnapPositionsY

state instance-attribute

state: Any

Qt 5 reference:

state : const State

This property holds the state of the scroller

Access functions:

QScroller::State state() const

Notifier signal:

void stateChanged(QScroller::State newState)

See also QScroller::State.

Source: https://doc.qt.io/archives/qt-5.15/qscroller.html#state

stateChanged

stateChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QScroller.stateChanged; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QScroller::stateChanged(QScroller::State newState)

QScroller emits this signal whenever the state changes. newState is the new State.

Note: Notifier signal for property state.

See also state.

Source: https://doc.qt.io/archives/qt-5.15/qscroller.html#stateChanged

stop

stop() -> None

X.stop()

Supplemental documentation: Qt 5 reference:

void QScroller::stop()

Stops the scroller and resets its state back to Inactive.

Upstream PySide2 reference signatures (binding differences may apply):

stop(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qscroller.html#stop

target

target() -> Any

X.target() -> PythonQt.private.QObject

Supplemental documentation: Qt 5 reference:

QObject *QScroller::target() const

Returns the target object of this scroller.

See also hasScroller() and scroller().

Upstream PySide2 reference signatures (binding differences may apply):

target(self) -> PySide2.QtCore.QObject

Source: https://doc.qt.io/archives/qt-5.15/qscroller.html#target

ungrabGesture

ungrabGesture(target: Any) -> None

X.ungrabGesture(target)

Supplemental documentation: Qt 5 reference:

[static] void QScroller::ungrabGesture(QObject *target)

Ungrabs the gesture for the target. Does nothing if no gesture is grabbed.

See also grabGesture() and grabbedGesture().

Upstream PySide2 reference signatures (binding differences may apply):

ungrabGesture(target: PySide2.QtCore.QObject) -> None

Source: https://doc.qt.io/archives/qt-5.15/qscroller.html#ungrabGesture

velocity

velocity() -> Any

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

Supplemental documentation: Qt 5 reference:

QPointF QScroller::velocity() const

Returns the current scrolling velocity in meter per second when the state is Scrolling or Dragging. Returns a zero velocity otherwise.

The velocity is reported for both the x and y axis separately by using a QPointF.

See also pixelPerMeter().

Upstream PySide2 reference signatures (binding differences may apply):

velocity(self) -> PySide2.QtCore.QPointF

Source: https://doc.qt.io/archives/qt-5.15/qscroller.html#velocity