QKeyEvent Class
(Qt3DInput::QKeyEvent)QKeyEvent event type send by KeyBoardHandler. More...
| Header: | #include <QKeyEvent> |
| qmake: | QT += 3dinput |
| Since: | Qt 5.5 |
| Instantiated By: | KeyEvent |
| Inherits: | QObject |
This class was introduced in Qt 5.5.
Properties
|
|
- 1 property inherited from QObject
Public Functions
| int | count() const |
| bool | isAccepted() const |
| bool | isAutoRepeat() const |
| int | key() const |
| int | modifiers() const |
| quint32 | nativeScanCode() const |
| void | setAccepted(bool accepted) |
| QString | text() const |
- 30 public functions inherited from QObject
Related Non-Members
| typedef | QKeyEventPtr |
| typedef | QObjectList |
| QList<T> | qFindChildren(const QObject *obj, const QRegExp ®Exp) |
| T | qobject_cast(QObject *object) |
| T | qobject_cast(const QObject *object) |
Macros
| QT_NO_NARROWING_CONVERSIONS_IN_CONNECT | |
| Q_CLASSINFO(Name, Value) | |
| Q_DISABLE_COPY(Class) | |
| Q_DISABLE_COPY_MOVE(Class) | |
| Q_DISABLE_MOVE(Class) | |
| Q_EMIT | |
| Q_ENUM(...) | |
| Q_ENUM_NS(...) | |
| Q_FLAG(...) | |
| Q_FLAG_NS(...) | |
| Q_GADGET | |
| Q_INTERFACES(...) | |
| Q_INVOKABLE | |
| Q_NAMESPACE | |
| Q_OBJECT | |
| Q_PROPERTY(...) | |
| Q_REVISION | |
| Q_SET_OBJECT_NAME(Object) | |
| Q_SIGNAL | |
| Q_SIGNALS | |
| Q_SLOT | |
| Q_SLOTS |
Additional Inherited Members
- 1 public slot inherited from QObject
- 2 signals inherited from QObject
- 9 static public members inherited from QObject
- 9 protected functions inherited from QObject
Detailed Description
Property Documentation
accepted : bool
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.
Access functions:
| bool | isAccepted() const |
| void | setAccepted(bool accepted) |
count : const int
Holds the number of keys involved in this event. If text is not empty, this is simply the length of the string.
Access functions:
| int | count() const |
isAutoRepeat : const bool
Holds whether this event comes from an auto-repeating key.
Access functions:
| bool | isAutoRepeat() const |
key : const int
This property holds the code of the key that was pressed or released.
See Qt.Key for the list of keyboard codes.
Access functions:
| int | key() const |
See also QKeyEvent::key.
modifiers : const int
This property holds the keyboard modifier flags that existed immediately before the event occurred.
Access functions:
| int | modifiers() const |
See also QKeyEvent::modifiers.
nativeScanCode : const quint32
This property contains the native scan code of the key that was pressed. It is passed through from QKeyEvent unchanged.
Access functions:
| quint32 | nativeScanCode() const |
text : const QString
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.
Access functions:
| QString | text() const |