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

QVariantConstPointer Class

Emulated const pointer to QVariant based on a pointer.

This class was introduced in Qt 6.0.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QVariantConstPointer Class

  • Header: QVariantConstPointer

  • Since: Qt 6.0

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS Core)

    target_link_libraries(mytarget PRIVATE Qt6::Core)

  • qmake: QT += core

Detailed Description

QVariantConstPointer wraps a QVariant and returns it from its operator*(). This makes it suitable as replacement for an actual const pointer. We cannot return an actual const pointer from generic iterators as the iterators don't hold an actual QVariant.

Member Function Documentation

 

[explicit] QVariantConstPointer::QVariantConstPointer(QVariant variant)

Constructs a QVariantConstPointer from a variant.

QVariant QVariantConstPointer::operator*() const

Dereferences the QVariantConstPointer to retrieve its internal QVariant.

const QVariant *QVariantConstPointer::operator->() const

Returns a const pointer to the QVariant, conforming to the conventions for operator->().

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