XrInputAction QML Type
입력 컨트롤러의 동작을 나타냅니다. 더 보기...
| Import Statement: | import QtQuick3D.Xr |
| Since: | Qt 6.8 |
| Inherits: | |
| Status: | Technology preview |
이 유형은 기술 미리보기 단계에 있으며 변경될 수 있습니다.
속성
- actionId : List<enumeration>
- actionName : string
- controller : enumeration
(since 6.10) - enabled : bool
(since 6.9) - pressed : bool
- value : real
신호
상세 설명
액션은 버튼 누르기 같은 부울형일 수도 있고, 조이스틱 축 같은 아날로그형일 수도 있습니다.
부울형 액션에 반응하려면 pressed 속성이나 triggered 신호를 사용하십시오. 아날로그 액션은 value 속성을 설정합니다.
참고: 편의상 아날로그 속성은 pressed 속성을 설정하고 triggered 신호를 발생시키는 반면, 부울 속성은 눌렸을 때 value 를 1.0으로 설정합니다.
다음은 오른손 그립이 눌리거나 핸드 트래킹을 통한 오른손 핀치 제스처에 반응하는 방법을 보여줍니다:
XrInputAction {
hand: XrInputAction.RightHand
actionId: [XrInputAction.SqueezePressed, XrInputAction.SqueezeValue, XrInputAction.IndexFingerPinch]
onTriggered: console.log("Do action here.")
}SqueezePressed 과 SqueezeValue 을 모두 지정하는 이유는, 일부 컨트롤러에는 아날로그 그립 버튼이 있는 반면, 일부 컨트롤러에는 단순한 온/오프 그립 스위치만 있기 때문입니다.
속성 설명서
actionId : List<enumeration>
반응할 동작을 지정합니다
다음 값을 가질 수 있는 ID 목록을 포함합니다:
| 상수 | 설명 |
|---|---|
XrInputAction.Button1Pressed | 버튼 1이 눌림. 부울형. |
XrInputAction.Button1Touched | 버튼 1이 터치됨. 부울. |
XrInputAction.Button2Pressed | 버튼 2가 눌렸습니다. 부울. |
XrInputAction.Button2Touched | 버튼 2가 터치되었습니다. 부울. |
XrInputAction.ButtonMenuPressed | 메뉴 버튼이 눌렸습니다. 부울 값. |
XrInputAction.ButtonMenuTouched | 메뉴 버튼이 터치되었습니다. 부울. |
XrInputAction.ButtonSystemPressed | 시스템 버튼이 눌렸습니다. 부울. |
XrInputAction.ButtonSystemTouched | 시스템 버튼이 터치되었습니다. 부울. |
XrInputAction.SqueezeValue | 그립 버튼이 눌린 깊이. 아날로그. |
XrInputAction.SqueezeForce | 그립 버튼에 가해진 힘. 아날로그. |
XrInputAction.SqueezePressed | 그립 버튼이 눌려 있습니다. 부울. |
XrInputAction.TriggerValue | 트리거 버튼이 눌린 정도. 아날로그. |
XrInputAction.TriggerPressed | 트리거가 눌려 있습니다. 부울. |
XrInputAction.TriggerTouched | 트리거에 손이 닿았는지 여부. 부울형. |
XrInputAction.ThumbstickX | 썸스틱의 X축 값. 아날로그. |
XrInputAction.ThumbstickY | 썸스틱의 Y축 값. 아날로그. |
XrInputAction.ThumbstickPressed | 썸스틱이 눌려졌습니다. 부울. |
XrInputAction.ThumbstickTouched | 썸스틱이 터치됨. 부울. |
XrInputAction.ThumbrestTouched | 엄지 받침대에 터치되었습니다. 부울. |
XrInputAction.TrackpadX | 트랙패드의 X축 위치. 아날로그. |
XrInputAction.TrackpadY | 트랙패드의 Y축 위치. 아날로그. |
XrInputAction.TrackpadForce | 트랙패드에 가해지는 힘. 아날로그. |
XrInputAction.TrackpadTouched | 트랙패드가 터치되었습니다. 부울형. |
XrInputAction.TrackpadPressed | 트랙패드가 눌려졌습니다. 부울. |
XrInputAction.IndexFingerPinch | 엄지와 검지로 집기 제스처. 부울. |
XrInputAction.MiddleFingerPinch | 엄지와 중지를 이용한 핀치 제스처. 부울형. |
XrInputAction.RingFingerPinch | 엄지와 약지를 이용한 핀치 제스처. 부울. |
XrInputAction.LittleFingerPinch | 엄지와 새끼손가락을 이용한 핀치 제스처. 부울형. |
XrInputAction.HandTrackingMenuPress | 손 추적 메뉴 제스처. 부울형. |
actionName : string
입력 액션의 이름입니다.
이 속성을 사용하여 반응하고자 하는 사용자 정의 입력 액션의 이름을 지정합니다. ` actionId `가 설정된 경우 이 속성은 효과가 없습니다.
controller : enumeration [since 6.10]
이 입력 동작이 적용될 컨트롤러입니다.
반응할 컨트롤러를 지정합니다.
다음 중 하나일 수 있습니다:
| 상수 | 설명 |
|---|---|
XrInputAction.LeftController | |
XrInputAction.RightController | |
XrInputAction.Unknown | |
XrInputAction.LeftHand | ( LeftController 의 별칭) |
XrInputAction.RightHand | ( RightController 의 별칭)참고: Qt 6.9에서는 이 속성이 "hand"라고 불렸습니다. |
이 속성은 Qt 6.10에서 도입되었습니다.
enabled : bool [default: true, since 6.9]
이 속성은 입력 동작이 이벤트에 반응할지 여부를 결정합니다.
이 속성은 Qt 6.9에서 도입되었습니다.
pressed : bool
입력 동작이 현재 눌려 있는지 여부를 나타냅니다.
이 속성을 사용하여 입력 동작(예: 버튼)이 현재 눌려 있는지 확인합니다.
value : real
입력 동작의 아날로그 값입니다.
썸스틱 위치와 같은 아날로그 입력의 경우, 이 속성은 입력 값(일반적으로 [0, 1] 범위)을 저장합니다.
신호 문서
triggered()
이 신호는 부울 액션이 활성화될 때 발생합니다. 이는 pressed 속성이 true 로 설정되는 시점과 동시에 발생합니다.
참고: 해당 핸들러는 onTriggered 입니다.
© 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.