|  | Home · All Classes · Modules

# QPinchGesture Class Reference
[QtGui module]

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

Inherits QGesture.

### Types

- enum ChangeFlag { ScaleFactorChanged, RotationAngleChanged, CenterPointChanged }
- class ChangeFlags

### Methods

- __init__ (self, QObject parent = None)
- QPointF centerPoint (self)
- ChangeFlags changeFlags (self)
- QPointF lastCenterPoint (self)
- float lastRotationAngle (self)
- float lastScaleFactor (self)
- float rotationAngle (self)
- float scaleFactor (self)
- setCenterPoint (self, QPointF)
- setChangeFlags (self, ChangeFlags)
- setLastCenterPoint (self, QPointF)
- setLastRotationAngle (self, float)
- setLastScaleFactor (self, float)
- setRotationAngle (self, float)
- setScaleFactor (self, float)
- setStartCenterPoint (self, QPointF)
- setTotalChangeFlags (self, ChangeFlags)
- setTotalRotationAngle (self, float)
- setTotalScaleFactor (self, float)
- QPointF startCenterPoint (self)
- ChangeFlags totalChangeFlags (self)
- float totalRotationAngle (self)
- float totalScaleFactor (self)

## Detailed Description

The QPinchGesture class describes a pinch gesture made my 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.

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

### QPinchGesture.ChangeFlag

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)

### QPinchGesture.setChangeFlags (self, ChangeFlags)

### QPinchGesture.setLastCenterPoint (self, QPointF)

### QPinchGesture.setLastRotationAngle (self, float)

### QPinchGesture.setLastScaleFactor (self, float)

### QPinchGesture.setRotationAngle (self, float)

### QPinchGesture.setScaleFactor (self, float)

### QPinchGesture.setStartCenterPoint (self, QPointF)

### QPinchGesture.setTotalChangeFlags (self, ChangeFlags)

### QPinchGesture.setTotalRotationAngle (self, float)

### QPinchGesture.setTotalScaleFactor (self, float)

### QPointF QPinchGesture.startCenterPoint (self)

### ChangeFlags QPinchGesture.totalChangeFlags (self)

### float QPinchGesture.totalRotationAngle (self)

### float QPinchGesture.totalScaleFactor (self)