QVariantPointer is a template class that emulates a pointer to QVariant based on a pointer. More...
Header: | #include <QVariantPointer> |
CMake: | find_package(Qt6 COMPONENTS Core REQUIRED) target_link_libraries(mytarget PRIVATE Qt6::Core) |
qmake: | QT += core |
Since: | Qt 6.0 |
QVariantPointer(const Pointer *pointer) | |
QVariantRef<Pointer> | operator*() const |
Pointer | operator->() const |
QVariantConstPointer wraps a pointer and returns QVariantRef to it from its operator*(). This makes it suitable as replacement for an actual pointer. We cannot return an actual pointer from generic iterators as the iterators don't hold an actual QVariant.
Constructs a QVariantPointer from the given pointer.
Dereferences the QVariantPointer to a QVariantRef.
Dereferences and returns the pointer. The pointer is expected to also implement operator->().
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.2/qvariantpointer.html