Sur cette page

QVariant::Pointer Class

template <typename Indirect> class QVariant::Pointer

QVariant::Pointer est une classe de modèle qui émule un pointeur non constant vers QVariant. En savoir 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<Indirect> encapsule une valeur de type ` Indirect ` pointée par un pointeur et renvoie un ` QVariant::Reference ` vers celle-ci via son opérateur `*()`. Cela permet de l'utiliser en remplacement d'un pointeur réel. Il n'est pas possible de renvoyer un pointeur réel à partir d'itérateurs génériques, car ceux-ci ne contiennent pas de pointeur réel ` QVariant`.

Documentation des fonctions membres

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

Crée un objet de type ` QVariant::Pointer ` à partir de la valeur ` pointed `.

Remarque : cette fonction est de type « noexcept » lorsque std::is_nothrow_move_constructible_v<Indirect> est égal à true.

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

Crée un objet de type ` QVariant::Pointer ` à partir de la valeur ` pointed `.

Remarque : cette fonction est de type « noexcept » lorsque ` std::is_nothrow_copy_constructible_v<Indirect> ` est égal à ` true`.

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

Convertit cette QVariant::Pointer en une QVariant::ConstPointer.

Remarque : cette fonction est de type « noexcept » lorsque ` std::is_nothrow_copy_constructible_v<Indirect> ` est de type ` true`.

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

Déréférence l'QVariant::Pointer vers un QVariant::Reference.

Remarque : cette fonction est « noexcept » lorsque std::is_nothrow_copy_constructible_v<Indirect> est de type 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.