在本页

QtTaskTree::ListIterator Class

template <typename T> class QtTaskTree::ListIterator

For 元素内部使用的列表迭代器。更多

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

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

公共函数

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

详细说明

另请参见 Iterator,ForeverIterator,RepeatIterator, 和UntilIterator

成员函数文档

[explicit] ListIterator::ListIterator(const QList<T> &list)

为 For (ListIterator(list)) >> Do {} 构造构建列表迭代器。迭代器将遍历传递的list 中的每个元素。

另请参见 Iterator::iteration().

const T &ListIterator::operator*() const

返回 Do 主体中当前元素的引用。该函数只能在QtTaskTree::Do 口诀正文中任何GroupItem 元素的处理程序正文中使用,否则可能导致崩溃。请确保ListIterator 已传递给 For 元素。

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

返回 Do 主体中当前元素的指针。该函数只能在QtTaskTree::Do 口诀正文中任何GroupItem 元素的处理程序正文中使用,否则可能会导致崩溃。请确保ListIterator 已传递给 For 元素。

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