QKeyboardHandler Class
(Qt3DInput::QKeyboardHandler)Provides keyboard event notification. More...
| Header: | #include <QKeyboardHandler> |
| qmake: | QT += 3dinput |
| Since: | Qt 5.5 |
| Instantiated By: | KeyboardHandler |
| Inherits: | Qt3DCore::QComponent |
This class was introduced in Qt 5.5.
Properties
- focus : bool
- sourceDevice : Qt3DInput::QKeyboardDevice*
- 1 property inherited from Qt3DCore::QComponent
- 3 properties inherited from Qt3DCore::QNode
- 1 property inherited from QObject
Public Functions
| QKeyboardHandler(Qt3DCore::QNode *parent = nullptr) | |
| bool | focus() const |
| Qt3DInput::QKeyboardDevice * | sourceDevice() const |
- 2 public functions inherited from Qt3DCore::QComponent
- 9 public functions inherited from Qt3DCore::QNode
- 30 public functions inherited from QObject
Public Slots
| void | setFocus(bool focus) |
| void | setSourceDevice(Qt3DInput::QKeyboardDevice *keyboardDevice) |
- 1 public slot inherited from Qt3DCore::QComponent
- 3 public slots inherited from Qt3DCore::QNode
- 1 public slot inherited from QObject
Signals
| void | focusChanged(bool focus) |
| void | sourceDeviceChanged(Qt3DInput::QKeyboardDevice *keyboardDevice) |
- 1 signal inherited from Qt3DCore::QComponent
- 3 signals inherited from Qt3DCore::QNode
- 2 signals inherited from QObject
Related Non-Members
| typedef | QNodePtr |
| typedef | QNodeVector |
| 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
- 9 static public members inherited from QObject
- 2 protected functions inherited from Qt3DCore::QNode
- 9 protected functions inherited from QObject
Detailed Description
Property Documentation
focus : bool
Holds true if the QKeyboardHandlers has focus.
Access functions:
| bool | focus() const |
| void | setFocus(bool focus) |
Notifier signal:
| void | focusChanged(bool focus) |
sourceDevice : Qt3DInput::QKeyboardDevice*
Holds the keyboard device of the QKeyboardHandler. Without a valid device, the QKeyboardHandler won't receive any event.
Access functions:
| Qt3DInput::QKeyboardDevice * | sourceDevice() const |
| void | setSourceDevice(Qt3DInput::QKeyboardDevice *keyboardDevice) |
Notifier signal:
| void | sourceDeviceChanged(Qt3DInput::QKeyboardDevice *keyboardDevice) |
Member Function Documentation
QKeyboardHandler::QKeyboardHandler(Qt3DCore::QNode *parent = nullptr)
Constructs a new QKeyboardHandler instance with parent parent.
[slot] void QKeyboardHandler::setFocus(bool focus)
Sets the focus to focus. If focus is not currently set to true, this component will receive keyboard focus.
Note: Setter function for property focus.
See also focus().
Qt3DInput::QKeyboardDevice *QKeyboardHandler::sourceDevice() const
Returns the current keyboard device.
Note: Getter function for property sourceDevice.
See also setSourceDevice().