En esta página

eventPoint QML Type

Equivalente en QML para QEventPoint. Más...

Import Statement: import QtQuick
In C++: QEventPoint

Descripción detallada

eventPoint es la representación del tipo de valor QML de « QEventPoint ». Tiene las mismas propiedades que « QEventPoint ».

Están disponibles las siguientes propiedades:

El estado defiende los siguientes valores:

ConstanteDescripción
EventPoint.UnknownEstado desconocido; igual que Qt.TouchPointUnknownState
EventPoint.StationaryEl punto del evento no se ha movido; igual que Qt.TouchPointStationary
EventPoint.PressedSe ha pulsado el punto táctil o el botón; equivalente a Qt.TouchPointPressed
EventPoint.UpdatedEl punto de evento se ha actualizado; equivalente a Qt.TouchPointMoved
EventPoint.ReleasedSe ha soltado el punto táctil o el botón; equivalente a Qt.TouchPointReleased

El tipo «States» es una definición de tipo (typedef) para « QFlags<State> ». Almacena una combinación OR de valores de «State». Véase también QEventPoint::States

TapHandler {
    gesturePolicy: TapHandler.ReleaseWithinBounds // exclusive grab on press
    onGrabChanged:
        (transition, eventPoint) => {
            switch (transition) {
                case PointerDevice.GrabExclusive:
                    console.log("took exclusive grab of point", eventPoint.id,
                                "on", eventPoint.device.name)
                    break
                case PointerDevice.UngrabExclusive:
                    console.log("gave up exclusive grab of point", eventPoint.id,
                                "on", eventPoint.device.name)
                    break
                case PointerDevice.CancelGrabExclusive:
                    console.log("exclusive grab of point", eventPoint.id,
                                "on", eventPoint.device.name, "has been cancelled")
                    break
            }

            switch (eventPoint.state) {
                case EventPoint.Pressed:
                    console.log("on press @", eventPoint.position);
                    break
                case EventPoint.Updated:
                    console.log("on update @", eventPoint.position);
                    break
                case EventPoint.Released:
                    console.log("on release @", eventPoint.position);
                    break
                default:
                    console.log(eventPoint.position, "state", eventPoint.state)
                    break
            }
        }
}

Véase también ` handlerPoint`.

© 2026 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.