本页内容

QRangeModelAdapter::RowIterator Struct

struct QRangeModelAdapter::RowIterator

提供了一个基于模型行数据的 STL 风格非 const 迭代器。更多内容...

该结构体处于技术预览阶段,可能会有变动。

该结构体于 Qt 6.11 版本中引入。

公共函数

RowIterator(const QRangeModelAdapter<Range, Protocol, Model>::RowIterator &other)
RowIterator(QRangeModelAdapter<Range, Protocol, Model>::RowIterator &&other)
~RowIterator()
QRangeModelAdapter<Range, Protocol, Model>::RowIterator &operator=(QRangeModelAdapter<Range, Protocol, Model>::RowIterator &&other)
QRangeModelAdapter<Range, Protocol, Model>::RowIterator &operator=(const QRangeModelAdapter<Range, Protocol, Model>::RowIterator &other)

详细说明

该迭代器采用std::random_access_iterator 模型。如果模型是一个列表,则解引用迭代器将返回一个DataReference 包装器,该包装器指向模型中的相应项。

对于表格和树,解引用迭代器将返回指向该行的RowReference 。

成员函数文档

[default] RowIterator::RowIterator(const QRangeModelAdapter<Range, Protocol, Model>::RowIterator &other)

复制并构造一个RowIterator 实例。

[default] RowIterator::RowIterator(QRangeModelAdapter<Range, Protocol, Model>::RowIterator &&other)

通过“Move”构造一个RowIterator 的实例。

[default] RowIterator::~RowIterator()

销毁RowIterator 的实例。

[default] QRangeModelAdapter<Range, Protocol, Model>::RowIterator &RowIterator::operator=(QRangeModelAdapter<Range, Protocol, Model>::RowIterator &&other)

将other 赋值给此RowIterator 实例。

[default] QRangeModelAdapter<Range, Protocol, Model>::RowIterator &RowIterator::operator=(const QRangeModelAdapter<Range, Protocol, Model>::RowIterator &other)

将other 复制并赋值给此RowIterator 实例。

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