在本页

QtTaskTree::For Class

class QtTaskTree::For

for 循环元素。更多

头文件: #include <qtasktree.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS TaskTree)
target_link_libraries(mytarget PRIVATE Qt6::TaskTree)
qmake: QT += tasktree
Qt 6.11

注意:该类中的所有函数都是可重入的

公共函数

For(const QtTaskTree::Iterator &iterator)
QtTaskTree::Group operator>>(const QtTaskTree::For &forItem, const QtTaskTree::Do &doItem)

详细说明

一个 for 元素,包含一个迭代器,可用于循环结构,如......:

For (RepeatIterator(5)) >> Do {
    task1,
    task2
}

另请参阅 IteratorDo

成员函数文档

[explicit] For::For(const QtTaskTree::Iterator &iterator)

构造 For 循环元素,其中包含iterator 。使用stream insertion operatorDo 元素可将整个构造置于任务树配方中。

相关非成员

QtTaskTree::Group operator>>(const QtTaskTree::For &forItem, const QtTaskTree::Do &doItem)

forItemdoItem 主体结合,并返回Group ,以便在任务树配方中使用。

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