QMetaAssociation::Iterable::Iterator Class
class QMetaAssociation::Iterable::IteratorThe QMetaAssociation::Iterable::Iterator allows iteration over a container in a QVariant. More...
This class was introduced in Qt 6.11.
Public Functions
| QVariant | key() const |
| QVariant | value() const |
| int | operator*() const |
| int | operator->() const |
Detailed Description
A QMetaAssociation::Iterable::Iterator can only be created by a QMetaAssociation::Iterable instance, and can be used in a way similar to other stl-style iterators.
See also QMetaAssociation::Iterable.
Member Function Documentation
QVariant Iterator::key() const
Returns the key this iterator points to.
QVariant Iterator::value() const
Returns the mapped value this iterator points to. If the container does not provide a mapped value (for example a set), returns an invalid QVariant::Reference.
int Iterator::operator*() const
Returns the current item, converted to a QVariant::Reference. The resulting QVariant::Reference resolves to the mapped value if there is one, or to the key value if not.
int Iterator::operator->() const
Returns the current item, converted to a QVariant::Pointer. The resulting QVariant::Pointer resolves to the mapped value if there is one, or to the key value if not.
© 2025 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.