QVariant::Pointer Class
template <typename Indirect> class QVariant::PointerQVariant::Pointer é uma classe modelo que emula um ponteiro não const para um QVariant. Mais...
Essa classe foi introduzida no Qt 6.11.
Funções públicas
| Pointer(Indirect &&pointed) | |
| Pointer(const Indirect &pointed) | |
| operator QVariant::ConstPointer<Indirect>() const | |
| QVariant::Reference<Indirect> | operator*() const |
Descrição detalhada
QVariant::Pointer<Indirect> envolve um valor apontado do tipo ` Indirect ` e retorna um ` QVariant::Reference ` 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(...)] Pointer::Pointer(Indirect &&pointed)
Cria um objeto ` QVariant::Pointer ` a partir do valor ` pointed `.
Observação: Esta função é `noexcept` quando ` std::is_nothrow_move_constructible_v<Indirect> ` é ` true`.
[explicit noexcept(...)] Pointer::Pointer(const Indirect &pointed)
Cria um objeto ` QVariant::Pointer ` a partir do valor ` pointed `.
Observação: Esta função é `noexcept` quando ` std::is_nothrow_copy_constructible_v<Indirect> ` é ` true`.
[noexcept(...)] Pointer::operator QVariant::ConstPointer<Indirect>() const
Converte este ` QVariant::Pointer ` em um ` QVariant::ConstPointer`.
Observação: Esta função é `noexcept` quando ` std::is_nothrow_copy_constructible_v<Indirect> ` é ` true`.
[noexcept(...)] QVariant::Reference<Indirect> Pointer::operator*() const
Desreferencia o ` QVariant::Pointer ` para um ` QVariant::Reference`.
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.