本页内容

QList::iterator Class

class QList::iterator

为QList 和QStack 提供了一个STL风格的非const迭代器。更多内容...

公共函数

详细说明

QList 同时提供STL 风格的迭代器和 Java 风格的迭代器。

警告: 隐式共享容器上的迭代器 的工作方式与 STL 迭代器并不完全相同。当迭代器在容器上处于活动状态时,应避免复制该容器。有关更多信息,请阅读《隐式共享迭代器问题》。

警告: 当QList 被修改时,迭代器 将失效。请注意,默认情况下所有迭代器都会失效。此规则的例外情况已在文档中明确说明。

另请参阅 QList::begin()、QList::end()、QList::const_iterator 以及QMutableListIterator 。

成员函数文档

[constexpr default] iterator::iterator()

默认——构造一个iterator 的实例。

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