このページでは

QMetaAssociation::Iterable::Iterator Class

class QMetaAssociation::Iterable::Iterator

QMetaAssociation::Iterable::Iterator を使用すると、QVariant 内でコンテナを反復処理できます。詳細...

このクラスは Qt 6.11 で導入されました。

パブリック関数

QVariant key() const
QVariant value() const
int operator*() const
int operator->() const

詳細な説明

QMetaAssociation::Iterable::Iterator は、QMetaAssociation::Iterable のインスタンスによってのみ作成でき、他の STL スタイルのイテレータと同様の方法で使用できます。

QMetaAssociation::Iterableも参照してください 。

メンバ関数のドキュメント

QVariant Iterator::key() const

このイテレータが指すキーを返します。

QVariant Iterator::value() const

このイテレータが指すマップされた値を返します。コンテナがマップされた値を提供しない場合(セットなど)、無効なQVariant::Reference を返します。

int Iterator::operator*() const

現在の項目を、QVariant::Reference に変換して返します。結果として得られるQVariant::Reference は、マップされた値が存在する場合はその値に、存在しない場合はキーの値に解決されます。

int Iterator::operator->() const

現在の項目を、QVariant::Pointer に変換して返します。結果として得られるQVariant::Pointer は、マップされた値が存在する場合はその値に、存在しない場合はキーの値に解決されます。

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