In questa pagina

QVariantConstPointer Class

Puntatore const emulato a QVariant basato su un puntatore. Altro...

Intestazione: #include <qvariant.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core
A partire da: Qt 6.0
Stato: Fino alla versione 6.15

Questa classe è prevista per la deprecazione nella versione 6.15.

Funzioni pubbliche

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

Descrizione dettagliata

Utilizzare invece ` QVariant::ConstPointer `.

QVariantConstPointer incapsula un QVariant e lo restituisce tramite il suo operatore *(). Ciò lo rende adatto a sostituire un vero e proprio puntatore const. Non è possibile restituire un vero e proprio puntatore const dagli iteratori generici, poiché questi non contengono un vero e proprio QVariant.

Documentazione delle funzioni membro

[explicit] QVariantConstPointer::QVariantConstPointer(QVariant variant)

Crea un oggetto `QVariantConstPointer` a partire da un oggetto ` variant`.

QVariant QVariantConstPointer::operator*() const

Dereferenzia l'QVariantConstPointer per recuperare il suo QVariant interno.

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

Restituisce un puntatore const all'QVariant, conforme alle convenzioni relative all'operatore ->().

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