QVariant::ConstReference Class
template <typename Referred> class QVariant::ConstReferenceDie QVariant::ConstReference fungiert als Konst-Referenz auf eine QVariant. Mehr...
Diese Klasse wurde in Qt 6.11 eingeführt.
Öffentliche Funktionen
| ConstReference(Referred &&referred) | |
| ConstReference(const Referred &referred) | |
| QVariant | operator QVariant() const |
Detaillierte Beschreibung
Da die generischen Iteratoren nicht bei jedem Schritt eine QVariant instanziieren, können sie keine Referenz auf eine von operator*() zurückgeben. QVariant::ConstReference bietet die gleiche Funktionalität wie eine tatsächliche Referenz auf eine QVariant, aber es wird ein Referenzwert zurückgegeben, der als Template-Parameter angegeben wird. Die Vorlage ist für QMetaSequence::ConstIterator, QMetaSequence::Iterator, QMetaAssociation::ConstIterator und QMetaAssociation::Iterator implementiert.
Dokumentation der Mitgliedsfunktionen
[explicit noexcept(...)] ConstReference::ConstReference(Referred &&referred)
Erzeugt ein QVariant::ConstReference aus einem referred.
Hinweis: Diese Funktion ist noexcept, wenn std::is_nothrow_move_constructible_v<Referred> true ist.
[explicit noexcept(...)] ConstReference::ConstReference(const Referred &referred)
Erzeugt ein QVariant::ConstReference aus einem referred.
Hinweis: Diese Funktion ist noexcept, wenn std::is_nothrow_copy_constructible_v<Referred> true ist.
[noexcept(...)] QVariant ConstReference::operator QVariant() const
Dereferenziert die Referenz auf eine QVariant. Diese Methode muss für jeden referenzierten Typ spezialisiert werden. Sie ist vordefiniert für QMetaSequence::ConstIterator, QMetaSequence::Iterator, QMetaAssociation::ConstIterator, und QMetaAssociation::Iterator.
Hinweis: Diese Funktion ist noexcept, wenn Referred::canNoexceptConvertToQVariant true ist.
© 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.