QPanGesture

The QPanGesture class describes a panning gesture made by the user. More

Inheritance diagram of PySide2.QtWidgets.QPanGesture

New in version 4.6.

Synopsis

Functions

Detailed Description

../../_images/pangesture.png

For an overview of gesture handling in Qt and information on using gestures in your applications, see the Gestures in Widgets and Graphics View document.

class PySide2.QtWidgets.QPanGesture([parent=None])
Parameters:

parentPySide2.QtCore.QObject

PySide2.QtWidgets.QPanGesture.acceleration()
Return type:

float

This property holds the acceleration in the motion of the touch point for this gesture.

PySide2.QtWidgets.QPanGesture.delta()
Return type:

PySide2.QtCore.QPointF

This property holds the offset from the previous input position to the current input.

This is essentially the same as the difference between offset() and lastOffset() .

PySide2.QtWidgets.QPanGesture.lastOffset()
Return type:

PySide2.QtCore.QPointF

This property holds the last offset recorded for this gesture.

The last offset contains the change in position of the user’s input as reported in the offset property when a previous gesture event was delivered for this gesture.

If no previous event was delivered with information about this gesture (i.e., this gesture object contains information about the first movement in the gesture) then this property contains a zero size.

PySide2.QtWidgets.QPanGesture.offset()
Return type:

PySide2.QtCore.QPointF

This property holds the total offset from the first input position to the current input position.

The offset measures the total change in position of the user’s input covered by the gesture on the input device.

PySide2.QtWidgets.QPanGesture.setAcceleration(value)
Parameters:

value – float

This property holds the acceleration in the motion of the touch point for this gesture.

PySide2.QtWidgets.QPanGesture.setLastOffset(value)
Parameters:

valuePySide2.QtCore.QPointF

This property holds the last offset recorded for this gesture.

The last offset contains the change in position of the user’s input as reported in the offset property when a previous gesture event was delivered for this gesture.

If no previous event was delivered with information about this gesture (i.e., this gesture object contains information about the first movement in the gesture) then this property contains a zero size.

PySide2.QtWidgets.QPanGesture.setOffset(value)
Parameters:

valuePySide2.QtCore.QPointF

This property holds the total offset from the first input position to the current input position.

The offset measures the total change in position of the user’s input covered by the gesture on the input device.