QMetaAssociation::Iterable::Iterator Class
class QMetaAssociation::Iterable::IteratorLa classe ` QMetaAssociation::Iterable::Iterator ` consente di iterare su un contenitore in un ` QVariant`. Per saperne di più...
Questa classe è stata introdotta in Qt 6.11.
Funzioni pubbliche
| QVariant | key() const |
| QVariant | value() const |
| int | operator*() const |
| int | operator->() const |
Descrizione dettagliata
Un ` QMetaAssociation::Iterable::Iterator ` può essere creato solo da un'istanza di ` QMetaAssociation::Iterable ` e può essere utilizzato in modo simile agli altri iteratori in stile STL.
Vedi anche QMetaAssociation::Iterable.
Documentazione delle funzioni membro
QVariant Iterator::key() const
Restituisce la chiave a cui punta questo iteratore.
QVariant Iterator::value() const
Restituisce il valore mappato a cui punta questo iteratore. Se il contenitore non fornisce un valore mappato (ad esempio un insieme), restituisce un’eccezione di tipo “ QVariant::Reference ”.
int Iterator::operator*() const
Restituisce l'elemento corrente, convertito in un oggetto ` QVariant::Reference`. L'oggetto ` QVariant::Reference ` risultante viene risolto nel valore mappato, se presente, oppure nel valore della chiave, in caso contrario.
int Iterator::operator->() const
Restituisce l'elemento corrente, convertito in un oggetto ` QVariant::Pointer`. L'oggetto ` QVariant::Pointer ` risultante viene risolto nel valore mappato, se presente, oppure nel valore della chiave, in caso contrario.
© 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.