Qt3DInput::QKeyboardDevice Class

class Qt3DInput::QKeyboardDevice

QKeyboardDevice 负责向附加的 QQKeyboardHandler 对象发送键盘事件。更多

头文件: #include <QKeyboardDevice>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3dinput)
target_link_libraries(mytarget PRIVATE Qt6::3dinput)
qmake: QT += 3dinput
在 QML 中: KeyboardDevice
继承: Qt3DInput::QAbstractPhysicalDevice
状态:已废弃

属性

公共函数

QKeyboardDevice(Qt3DCore::QNode *parent = nullptr)
Qt3DInput::QKeyboardHandler *activeInput() const

重新实现的公共函数

virtual int axisCount() const override
virtual int axisIdentifier(const QString &name) const override
virtual QStringList axisNames() const override
virtual int buttonCount() const override
virtual int buttonIdentifier(const QString &name) const override
virtual QStringList buttonNames() const override

信号

void activeInputChanged(Qt3DInput::QKeyboardHandler *activeInput)

详细说明

属性文档

[read-only] activeInput : Qt3DInput::QKeyboardHandler* const

保存设备的活动QKeyboardHandler

访问功能:

Qt3DInput::QKeyboardHandler *activeInput() const

Notifier 信号:

void activeInputChanged(Qt3DInput::QKeyboardHandler *activeInput)

成员函数 文档

[explicit] QKeyboardDevice::QKeyboardDevice(Qt3DCore::QNode *parent = nullptr)

使用parent 构建一个新的 QKeyboardDevice 实例。

[override virtual] int QKeyboardDevice::axisCount() const

重实现:QAbstractPhysicalDevice::axisCount() 常量。

返回轴计数。

注意: 目前总是返回零。

[override virtual] int QKeyboardDevice::axisIdentifier(const QString &name) const

重实现:QAbstractPhysicalDevice::axisIdentifier(const QString &name) const.

返回与name 匹配的 axisIdentifier。

[override virtual] QStringList QKeyboardDevice::axisNames() const

重实现:QAbstractPhysicalDevice::axisNames() 常量。

返回轴名。

注意: 目前总是返回空QStringList

[override virtual] int QKeyboardDevice::buttonCount() const

重实现:QAbstractPhysicalDevice::buttonCount() 常量。

返回按钮计数。

[override virtual] int QKeyboardDevice::buttonIdentifier(const QString &name) const

重实现:QAbstractPhysicalDevice::buttonIdentifier(const QString &name) const.

返回与name 匹配的 buttonIdentifier。

[override virtual] QStringList QKeyboardDevice::buttonNames() const

重实现:QAbstractPhysicalDevice::buttonNames() 常量。

返回按钮名称。

© 2025 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.