QPinchGesture

The QPinchGesture class describes a pinch gesture made by the user. More

Inheritance diagram of PySide6.QtWidgets.QPinchGesture

New in version 4.6.

Synopsis

Functions

Detailed Description

A pinch gesture is a form of touch user input in which the user typically touches two points on the input device with a thumb and finger, before moving them closer together or further apart to change the scale factor, zoom, or level of detail of the user interface.

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.

../../_images/pinchgesture.png

Instead of repeatedly applying the same pinching gesture, the user may continue to touch the input device in one place, and apply a second touch to a new point, continuing the gesture. When this occurs, gesture events will continue to be delivered to the target object, containing an instance of QPinchGesture in the GestureUpdated state.

class PySide6.QtWidgets.QPinchGesture([parent=None])
Parameters

parentPySide6.QtCore.QObject

PySide6.QtWidgets.QPinchGesture.ChangeFlag

This enum describes the changes that can occur to the properties of the gesture object.

Constant

Description

QPinchGesture.ScaleFactorChanged

The scale factor held by scaleFactor changed.

QPinchGesture.RotationAngleChanged

The rotation angle held by rotationAngle changed.

QPinchGesture.CenterPointChanged

The center point held by centerPoint changed.

PySide6.QtWidgets.QPinchGesture.centerPoint()
Return type

PySide6.QtCore.QPointF

See also

setCenterPoint()

PySide6.QtWidgets.QPinchGesture.changeFlags()
Return type

ChangeFlags

See also

setChangeFlags()

PySide6.QtWidgets.QPinchGesture.lastCenterPoint()
Return type

PySide6.QtCore.QPointF

PySide6.QtWidgets.QPinchGesture.lastRotationAngle()
Return type

float

PySide6.QtWidgets.QPinchGesture.lastScaleFactor()
Return type

float

PySide6.QtWidgets.QPinchGesture.rotationAngle()
Return type

float

PySide6.QtWidgets.QPinchGesture.scaleFactor()
Return type

float

See also

setScaleFactor()

PySide6.QtWidgets.QPinchGesture.setCenterPoint(value)
Parameters

valuePySide6.QtCore.QPointF

See also

centerPoint()

PySide6.QtWidgets.QPinchGesture.setChangeFlags(value)
Parameters

valueChangeFlags

See also

changeFlags()

PySide6.QtWidgets.QPinchGesture.setLastCenterPoint(value)
Parameters

valuePySide6.QtCore.QPointF

PySide6.QtWidgets.QPinchGesture.setLastRotationAngle(value)
Parameters

value – float

PySide6.QtWidgets.QPinchGesture.setLastScaleFactor(value)
Parameters

value – float

PySide6.QtWidgets.QPinchGesture.setRotationAngle(value)
Parameters

value – float

See also

rotationAngle()

PySide6.QtWidgets.QPinchGesture.setScaleFactor(value)
Parameters

value – float

See also

scaleFactor()

PySide6.QtWidgets.QPinchGesture.setStartCenterPoint(value)
Parameters

valuePySide6.QtCore.QPointF

PySide6.QtWidgets.QPinchGesture.setTotalChangeFlags(value)
Parameters

valueChangeFlags

PySide6.QtWidgets.QPinchGesture.setTotalRotationAngle(value)
Parameters

value – float

PySide6.QtWidgets.QPinchGesture.setTotalScaleFactor(value)
Parameters

value – float

PySide6.QtWidgets.QPinchGesture.startCenterPoint()
Return type

PySide6.QtCore.QPointF

PySide6.QtWidgets.QPinchGesture.totalChangeFlags()
Return type

ChangeFlags

PySide6.QtWidgets.QPinchGesture.totalRotationAngle()
Return type

float

PySide6.QtWidgets.QPinchGesture.totalScaleFactor()
Return type

float