QVariantRef 充当非常量引用为 QVariant . 更多...
头: | #include <QVariantRef> |
CMake: |
find_package(Qt6 COMPONENTS Core REQUIRED)
target_link_libraries(mytarget PRIVATE Qt6::Core) |
qmake: | QT += core |
Since: | Qt 6.0 |
QVariantRef (const Pointer * pointer ) | |
QVariantRef<Pointer> & | operator= (QVariantRef<Pointer> && value ) |
QVariantRef<Pointer> & | operator= (const QVariantRef<Pointer> & value ) |
QVariantRef<Pointer> & | operator= (const QVariant & value ) |
QVariant | operator QVariant () const |
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.
Creates a QVariantRef from an pointer .
Assigns a new value to the value pointed to by the pointer this QVariantRef refers to.
Assigns a new value to the value pointed to by the pointer this QVariantRef refers to.
Assigns a new value to the value pointed to by the pointer this QVariantRef refers to.
Resolves the QVariantRef to an actual QVariant .