KeyEvent QML Type
QKeyEvent C++ 클래스를 위한 QML 프론트엔드. 더 보기...
| Import Statement: | import Qt3D.Input 2.12 |
| In C++: | QKeyEvent |
| Status: | Deprecated |
이 유형은 더 이상 사용되지 않습니다. 새로운 코드에서는 이를 사용하지 않는 것을 강력히 권장합니다.
속성
- accepted : bool
- count : int
- isAutoRepeat : bool
- key : int
- modifiers : int
- nativeScanCode : quint32
- text : string
방법
- bool matches(StandardKey key)
상세 설명
KeyEvent QML 유형은 직접 생성할 수 없습니다. 이 유형의 객체는 KeyboardHandler 에서 신호 매개변수로 사용됩니다.
속성 설명
accepted : bool
'accepted' 속성을 ' true '로 설정하면 키 이벤트가 해당 항목의 상위 항목으로 전파되는 것을 방지할 수 있습니다.
일반적으로, 항목이 키 이벤트에 반응하는 경우, 상위 항목들이 동일한 이벤트에 반응하지 않도록 해당 이벤트를 수락해야 합니다.
count : int [read-only]
이 이벤트에 관련된 키의 개수를 저장합니다. ` text `가 비어 있지 않은 경우, 이 값은 단순히 해당 문자열의 길이입니다.
isAutoRepeat : bool [read-only]
이 이벤트가 자동 반복 키에서 발생한 것인지 여부를 나타냅니다.
key : int [read-only]
이 속성은 눌리거나 놓인 키의 코드를 저장합니다.
키보드 코드 목록은 Qt.Key 을 참조하십시오.
KeyEvent.key도 참조하십시오 .
modifiers : int [read-only]
이 속성은 이벤트가 발생하기 직전에 존재했던 키보드 수정자 플래그를 포함합니다.
KeyEvent.modifiers도 참조하십시오 .
nativeScanCode : quint32 [read-only]
이 속성에는 눌린 키의 네이티브 스캔 코드가 포함됩니다. 이 값은 QKeyEvent 에서 변경 없이 그대로 전달됩니다.
QKeyEvent::nativeScanCode()도 참조하십시오 .
text : string [read-only]
이 속성은 키가 생성한 유니코드 텍스트를 저장합니다. Shift, Control, Alt, Meta와 같은 수정 키가 눌리거나 놓일 경우, 반환되는 텍스트는 빈 문자열일 수 있습니다. 이러한 경우 ` key `에는 유효한 값이 포함됩니다.
메서드 설명
bool matches(StandardKey key)
키 이벤트가 지정된 표준 key 과 일치하면 true 를 반환하고, 그렇지 않으면 false 를 반환합니다.
QKeySequence::StandardKey도 참조하십시오 .
© 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.