Nesta página

QVariant::ConstPointer Class

template <typename Indirect> class QVariant::ConstPointer

QVariant::ConstPointer é uma classe modelo que emula um ponteiro const para um QVariant. Mais...

Essa classe foi introduzida no Qt 6.11.

Funções públicas

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

Descrição detalhada

QVariant::ConstPointer<Indirect> envolve um valor apontado do tipo Indirect e retorna um QVariant::ConstReference para ele por meio de seu operador*(). Isso a torna adequada como substituto para um ponteiro real. Não podemos retornar um ponteiro real a partir de iteradores genéricos, pois os iteradores não mantêm um QVariant real.

Documentação das funções-membro

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

Cria um objeto ` QVariant::ConstPointer ` a partir do valor ` pointed `.

Observação: Esta função é `noexcept` quando ` std::is_nothrow_move_constructible_v<Indirect> ` é ` true`.

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

Cria um objeto ` QVariant::ConstPointer ` a partir do valor ` pointed `.

Observação: Esta função é `noexcept` quando ` std::is_nothrow_copy_constructible_v<Indirect> ` é ` true`.

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

Desreferencia o ` QVariant::ConstPointer ` para um ` QVariant::ConstReference`.

Observação: Esta função é `noexcept` quando ` std::is_nothrow_copy_constructible_v<Indirect> ` é ` 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.