KeyEvent QML Type
QML frontend for QKeyEvent C++ class. 更多...
Import Statement: | import Qt3D.Input 2.0 |
开始支持版本: | Qt 5.5 |
Instantiates: | QKeyEvent |
属性
- accepted : bool
- count : int
- isAutoRepeat : bool
- key : int
- modifiers : int
- nativeScanCode : quint32
- text : string
方法
- bool matches(StandardKey key)
详细描述
The KeyEvent QML type cannot be directly created. Objects of this type are used as signal parameters in KeyboardHandler.
属性
Setting accepted to true
prevents the key event from being propagated to the item's parent.
Generally, if the item acts on the key event then it should be accepted so that ancestor items do not also respond to the same event.
Holds the number of keys involved in this event. If text is not empty, this is simply the length of the string.
This property holds the code of the key that was pressed or released.
See Qt.Key for the list of keyboard codes.
参见 KeyEvent.key.
This property holds the keyboard modifier flags that existed immediately before the event occurred.
This property contains the native scan code of the key that was pressed. It is passed through from QKeyEvent unchanged.
This property holds the Unicode text that the key generated. The text returned can be an empty string in cases where modifier keys, such as Shift, Control, Alt, and Meta, are being pressed or released. In such cases key will contain a valid value.
成员
Returns true
if the key event matches the given standard key; otherwise returns false
.