이 페이지에서

eventPoint QML Type

QEventPoint 에 해당하는 QML 코드. 더 보기...

Import Statement: import QtQuick
In C++: QEventPoint

상세 설명

eventPoint는 ` QEventPoint`를 QML 값 유형으로 표현한 것입니다. 이 유형은 ` QEventPoint`와 동일한 속성을 가집니다.

다음과 같은 속성을 사용할 수 있습니다:

State는 다음 값을 지원합니다:

상수설명
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.