IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QVariantRef Class

The QVariantRef acts as a non-const reference to a QVariant.

This class was introduced in Qt 6.0.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QVariantRef Class

  • Header: QVariantRef

  • Since: Qt 6.0

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS Core)

    target_link_libraries(mytarget PRIVATE Qt6::Core)

  • qmake: QT += core

Detailed Description

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.

Member Function Documentation

 

[explicit] QVariantRef::QVariantRef(const Pointer *pointer)

Creates a QVariantRef from an pointer.

QVariant QVariantRef::operator QVariant() const

Resolves the QVariantRef to an actual QVariant.

QVariantRef<Pointer> &QVariantRef::operator=(const QVariant &value)

Assigns a new value to the value pointed to by the pointer this QVariantRef refers to.

QVariantRef<Pointer> &QVariantRef::operator=(const QVariantRef<Pointer> &value)

Assigns a new value to the value pointed to by the pointer this QVariantRef refers to.

QVariantRef<Pointer> &QVariantRef::operator=(QVariantRef<Pointer> &&value)

Assigns a new value to the value pointed to by the pointer this QVariantRef refers to.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+