QVariantRef Class
template <typename Pointer> class QVariantRefDie QVariantRef fungiert als nicht-konstante Referenz auf eine QVariant. Mehr....
| Kopfzeile: | #include <QVariantRef> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Core)target_link_libraries(mytarget PRIVATE Qt6::Core) |
| qmake: | QT += core |
| Seit: | Qt 6.0 |
| Status: | Bis 6.15 |
Diese Klasse wird voraussichtlich in Version 6.15 veraltet sein.
Öffentliche Funktionen
| QVariantRef(const Pointer *pointer) | |
| operator QVariant() const | |
| QVariantRef<Pointer> & | operator=(QVariantRef<Pointer> &&value) |
| QVariantRef<Pointer> & | operator=(const QVariant &value) |
| QVariantRef<Pointer> & | operator=(const QVariantRef<Pointer> &value) |
Detaillierte Beschreibung
Verwenden Sie stattdessen QVariant::Reference.
Da die generischen Iteratoren nicht bei jedem Schritt eine QVariant instanziieren, können sie keine Referenz auf eine von operator*() zurückgeben. QVariantRef bietet die gleiche Funktionalität wie ein tatsächlicher Verweis auf QVariant, wird aber durch einen Zeiger unterstützt, der als Template-Parameter übergeben wird. Die Vorlage ist für Zeiger vom Typ QSequentialIterator und QAssociativeIterator implementiert.
Dokumentation der Mitgliedsfunktionen
[explicit] QVariantRef::QVariantRef(const Pointer *pointer)
Erzeugt eine QVariantRef aus einer pointer.
QVariantRef::operator QVariant() const
Löst die QVariantRef in eine aktuelle QVariant auf.
QVariantRef<Pointer> &QVariantRef::operator=(QVariantRef<Pointer> &&value)
Weist dem Wert, auf den sich der Zeiger von QVariantRef bezieht, eine neue value zu.
QVariantRef<Pointer> &QVariantRef::operator=(const QVariant &value)
Weist dem Wert, auf den sich der Zeiger von QVariantRef bezieht, eine neue value zu.
QVariantRef<Pointer> &QVariantRef::operator=(const QVariantRef<Pointer> &value)
Weist dem Wert, auf den sich der Zeiger von QVariantRef bezieht, eine neue value zu.
© 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.