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.