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 : const 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 : const bool
如果操作处于活动状态,则保持true
。
请注意,禁用动作时该属性不会更新。
访问功能:
bool | isActive() const |
Notifier 信号:
void | activeChanged(bool isActive) |
成员函数 文档
[explicit]
QAction::QAction(Qt3DCore::QNode *parent = nullptr)
构建一个新的 QAction 实例,其父级parent 。
void QAction::addInput(Qt3DInput::QAbstractActionInput *input)
将QAbstractActionInput input 添加到可触发此操作的输入列表中。
QList<Qt3DInput::QAbstractActionInput *> QAction::inputs() const
返回可触发此操作的输入列表。
void QAction::removeInput(Qt3DInput::QAbstractActionInput *input)
将QAbstractActionInput input 移至可触发此操作的输入列表。
© 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.