Qt3DInput::QButtonAxisInput Class
class Qt3DInput::QButtonAxisInput由按钮控制的轴输入 轴值由按钮控制,而非像操纵杆那样的传统模拟输入。更多...
| 标题: | #include <Qt3DInput/QButtonAxisInput> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3dinput) target_link_libraries(mytarget PRIVATE Qt6::3dinput) |
| qmake: | QT += 3dinput |
| 在 QML 中: | ButtonAxisInput |
| 继承自: | Qt3DInput::QAbstractAxisInput |
| 状态: | 已弃用 |
该类已弃用。我们强烈建议不要在新代码中使用它。
属性
- acceleration : float
- buttons : QList<int>
- deceleration : float
- scale : float
公共函数
| QButtonAxisInput(Qt3DCore::QNode *parent = nullptr) | |
| float | acceleration() const |
| QList<int> | buttons() const |
| float | deceleration() const |
| float | scale() const |
公共槽
| void | setAcceleration(float acceleration) |
| void | setButtons(const QList<int> &buttons) |
| void | setDeceleration(float deceleration) |
| void | setScale(float scale) |
信号
| void | accelerationChanged(float acceleration) |
| void | buttonsChanged(const QList<int> &buttons) |
| void | decelerationChanged(float deceleration) |
| void | scaleChanged(float scale) |
属性文档
acceleration : float
指定按住按钮时轴值的变化速率
访问函数:
| float | acceleration() const |
| void | setAcceleration(float acceleration) |
通知信号:
| void | accelerationChanged(float acceleration) |
buttons : QList<int>
指定用于控制该轴的按钮
访问函数:
| QList<int> | buttons() const |
| void | setButtons(const QList<int> &buttons) |
通知信号:
| void | buttonsChanged(const QList<int> &buttons) |
deceleration : float
指定在释放按钮时,轴值恢复到正常状态的速度
访问函数:
| float | deceleration() const |
| void | setDeceleration(float deceleration) |
通知信号:
| void | decelerationChanged(float deceleration) |
scale : float
指定轴输出值的缩放方式。默认情况下不进行缩放,因此默认值为 1。
访问函数:
| float | scale() const |
| void | setScale(float scale) |
通知信号:
| void | scaleChanged(float scale) |
成员函数文档
[explicit] QButtonAxisInput::QButtonAxisInput(Qt3DCore::QNode *parent = nullptr)
使用parent 构建一个新的 QButtonAxisInput 实例。
© 2026 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.