이 페이지에서

QtTaskTree::For Class

class QtTaskTree::For

A 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)
For(qsizetype count)
For(QtTaskTree::For &&other)
QtTaskTree::Group operator>>(const QtTaskTree::For &forItem, const QtTaskTree::Do &doItem)

상세 설명

반복자를 포함하는 for 요소로, 다음과 같은 루프 구문을 사용할 수 있게 해줍니다.

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

Iterator 및 Do도 참조하십시오 .

멤버 함수 설명서

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

iterator 을 포함하는 For 루프 요소를 생성합니다. stream insertion operator 와 Do 요소를 함께 사용하여 전체 구성을 작업 트리 레시피에 배치할 수 있습니다.

[explicit] For::For(qsizetype count)

count 번 반복하는 For 루프 요소를 생성합니다.

이는 다음과 동일합니다:

For (RepeatIterator(count))

이 함수는 오버로드된 함수입니다.

RepeatIterator도 참조하십시오 .

[constexpr noexcept default] For::For(QtTaskTree::For &&other)

For 의 인스턴스를 생성합니다.

관련 비멤버

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

forItem 와 doItem 바디를 결합하여, 태스크 트리 레시피에서 바로 사용할 수 있는 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.