40 Q_PROPERTY(
int key READ
key CONSTANT)
60 Q_PROPERTY(QString
text READ
text CONSTANT)
62 explicit QmlKeyEvent(QKeyEvent *keyEvent =
nullptr, QObject *parent =
nullptr);
75 QKeyEvent *m_keyEvent =
nullptr;
The class exposing KeyEvent to QML.
int count
number of keys involved in this event
bool autoRepeat
checks if the event comes from an auto-repeating key
QmlKeyEvent(QKeyEvent *keyEvent=nullptr, QObject *parent=nullptr)
quint32 nativeScanCode
native scan code of the event
quint32 nativeVirtualKey
native virtual key, or key sum of the event
quint32 nativeModifiers
native modifiers of the event
QString text
Returns the Unicode text that this key generated.
int key
key code which is pressed/released
bool isAutoRepeat() const
int modifiers
modifiers associated with the event