QMetaAssociation::Iterable::Iterator Class
class QMetaAssociation::Iterable::IteratorQMetaAssociation::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.