Qt3DInput::QAbstractPhysicalDevice Class

class Qt3DInput::QAbstractPhysicalDevice

QAbstractPhysicalDevice 是 Qt3d 用来与任意输入设备交互的基类。更多

头文件: #include <QAbstractPhysicalDevice>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3dinput)
target_link_libraries(mytarget PRIVATE Qt6::3dinput)
qmake: QT += 3dinput
在 QML 中: AbstractPhysicalDevice
继承: Qt3DCore::QNode
继承于

Qt3DInput::QAbstractPhysicalDeviceProxy,Qt3DInput::QKeyboardDevice, 和Qt3DInput::QMouseDevice

状态:已废弃

公共函数

QAbstractPhysicalDevice(Qt3DCore::QNode *parent = nullptr)
void addAxisSetting(Qt3DInput::QAxisSetting *axisSetting)
virtual int axisCount() const
virtual int axisIdentifier(const QString &name) const
virtual QStringList axisNames() const
QList<Qt3DInput::QAxisSetting *> axisSettings() const
virtual int buttonCount() const
virtual int buttonIdentifier(const QString &name) const
virtual QStringList buttonNames() const
void removeAxisSetting(Qt3DInput::QAxisSetting *axisSetting)

详细说明

成员函数文档

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

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

void QAbstractPhysicalDevice::addAxisSetting(Qt3DInput::QAxisSetting *axisSetting)

将轴设置axisSetting 添加到此设备。

[virtual] int QAbstractPhysicalDevice::axisCount() const

返回该设备的轴数。

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

返回轴name 的整数标识符,如果该设备上不存在该标识符,则返回-1。

[virtual] QStringList QAbstractPhysicalDevice::axisNames() const

返回设备轴名称列表。

QList<Qt3DInput::QAxisSetting *> QAbstractPhysicalDevice::axisSettings() const

返回与此设备相关的 axisSettings。

[virtual] int QAbstractPhysicalDevice::buttonCount() const

返回设备的按钮数量。

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

返回name 按钮的整数标识符,如果该设备上不存在该按钮,则返回-1。

[virtual] QStringList QAbstractPhysicalDevice::buttonNames() const

返回设备按钮名称列表。

void QAbstractPhysicalDevice::removeAxisSetting(Qt3DInput::QAxisSetting *axisSetting)

移除该设备的轴设置axisSetting

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