QVariantPointer Classtemplate <typename Pointer> class QVariantPointer
|CMake:|| find_package(Qt6 REQUIRED COMPONENTS Core) |
target_link_libraries(mytarget PRIVATE Qt6::Core)
|qmake:||QT += core|
|QVariantPointer(const Pointer *pointer)|
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.
Member Function Documentation
Constructs a QVariantPointer from the given pointer.
QVariantRef<Pointer> QVariantPointer::operator*() const
Dereferences and returns the pointer. The pointer is expected to also implement operator->().
© 2022 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.