Qt3DInput::QAction Class
class Qt3DInput::QAction将一组QAbstractActionInput 链接起来,使其触发同一事件。更多...
| 标题: | #include <QAction> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3dinput) target_link_libraries(mytarget PRIVATE Qt6::3dinput) |
| qmake: | QT += 3dinput |
| 在 QML 中: | Action |
| 继承自: | Qt3DCore::QNode |
| 状态: | 已弃用 |
该类已弃用。我们强烈建议不要在新代码中使用它。
属性
- active : bool
公共函数
| QAction(Qt3DCore::QNode *parent = nullptr) | |
| void | addInput(Qt3DInput::QAbstractActionInput *input) |
| QList<Qt3DInput::QAbstractActionInput *> | inputs() const |
| bool | isActive() const |
| void | removeInput(Qt3DInput::QAbstractActionInput *input) |
信号
| void | activeChanged(bool isActive) |
属性文档
[read-only] active : bool
如果该操作处于活动状态,则返回true 。
请注意,当该操作被禁用时,此属性不会更新。
访问函数:
| bool | isActive() const |
通知信号:
| void | activeChanged(bool isActive) |
成员函数文档
[explicit] QAction::QAction(Qt3DCore::QNode *parent = nullptr)
创建一个父类为parent 的新QAction实例。
void QAction::addInput(Qt3DInput::QAbstractActionInput *input)
将 QAbstractActionInputinput 添加到可触发此操作的输入列表中。
QList<Qt3DInput::QAbstractActionInput *> QAction::inputs() const
返回可触发此操作的输入列表。
void QAction::removeInput(Qt3DInput::QAbstractActionInput *input)
将 QAbstractActionInputinput 从可触发此操作的输入列表中移除。
© 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.