Qt3DInput::QAxis Class

class Qt3DInput::QAxis

QAxis 存储用于触发输入事件的 QAbstractAxisInputs。更多

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

属性

公共功能

QAxis(Qt3DCore::QNode *parent = nullptr)
void addInput(Qt3DInput::QAbstractAxisInput *input)
QList<Qt3DInput::QAbstractAxisInput *> inputs() const
void removeInput(Qt3DInput::QAbstractAxisInput *input)
float value() const

信号

void valueChanged(float value)

详细说明

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

属性文档

[read-only] value : const float

轴的值。

访问功能:

float value() const

通知信号:

void valueChanged(float value)

成员函数 文档

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

构建一个新的 QAxis 实例,其父节点为parent

void QAxis::addInput(Qt3DInput::QAbstractAxisInput *input)

QAxis::addInput 为轴添加input

另请参阅 Qt3DInput::QAbstractAxisInput

QList<Qt3DInput::QAbstractAxisInput *> QAxis::inputs() const

QAxis::inputs

返回添加到轴的所有输入的向量。

void QAxis::removeInput(Qt3DInput::QAbstractAxisInput *input)

QAxis::removeInput

从轴移除input

另请参阅 Qt3DInput::QAbstractAxisInput

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