En esta página

QVariant::Pointer Class

template <typename Indirect> class QVariant::Pointer

QVariant::Pointer Es una clase de plantilla que emula un puntero no constante a ` QVariant`. Más información...

Esta clase se introdujo en Qt 6.11.

Funciones públicas

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

Descripción detallada

QVariant::Pointer<Indirect> envuelve un valor de tipo Indirect al que apunta y devuelve un QVariant::Reference 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(...)] Pointer::Pointer(Indirect &&pointed)

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

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

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

Crea un objeto de tipo ` QVariant::Pointer ` a partir del valor ` pointed `.

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

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

Convierte este ` QVariant::Pointer ` en un ` QVariant::ConstPointer`.

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

[noexcept(...)] QVariant::Reference<Indirect> Pointer::operator*() const

Desreferencia el ` QVariant::Pointer ` a un ` QVariant::Reference`.

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.