PinchArea QML Element

The PinchArea item enables simple pinch gesture handling. 更多...

继承: Item

特性

信号

详细描述

The PinchArea element 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 可以按 2 种方式使用:

另请参阅 PinchEvent .

特性文档编制

enabled : bool

This property holds whether the item accepts pinch gestures.

This property defaults to true.


pinch group

pinch.target : Item

pinch.active : bool

pinch.minimumScale : real

pinch.maximumScale : real

pinch.minimumRotation : real

pinch.maximumRotation : real

pinch.dragAxis : enumeration

pinch.minimumX : real

pinch.maximumX : real

pinch.minimumY : real

pinch.maximumY : real

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

  • pinch.target specifies the id of the item to drag.
  • pinch.active specifies if the target item is currently being dragged.
  • pinch.minimumScale and pinch.maximumScale limit the range of the Item::scale 特性。
  • pinch.minimumRotation and pinch.maximumRotation limit the range of the Item::rotation 特性。
  • pinch.dragAxis specifies whether dragging in not allowed ( Pinch.NoDrag ), can be done horizontally ( Pinch.XAxis ), vertically ( Pinch.YAxis ), or both ( Pinch.XandYAxis )
  • pinch.minimum and pinch.maximum limit how far the target can be dragged along the corresponding axes.

信号文档编制

onPinchFinished ()

This handler is called when the pinch area detects that a pinch gesture has finished.

The pinch parameter provides information about the pinch gesture, including the scale, center and angle of the pinch.


onPinchStarted ()

This handler is called when the pinch area detects that a pinch gesture has started.

The pinch parameter provides information about the pinch gesture, including the scale, center and angle of the pinch.

要忽略此手势设置 pinch.accepted property to false. The gesture will be cancelled and no further events will be sent.


onPinchUpdated ()

This handler is called 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.