En esta página

QVariant::ConstPointer Class

template <typename Indirect> class QVariant::ConstPointer

QVariant::ConstPointer Es una clase de plantilla que emula un puntero const a ` QVariant`. Más...

Esta clase se introdujo en Qt 6.11.

Funciones públicas

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

Descripción detallada

QVariant::ConstPointer<Indirect> envuelve un valor de tipo ` Indirect ` al que apunta y devuelve un ` QVariant::ConstReference ` a dicho valor mediante su operador *(). Esto la hace adecuada 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 noexcept(...)] ConstPointer::ConstPointer(Indirect &&pointed)

Crea un objeto ` QVariant::ConstPointer ` a partir del valor ` pointed `.

Nota: Esta función es «noexcept» cuando ` std::is_nothrow_move_constructible_v<Indirect> ` es ` true`.

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

Crea un objeto ` QVariant::ConstPointer ` a partir del valor ` pointed `.

Nota: Esta función es «noexcept» cuando ` std::is_nothrow_copy_constructible_v<Indirect> ` es ` true`.

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

Desreferencia el ` QVariant::ConstPointer ` a un ` QVariant::ConstReference`.

Nota: Esta función es «noexcept» cuando std::is_nothrow_copy_constructible_v<Indirect> es 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.