QtTaskTree::ListIterator Class

template <typename T> class QtTaskTree::ListIterator

The list iterator to be used inside For element. More...

Header: #include <qtasktree.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS TaskTree)
target_link_libraries(mytarget PRIVATE Qt6::TaskTree)
qmake: QT += tasktree
Since: Qt 6.11
Inherits: QtTaskTree::Iterator
Status: Technical Preview

Note: All functions in this class are reentrant.

Public Functions

ListIterator(const QList<T> &list)
const T &operator*() const
const T *operator->() const

Detailed Description

See also Iterator, ForeverIterator, RepeatIterator, and UntilIterator.

Member Function Documentation

ListIterator::ListIterator(const QList<T> &list)

Constructs the list iterator for the For (ListIterator(list)) >> Do {} construct. The iterator will iterate over each element from the passed list.

See also Iterator::iteration().

const T &ListIterator::operator*() const

Returns a reference to the current element inside a Do body. Use this function only from inside the handler body of any GroupItem element placed in the QtTaskTree::Do body of the recipe, otherwise you may expect a crash. Make sure that ListIterator is passed to the For element.

const T *ListIterator::operator->() const

Returns a pointer to the current element inside a Do body. Use this function only from inside the handler body of any GroupItem element placed in the QtTaskTree::Do body of the recipe, otherwise you may expect a crash. Make sure that ListIterator is passed to the For element.