QVariantPointer Class
template <typename Pointer> class QVariantPointerQVariantPointer es una clase de plantilla que emula un puntero a un QVariant, basándose en un puntero. Más información...
| Cabecera: | #include <qvariant.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
| qmake: | QT += core |
| Desde: | Qt 6.0 |
| Estado: | Hasta la versión 6.15 |
Está previsto que esta clase quede obsoleta en la versión 6.15.
Funciones públicas
| QVariantPointer(const Pointer *pointer) | |
| QVariantRef<Pointer> | operator*() const |
| Pointer | operator->() const |
Descripción detallada
Utiliza « QVariant::Pointer » en su lugar.
QVariantPointer<Pointer> envuelve un puntero de tipo Pointer y devuelve un QVariantRef o a este mediante su operador *(). Esto lo hace adecuado como sustituto de un puntero real. No podemos devolver un puntero real desde iteradores genéricos, ya que los iteradores no contienen un QVariant real.
Documentación de las funciones miembro
[explicit] QVariantPointer::QVariantPointer(const Pointer *pointer)
Crea un `QVariantPointer` a partir del ` pointer` proporcionado.
QVariantRef<Pointer> QVariantPointer::operator*() const
Desreferencia el objeto ` QVariantPointer ` a un objeto ` QVariantRef`.
Pointer QVariantPointer::operator->() const
Desreferencia y devuelve el puntero. Se espera que el puntero también implemente el operador ->().
© 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.