このページでは

eventPoint QML Type

QEventPoint の QML 相当の記述。詳細...

Import Statement: import QtQuick
In C++: QEventPoint

詳細な説明

eventPointは、QEventPoint のQML値型による表現です。これはQEventPoint と同じプロパティを持っています。

以下のプロパティが利用可能です:

この状態では、以下の値がサポートされています:

不変説明
EventPoint.Unknown不明な状態。Qt.TouchPointUnknownState と同じ
EventPoint.Stationaryイベントポイントが移動しなかった。Qt.TouchPointStationary と同じ
EventPoint.Pressedタッチポイントまたはボタンが押された状態;Qt.TouchPointPressed と同じ
EventPoint.Updatedイベントポイントが更新された;Qt.TouchPointMoved と同じ
EventPoint.Releasedタッチポイントまたはボタンが離された;Qt.TouchPointReleased と同じ

States 型は、QFlags<State> の typedef です。State 値の論理和 (OR) 組み合わせを格納します。関連項目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
            }
        }
}

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.