Gesture

Gesture is an abstract base element of other gestures and interactions.

There are builtin recognizers for eight distinct gestures.

Two Gesture elements support implementing custom single- and multi-touch gestures.

property Bool enabled: true

True if the tap gesture is enabled, false otherwise. A disabled gesture behaves as if it wasn't there.

extension event Gesture.longPressed(Vec2 point)

An extension event that is emitted when a long pressed gesture is recognized on an item.

Rectangle {
    on Gesture.longPressed(point) {
        System.log("Long pressed at", point)
    }
}

This is a convenience event for rapid prototyping and is not configurable. For more flexibilty, you should use the full Gesture.LongPress gesture instead.

extension event Gesture.tapped(Vec2 point)

An extension event that is emitted when a tap gesture is recognized on an item.

Rectangle {
    on Gesture.tapped(point) {
        System.log("Tapped at", point)
    }
}

This is a convenience event for rapid prototyping and is not configurable. For more flexibilty, you should use the full Gesture.Tap gesture instead.