En esta página

QVariantConstPointer Class

Puntero const emulado a QVariant basado en un puntero. Más...

Cabecera: #include <QVariantConstPointer>
CMake: find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core
Desde: Qt 6.0
Estado: Hasta 6.15

Esta clase está programada para ser obsoleta en la versión 6.15.

Funciones Públicas

QVariantConstPointer(QVariant variant)
QVariant operator*() const
const QVariant *operator->() const

Descripción detallada

Utiliza QVariant::ConstPointer en su lugar.

QVariantConstPointer envuelve un QVariant y lo devuelve desde su operator*(). Esto lo hace adecuado como reemplazo de un puntero const real. No podemos devolver un puntero const real desde iteradores genéricos ya que los iteradores no contienen un QVariant real.

Documentación de funciones miembro

[explicit] QVariantConstPointer::QVariantConstPointer(QVariant variant)

Construye un QVariantConstPointer a partir de un variant.

QVariant QVariantConstPointer::operator*() const

Hace referencia a QVariantConstPointer para recuperar su dirección interna QVariant.

const QVariant *QVariantConstPointer::operator->() const

Devuelve un puntero constante a QVariant, conforme a las convenciones de operator->().

© 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.