QPinchGesture#
The QPinchGesture
class describes a pinch gesture made by the user. More…
New in version 4.6.
Synopsis#
Properties#
centerPoint
- The current center pointchangeFlags
- The property of the gesture that has changed in the current steplastCenterPoint
- The last position of the center point recorded for this gesturelastRotationAngle
- The last reported angle covered by the gesture motionlastScaleFactor
- The last scale factor recorded for this gesturerotationAngle
- The angle covered by the gesture motionscaleFactor
- The current scale factorstartCenterPoint
- The starting position of the center pointtotalChangeFlags
- The property of the gesture that has changetotalRotationAngle
- The total angle covered by the gesturetotalScaleFactor
- The total scale factor
Functions#
def
centerPoint
()def
changeFlags
()def
lastCenterPoint
()def
lastRotationAngle
()def
lastScaleFactor
()def
rotationAngle
()def
scaleFactor
()def
setCenterPoint
(value)def
setChangeFlags
(value)def
setLastCenterPoint
(value)def
setLastRotationAngle
(value)def
setLastScaleFactor
(value)def
setRotationAngle
(value)def
setScaleFactor
(value)def
setStartCenterPoint
(value)def
setTotalChangeFlags
(value)def
setTotalRotationAngle
(value)def
setTotalScaleFactor
(value)def
startCenterPoint
()def
totalChangeFlags
()def
totalRotationAngle
()def
totalScaleFactor
()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
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.
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.
See also
- class PySide6.QtWidgets.QPinchGesture([parent=None])#
- Parameters:
parent –
PySide6.QtCore.QObject
Note
Properties can be used directly when from __feature__ import true_property
is used or via accessor functions otherwise.
- property PᅟySide6.QtWidgets.QPinchGesture.centerPoint: PySide6.QtCore.QPointF#
This property holds the current center point.
The center point is the midpoint between the two input points in the gesture.
See also
- Access functions:
centerPoint
()setCenterPoint
(value)
- property PᅟySide6.QtWidgets.QPinchGesture.changeFlags: ChangeFlags#
This property holds the property of the gesture that has changed in the current step.
This property indicates which of the other properties has changed since the previous gesture event included information about this gesture. You can use this information to determine which aspect of your user interface needs to be updated.
- Access functions:
changeFlags
()setChangeFlags
(value)
- property PᅟySide6.QtWidgets.QPinchGesture.lastCenterPoint: PySide6.QtCore.QPointF#
This property holds the last position of the center point recorded for this gesture.
See also
- Access functions:
setLastCenterPoint
(value)
- property PᅟySide6.QtWidgets.QPinchGesture.lastRotationAngle: float#
This property holds the last reported angle covered by the gesture motion.
The last rotation angle is the angle as reported in the rotationAngle
property when a previous gesture event was delivered for this gesture.
See also
- Access functions:
setLastRotationAngle
(value)
- property PᅟySide6.QtWidgets.QPinchGesture.lastScaleFactor: float#
This property holds the last scale factor recorded for this gesture.
The last scale factor contains the scale factor reported in the scaleFactor
property when a previous gesture event included information about 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 zero.
See also
- Access functions:
setLastScaleFactor
(value)
- property PᅟySide6.QtWidgets.QPinchGesture.rotationAngle: float#
This property holds the angle covered by the gesture motion.
See also
- Access functions:
setRotationAngle
(value)
- property PᅟySide6.QtWidgets.QPinchGesture.scaleFactor: float#
This property holds the current scale factor.
The scale factor measures the scale factor associated with the distance between two of the user’s inputs on a touch device.
See also
- Access functions:
scaleFactor
()setScaleFactor
(value)
- property PᅟySide6.QtWidgets.QPinchGesture.startCenterPoint: PySide6.QtCore.QPointF#
This property holds the starting position of the center point.
See also
- Access functions:
setStartCenterPoint
(value)
- property PᅟySide6.QtWidgets.QPinchGesture.totalChangeFlags: ChangeFlags#
This property holds the property of the gesture that has change.
This property indicates which of the other properties has changed since the gesture has started. You can use this information to determine which aspect of your user interface needs to be updated.
See also
- Access functions:
setTotalChangeFlags
(value)
- property PᅟySide6.QtWidgets.QPinchGesture.totalRotationAngle: float#
This property holds the total angle covered by the gesture.
This total angle measures the complete angle covered by the gesture. Usually, this is equal to the value held by the rotationAngle
property, except in the case where the user performs multiple rotations by removing and repositioning one of the touch points, as described above. In this case, the total angle will be the sum of the rotation angles for the multiple stages of the gesture.
See also
- Access functions:
setTotalRotationAngle
(value)
- property PᅟySide6.QtWidgets.QPinchGesture.totalScaleFactor: float#
This property holds the total scale factor.
The total scale factor measures the total change in scale factor from the original value to the current scale factor.
See also
- Access functions:
setTotalScaleFactor
(value)
- PySide6.QtWidgets.QPinchGesture.ChangeFlag#
(inherits enum.Flag
) 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.See also
- PySide6.QtWidgets.QPinchGesture.centerPoint()#
- Return type:
See also
Getter of property centerPoint
.
- PySide6.QtWidgets.QPinchGesture.changeFlags()#
- Return type:
ChangeFlags
See also
- PySide6.QtWidgets.QPinchGesture.lastCenterPoint()#
- Return type:
See also
Getter of property lastCenterPoint
.
- PySide6.QtWidgets.QPinchGesture.lastRotationAngle()#
- Return type:
float
See also
Getter of property lastRotationAngle
.
- PySide6.QtWidgets.QPinchGesture.lastScaleFactor()#
- Return type:
float
See also
Getter of property lastScaleFactor
.
- PySide6.QtWidgets.QPinchGesture.rotationAngle()#
- Return type:
float
See also
Getter of property rotationAngle
.
- PySide6.QtWidgets.QPinchGesture.scaleFactor()#
- Return type:
float
See also
Getter of property scaleFactor
.
- PySide6.QtWidgets.QPinchGesture.setCenterPoint(value)#
- Parameters:
value –
PySide6.QtCore.QPointF
See also
Setter of property centerPoint
.
- PySide6.QtWidgets.QPinchGesture.setChangeFlags(value)#
- Parameters:
value –
ChangeFlags
See also
- PySide6.QtWidgets.QPinchGesture.setLastCenterPoint(value)#
- Parameters:
value –
PySide6.QtCore.QPointF
See also
Setter of property lastCenterPoint
.
- PySide6.QtWidgets.QPinchGesture.setLastRotationAngle(value)#
- Parameters:
value – float
See also
Setter of property lastRotationAngle
.
- PySide6.QtWidgets.QPinchGesture.setLastScaleFactor(value)#
- Parameters:
value – float
See also
Setter of property lastScaleFactor
.
- PySide6.QtWidgets.QPinchGesture.setRotationAngle(value)#
- Parameters:
value – float
See also
Setter of property rotationAngle
.
- PySide6.QtWidgets.QPinchGesture.setScaleFactor(value)#
- Parameters:
value – float
See also
Setter of property scaleFactor
.
- PySide6.QtWidgets.QPinchGesture.setStartCenterPoint(value)#
- Parameters:
value –
PySide6.QtCore.QPointF
See also
Setter of property startCenterPoint
.
- PySide6.QtWidgets.QPinchGesture.setTotalChangeFlags(value)#
- Parameters:
value –
ChangeFlags
See also
- PySide6.QtWidgets.QPinchGesture.setTotalRotationAngle(value)#
- Parameters:
value – float
See also
Setter of property totalRotationAngle
.
- PySide6.QtWidgets.QPinchGesture.setTotalScaleFactor(value)#
- Parameters:
value – float
See also
Setter of property totalScaleFactor
.
- PySide6.QtWidgets.QPinchGesture.startCenterPoint()#
- Return type:
See also
Getter of property startCenterPoint
.
- PySide6.QtWidgets.QPinchGesture.totalChangeFlags()#
- Return type:
ChangeFlags
See also
- PySide6.QtWidgets.QPinchGesture.totalRotationAngle()#
- Return type:
float
See also
Getter of property totalRotationAngle
.
- PySide6.QtWidgets.QPinchGesture.totalScaleFactor()#
- Return type:
float
See also
Getter of property totalScaleFactor
.