Home · All Classes · Modules

QPinchGesture Class Reference
[QtGui module]

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

Inherits QGesture.



Detailed Description

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

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 Programming document.

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 Qt.GestureUpdated state.

Type Documentation


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

Constant Value Description
QPinchGesture.ScaleFactorChanged 0x1 The scale factor held by scaleFactor changed.
QPinchGesture.RotationAngleChanged 0x2 The rotation angle held by rotationAngle changed.
QPinchGesture.CenterPointChanged 0x4 The center point held by centerPoint changed.

The ChangeFlags type is a typedef for QFlags<ChangeFlag>. It stores an OR combination of ChangeFlag values.

See also changeFlags and totalChangeFlags.

Method Documentation

QPinchGesture.__init__ (self, QObject parent = None)

The parent argument, if not None, causes self to be owned by Qt instead of PyQt.

QPointF QPinchGesture.centerPoint (self)

ChangeFlags QPinchGesture.changeFlags (self)

QPointF QPinchGesture.lastCenterPoint (self)

float QPinchGesture.lastRotationAngle (self)

float QPinchGesture.lastScaleFactor (self)

float QPinchGesture.rotationAngle (self)

float QPinchGesture.scaleFactor (self)

QPinchGesture.setCenterPoint (self, QPointF value)

QPinchGesture.setChangeFlags (self, ChangeFlags value)

QPinchGesture.setLastCenterPoint (self, QPointF value)

QPinchGesture.setLastRotationAngle (self, float value)

QPinchGesture.setLastScaleFactor (self, float value)

QPinchGesture.setRotationAngle (self, float value)

QPinchGesture.setScaleFactor (self, float value)

QPinchGesture.setStartCenterPoint (self, QPointF value)

QPinchGesture.setTotalChangeFlags (self, ChangeFlags value)

QPinchGesture.setTotalRotationAngle (self, float value)

QPinchGesture.setTotalScaleFactor (self, float value)

QPointF QPinchGesture.startCenterPoint (self)

ChangeFlags QPinchGesture.totalChangeFlags (self)

float QPinchGesture.totalRotationAngle (self)

float QPinchGesture.totalScaleFactor (self)

PyQt 4.12.1 for X11Copyright © Riverbank Computing Ltd and The Qt Company 2015Qt 4.8.7