Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QVariantPointer< Pointer > Class Template Reference

QVariantPointer is a template class that emulates a pointer to QVariant based on a pointer. More...

#include <qvariant.h>

+ Collaboration diagram for QVariantPointer< Pointer >:

Public Member Functions

 QVariantPointer (const Pointer *pointer)
 Constructs a QVariantPointer from the given pointer.
 
QVariantRef< Pointer > operator* () const
 Dereferences the QVariantPointer to a QVariantRef.
 
Pointer operator-> () const
 Dereferences and returns the pointer.
 

Detailed Description

template<typename Pointer>
class QVariantPointer< Pointer >

QVariantPointer is a template class that emulates a pointer to QVariant based on a pointer.

Since
6.0 \inmodule QtCore

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.

Definition at line 871 of file qvariant.h.

Constructor & Destructor Documentation

◆ QVariantPointer()

template<typename Pointer >
template< typename Pointer > QVariantPointer< Pointer >::QVariantPointer ( const Pointer * pointer)
inlineexplicit

Constructs a QVariantPointer from the given pointer.

Definition at line 877 of file qvariant.h.

Member Function Documentation

◆ operator*()

template<typename Pointer >
template< typename Pointer > QVariantRef< Pointer > QVariantPointer< Pointer >::operator* ( ) const
inline

Dereferences the QVariantPointer to a QVariantRef.

Definition at line 878 of file qvariant.h.

◆ operator->()

template<typename Pointer >
template< typename Pointer > Pointer QVariantPointer< Pointer >::operator-> ( ) const
inline

Dereferences and returns the pointer.

The pointer is expected to also implement operator->().

Definition at line 879 of file qvariant.h.


The documentation for this class was generated from the following files: