Sur cette page

QVariant::ConstPointer Class

template <typename Indirect> class QVariant::ConstPointer

QVariant::ConstPointer est une classe modèle qui émule un pointeur constant vers QVariant. Plus...

Cette classe a été introduite dans Qt 6.11.

Fonctions publiques

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

Description détaillée

QVariant::ConstPointer Enveloppe la valeur pointée et renvoie une adresse QVariant::ConstReference à 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(...)] ConstPointer::ConstPointer(Indirect &&pointed)

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

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

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

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

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

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

Déférence le site QVariant::ConstPointer vers un site QVariant::ConstReference.

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.