![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
The QVariantRef acts as a non-const reference to a QVariant. More...
#include <qvariant.h>
Public Member Functions | |
QVariantRef (const Pointer *reference) | |
Creates a QVariantRef from an pointer. | |
QVariantRef (const QVariantRef &)=default | |
QVariantRef (QVariantRef &&)=default | |
~QVariantRef ()=default | |
operator QVariant () const | |
Resolves the QVariantRef to an actual QVariant. | |
QVariantRef & | operator= (const QVariant &value) |
Assigns a new value to the value pointed to by the pointer this QVariantRef refers to. | |
QVariantRef & | operator= (const QVariantRef &value) |
Assigns a new value to the value pointed to by the pointer this QVariantRef refers to. | |
QVariantRef & | operator= (QVariantRef &&value) |
Assigns a new value to the value pointed to by the pointer this QVariantRef refers to. | |
operator QVariant () const | |
QVariantRef< QAssociativeIterator > & | operator= (const QVariant &value) |
operator QVariant () const | |
QVariantRef< QSequentialIterator > & | operator= (const QVariant &value) |
Friends | |
void | swap (QVariantRef a, QVariantRef b) |
The QVariantRef acts as a non-const reference to a QVariant.
As the generic iterators don't actually instantiate a QVariant on each step, they cannot return a reference to one from operator*(). QVariantRef provides the same functionality as an actual reference to a QVariant would, but is backed by a pointer given as template parameter. The template is implemented for pointers of type QSequentialIterator and QAssociativeIterator.
Definition at line 823 of file qvariant.h.
|
inlineexplicit |
Creates a QVariantRef from an pointer.
Definition at line 829 of file qvariant.h.
|
default |
|
default |
|
default |
|
inline |
Definition at line 133 of file qassociativeiterable.h.
|
inline |
Definition at line 124 of file qsequentialiterable.h.
QVariantRef< Pointer >::operator QVariant | ( | ) | const |
Resolves the QVariantRef to an actual QVariant.
|
inline |
Definition at line 150 of file qassociativeiterable.h.
|
inline |
Definition at line 136 of file qsequentialiterable.h.
QVariantRef & QVariantRef< Pointer >::operator= | ( | const QVariant & | value | ) |
Assigns a new value to the value pointed to by the pointer this QVariantRef refers to.
|
inline |
Assigns a new value to the value pointed to by the pointer this QVariantRef refers to.
Definition at line 836 of file qvariant.h.
|
inline |
Assigns a new value to the value pointed to by the pointer this QVariantRef refers to.
Definition at line 837 of file qvariant.h.
|
friend |
Definition at line 839 of file qvariant.h.