QVariantRef Class
template <typename Pointer> class QVariantRefEl QVariantRef actúa como una referencia no-const a un QVariant. Más....
| Cabecera: | #include <QVariantRef> |
| 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
| QVariantRef(const Pointer *pointer) | |
| operator QVariant() const | |
| QVariantRef<Pointer> & | operator=(QVariantRef<Pointer> &&value) |
| QVariantRef<Pointer> & | operator=(const QVariant &value) |
| QVariantRef<Pointer> & | operator=(const QVariantRef<Pointer> &value) |
Descripción detallada
Utilice QVariant::Reference en su lugar.
Como los iteradores genéricos no instancian realmente un QVariant en cada paso, no pueden devolver una referencia a uno desde operator*(). QVariantRef proporciona la misma funcionalidad que una referencia real a QVariant, pero está respaldada por un puntero dado como parámetro de plantilla. La plantilla está implementada para punteros de tipo QSequentialIterator y QAssociativeIterator.
Documentación de funciones miembro
[explicit] QVariantRef::QVariantRef(const Pointer *pointer)
Crea un QVariantRef a partir de un pointer.
QVariantRef::operator QVariant() const
Resuelve el QVariantRef a un QVariant real .
QVariantRef<Pointer> &QVariantRef::operator=(QVariantRef<Pointer> &&value)
Asigna un nuevo value al valor apuntado por el puntero al que se refiere este QVariantRef.
QVariantRef<Pointer> &QVariantRef::operator=(const QVariant &value)
Asigna un nuevo value al valor apuntado por el puntero al que se refiere este QVariantRef.
QVariantRef<Pointer> &QVariantRef::operator=(const QVariantRef<Pointer> &value)
Asigna un nuevo value al valor apuntado por el puntero al que se refiere este QVariantRef.
© 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.