QMetaAssociation::Iterable::Iterator Class

class QMetaAssociation::Iterable::Iterator

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