QVariant::ConstPointer Class
template <typename Indirect> class QVariant::ConstPointerQVariant::ConstPointer est une classe de modèle qui émule un pointeur const vers QVariant. En savoir 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<Indirect> encapsule une valeur de type ` Indirect ` pointée et renvoie une ` QVariant::ConstReference ` 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 sur les fonctions membres
[explicit noexcept(...)] ConstPointer::ConstPointer(Indirect &&pointed)
Crée un objet de type ` QVariant::ConstPointer ` à 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(...)] ConstPointer::ConstPointer(const Indirect &pointed)
Crée un objet de type ` QVariant::ConstPointer ` à partir de la valeur ` pointed `.
Remarque : cette fonction est de type « noexcept » lorsque std::is_nothrow_copy_constructible_v<Indirect> est égal à true.
[noexcept(...)] QVariant::ConstReference<Indirect> ConstPointer::operator*() const
Déréférence l'QVariant::ConstPointer vers un QVariant::ConstReference.
Remarque : cette fonction est de type « 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.