QVariantConstPointer Class

Emulierter const-Zeiger auf QVariant basierend auf einem Zeiger. Mehr...

Kopfzeile: #include <QVariantConstPointer>
CMake: find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core
Seit: Qt 6.0

Öffentliche Funktionen

QVariantConstPointer(QVariant variant)
QVariant operator*() const
const QVariant *operator->() const

Detaillierte Beschreibung

QVariantConstPointer umhüllt ein QVariant und gibt es von seinem operator*() zurück. Dies macht ihn zu einem geeigneten Ersatz für einen tatsächlichen const-Zeiger. Von generischen Iteratoren kann kein tatsächlicher const-Zeiger zurückgegeben werden, da die Iteratoren keinen tatsächlichen QVariant enthalten.

Dokumentation der Mitgliedsfunktionen

[explicit] QVariantConstPointer::QVariantConstPointer(QVariant variant)

Konstruiert einen QVariantConstPointer aus einem variant.

QVariant QVariantConstPointer::operator*() const

Dereferenziert die QVariantConstPointer, um ihre interne QVariant abzurufen.

const QVariant *QVariantConstPointer::operator->() const

Gibt einen konstanten Zeiger auf QVariant zurück, der den Konventionen für operator->() entspricht.

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