QVariantConstPointer Class
Pointeur constant émulé vers QVariant basé sur un pointeur. Plus d'informations...
| En-tête : | #include <QVariantConstPointer> |
| CMake : | find_package(Qt6 REQUIRED COMPONENTS Core)target_link_libraries(mytarget PRIVATE Qt6::Core) |
| qmake : | QT += core |
| Depuis : | Qt 6.0 |
Fonctions publiques
| QVariantConstPointer(QVariant variant) | |
| QVariant | operator*() const |
| const QVariant * | operator->() const |
Description détaillée
QVariantConstPointer enveloppe un QVariant et le renvoie à partir de son operator*(). Cela lui permet de remplacer un pointeur constant réel. Nous ne pouvons pas renvoyer un pointeur constant réel à partir d'itérateurs génériques car les itérateurs ne contiennent pas de QVariant.
Documentation des fonctions membres
[explicit] QVariantConstPointer::QVariantConstPointer(QVariant variant)
Construit un QVariantConstPointer à partir d'un variant.
QVariant QVariantConstPointer::operator*() const
Déréférence le site QVariantConstPointer pour récupérer son site interne QVariant.
const QVariant *QVariantConstPointer::operator->() const
Renvoie un pointeur constant vers QVariant, conformément aux conventions de operator->().
© 2025 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.