Sur cette page

QVariant::Pointer Class

template <typename Indirect> class QVariant::Pointer

QVariant::Pointer est une classe modèle qui émule un pointeur non-const sur QVariant. Plus...

Cette classe a été introduite dans Qt 6.11.

Fonctions publiques

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

Description détaillée

QVariant::Pointer Enveloppe la valeur pointée et renvoie une adresse QVariant::Reference à partir de son operator*(). Cela permet de remplacer un pointeur réel. Il n'est pas possible de renvoyer un pointeur réel à partir d'itérateurs génériques, car ces derniers ne contiennent pas de QVariant.

Documentation sur les fonctions membres

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

Construit un QVariant::Pointer à partir de la valeur pointed to.

Note : Cette fonction est noexcept lorsque std::is_nothrow_move_constructible_v<Indirect> est true.

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

Construit un QVariant::Pointer à partir de la valeur pointed to.

Note : Cette fonction est noexcept lorsque std::is_nothrow_copy_constructible_v<Indirect> est true.

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

Convertit ce QVariant::Pointer en QVariant::ConstPointer.

Note : Cette fonction est noexcept lorsque std::is_nothrow_copy_constructible_v<Indirect> est true.

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

Déférence le site QVariant::Pointer vers un site QVariant::Reference.

Note : Cette fonction est noexcept lorsque std::is_nothrow_copy_constructible_v<Indirect> est 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.