QVariantPointer Class
template <typename Pointer> class QVariantPointerQVariantPointer è una classe modello che emula un puntatore a un QVariant, basato su un puntatore. Per saperne di più...
| 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
| QVariantPointer(const Pointer *pointer) | |
| QVariantRef<Pointer> | operator*() const |
| Pointer | operator->() const |
Descrizione dettagliata
Utilizzare invece ` QVariant::Pointer `.
QVariantPointer<Pointer> incapsula un puntatore di tipo Pointer e restituisce un QVariantRef e ad esso tramite il suo operatore *(). Ciò lo rende adatto come sostituto di un puntatore effettivo. Non è possibile restituire un puntatore effettivo dagli iteratori generici poiché questi non contengono un'QVariant e effettiva.
Documentazione delle funzioni membro
[explicit] QVariantPointer::QVariantPointer(const Pointer *pointer)
Crea un oggetto `QVariantPointer` a partire dal ` pointer` specificato.
QVariantRef<Pointer> QVariantPointer::operator*() const
Risolve il riferimento a QVariantPointer in QVariantRef.
Pointer QVariantPointer::operator->() const
Dereferenzia e restituisce il puntatore. Il puntatore deve inoltre implementare l'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.