QtTaskTree::Forever Class
class QtTaskTree::Forever无限循环的子任务。更多
| 头文件: | #include <qtasktree.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS TaskTree)target_link_libraries(mytarget PRIVATE Qt6::TaskTree) |
| qmake: | QT += tasktree |
| 自 | Qt 6.11 |
| 继承: | QtTaskTree::ExecutableItem |
注意:该类中的所有函数都是可重入的。
公共函数
| Forever(const QtTaskTree::GroupItems &children) | |
| Forever(std::initializer_list<QtTaskTree::GroupItem> children) |
另请参阅 For 和ForeverIterator 。
成员函数文档
[explicit] Forever::Forever(const QtTaskTree::GroupItems &children)
构造一个无限循环,执行children 。
下面的构造
const Group recipe = Forever { task1, task2 };
等价于
const Group recipe = For (ForeverIterator()) >> Do { task1, task2 };
[explicit] Forever::Forever(std::initializer_list<QtTaskTree::GroupItem> children)
构造一个无限循环,执行作为初始化列表传递的children 。
这是一个重载函数。
© 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.