iterator Class

class QList::iterator

Provides an STL-style non-const iterator for QList and QStack. More...

Public Types

Public Functions

iterator()
iterator(T *n)

Detailed Description

QList provides both STL-style iterators and Java-style iterators.

Warning: Iterators on implicitly shared containers do not work exactly like STL-iterators. You should avoid copying a container while iterators are active on that container. For more information, read Implicit sharing iterator problem.

Warning: Iterators are invalidated when QList is modified. Consider that all iterators are invalidated by default. Exceptions to this rule are explicitly documented.

See also QList::begin(), QList::end(), QList::const_iterator, and QMutableListIterator.

Member Type Documentation

[alias] iterator::difference_type

[alias] iterator::element_type

[alias] iterator::iterator_category

[alias] iterator::iterator_concept

[alias] iterator::pointer

[alias] iterator::reference

[alias] iterator::value_type

Member Function Documentation

iterator::iterator()

Default-constructs an instance of iterator.

iterator::iterator(T *n)

Default-constructs an instance of iterator.

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