In questa pagina

QVariant::Pointer Class

template <typename Indirect> class QVariant::Pointer

QVariant::Pointer è una classe modello che emula un puntatore non costante a un QVariant. Maggiori informazioni...

Questa classe è stata introdotta in Qt 6.11.

Funzioni pubbliche

Pointer(Indirect &&pointed)
Pointer(const Indirect &pointed)
operator QVariant::ConstPointer<Indirect>() const
QVariant::Reference<Indirect> operator*() const

Descrizione dettagliata

QVariant::Pointer<Indirect> incapsula un valore puntato di tipo Indirect e restituisce un QVariant::Reference a esso tramite il suo operatore *(). Ciò la rende adatta come sostituto di un puntatore effettivo. Non è possibile restituire un puntatore effettivo dagli iteratori generici poiché gli iteratori non contengono un QVariant effettivo.

Documentazione delle funzioni membro

[explicit noexcept(...)] Pointer::Pointer(Indirect &&pointed)

Crea un oggetto ` QVariant::Pointer ` a partire dal valore ` pointed `.

Nota: questa funzione è noexcept quando std::is_nothrow_move_constructible_v<Indirect> è true.

[explicit noexcept(...)] Pointer::Pointer(const Indirect &pointed)

Crea un oggetto ` QVariant::Pointer ` a partire dal valore ` pointed `.

Nota: questa funzione è `noexcept` quando ` std::is_nothrow_copy_constructible_v<Indirect> ` è ` true`.

[noexcept(...)] Pointer::operator QVariant::ConstPointer<Indirect>() const

Converte questo QVariant::Pointer in un QVariant::ConstPointer.

Nota: questa funzione è `noexcept` quando ` std::is_nothrow_copy_constructible_v<Indirect> ` è ` true`.

[noexcept(...)] QVariant::Reference<Indirect> Pointer::operator*() const

Risolve il riferimento a ` QVariant::Pointer ` in ` QVariant::Reference`.

Nota: questa funzione è noexcept quando std::is_nothrow_copy_constructible_v<Indirect> è true.

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