QVariant::Pointer Class
template <typename Indirect> class QVariant::PointerQVariant::Pointer is a template class that emulates a non-const pointer to QVariant. More...
This class was introduced in Qt 6.11.
Public Functions
| Pointer(Indirect &&pointed) | |
| Pointer(const Indirect &pointed) | |
| QVariant::ConstPointer<Indirect> | operator QVariant::ConstPointer<Indirect>() const |
| QVariant::Reference<Indirect> | operator*() const |
Detailed Description
QVariant::Pointer<Indirect> wraps a pointed-to value of type Indirect and returns a QVariant::Reference 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
[explicit noexcept(...)] Pointer::Pointer(Indirect &&pointed)
Constructs a QVariant::Pointer from the value pointed to.
Note: This function is noexcept when std::is_nothrow_move_constructible_v<Indirect> is true.
[explicit noexcept(...)] Pointer::Pointer(const Indirect &pointed)
Constructs a QVariant::Pointer from the value pointed to.
Note: This function is noexcept when std::is_nothrow_copy_constructible_v<Indirect> is true.
[noexcept(...)] QVariant::ConstPointer<Indirect> Pointer::operator QVariant::ConstPointer<Indirect>() const
Converts this QVariant::Pointer into a QVariant::ConstPointer.
Note: This function is noexcept when std::is_nothrow_copy_constructible_v<Indirect> is true.
[noexcept(...)] QVariant::Reference<Indirect> Pointer::operator*() const
Dereferences the QVariant::Pointer to a QVariant::Reference.
Note: This function is noexcept when std::is_nothrow_copy_constructible_v<Indirect> is 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.