PinchArea QML Type | Qt Quick 6.7.3 (original) (raw)

Enables simple pinch gesture handling. More...

Import Statement: import QtQuick
Inherits: Item

Properties

Signals

Detailed Description

The PinchArea type was added in QtQuick 1.1

A PinchArea is an invisible item that is typically used in conjunction with a visible item in order to provide pinch gesture handling for that item.

The enabled property is used to enable and disable pinch handling for the proxied item. When disabled, the pinch area becomes transparent to mouse/touch events.

PinchArea can be used in two ways:

Since Qt 5.5, PinchArea can react to native pinch gesture events from the operating system if available; otherwise it reacts only to touch events.

See also PinchEvent, QNativeGestureEvent, and QTouchEvent.

Property Documentation

This property holds whether the item accepts pinch gestures.

This property defaults to true.

pinch group
pinch.active : bool [read-only]
pinch.dragAxis : enumeration
pinch.maximumRotation : real
pinch.maximumScale : real
pinch.maximumX : real
pinch.maximumY : real
pinch.minimumRotation : real
pinch.minimumScale : real
pinch.minimumX : real
pinch.minimumY : real
pinch.target : Item

pinch provides a convenient way to make an item react to pinch gestures.

Signal Documentation

This signal is emitted when the pinch area detects that a pinch gesture has finished.

The pinch parameter (not the same as the pinch property) provides information about the pinch gesture, including the scale, center and angle of the pinch.

Note: The corresponding handler is onPinchFinished.

This signal is emitted when the pinch area detects that a pinch gesture has started: two touch points (fingers) have been detected, and they have moved beyond the startDragDistance threshold for the gesture to begin.

The pinch parameter (not the same as the pinch property) provides information about the pinch gesture, including the scale, center and angle of the pinch. At the time of the pinchStarted signal, these values are reset to the default values, regardless of the results from previous gestures: pinch.scale will be 1.0 and pinch.rotation will be 0.0. As the gesture progresses, pinchUpdated will report the deviation from those defaults.

To ignore this gesture set the pinch.accepted property to false. The gesture will be canceled and no further events will be sent.

Note: The corresponding handler is onPinchStarted.

This signal is emitted when the pinch area detects that a pinch gesture has changed.

The pinch parameter provides information about the pinch gesture, including the scale, center and angle of the pinch. These values reflect changes only since the beginning of the current gesture, and therefore are not limited by the minimum and maximum limits in the pinch property.

Note: The corresponding handler is onPinchUpdated.

This signal is emitted when the pinch area detects a smart zoom gesture. This gesture occurs only on certain operating systems such as macOS.

The pinch parameter provides information about the pinch gesture, including the location where the gesture occurred. pinch.scale will be greater than zero when the gesture indicates that the user wishes to enter smart zoom, and zero when exiting (even though typically the same gesture is used to toggle between the two states).

Note: The corresponding handler is onSmartZoom.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.