Sur cette page

QPropertyBindingError Class

En-tête : #include <QPropertyBindingError>
CMake : find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake : QT += core
Depuis : Qt 6.0

Types publics

enum Type { NoError, BindingLoop, EvaluationError, UnknownError }

Fonctions publiques

QPropertyBindingError()
QPropertyBindingError(QPropertyBindingError::Type type, const QString &description = QString())
QPropertyBindingError(const QPropertyBindingError &other)
QPropertyBindingError(QPropertyBindingError &&other)
~QPropertyBindingError()
QString description() const
QPropertyBindingError::Type type() const
QPropertyBindingError &operator=(QPropertyBindingError &&other)
QPropertyBindingError &operator=(const QPropertyBindingError &other)

Description détaillée

QPropertyBindingError est utilisé par le système des propriétés pour signaler les erreurs survenues lors de l'évaluation d'une liaison. Utilisez type() pour demander quelle erreur s'est produite et description() pour extraire un message d'erreur qui peut contenir plus de détails. S'il n'y a pas d'erreur, QPropertyBindingError est de type QPropertyBindingError::NoError et hasError() renvoie false.

extern QProperty<int> prop ;QPropertyBindingError error = prop.binding().error() ;if (error.hasError())     qDebug() << error.description();

Type de membre Documentation

enum QPropertyBindingError::Type

Cette énumération indique l'erreur qui s'est produite.

ConstanteValeurDescription de l'erreur
QPropertyBindingError::NoError0Aucune erreur n'est survenue lors de l'évaluation de la liaison.
QPropertyBindingError::BindingLoop1L'évaluation de la liaison a été interrompue parce qu'une propriété dépendait de sa propre valeur.
QPropertyBindingError::EvaluationError2L'évaluation de la liaison a été interrompue pour toute autre raison qu'une boucle de liaison. Par exemple, cette valeur est utilisée dans le moteur QML lorsqu'une exception se produit lors de l'évaluation d'une liaison.
QPropertyBindingError::UnknownError3Type d'erreur générique utilisé lorsqu'aucune des autres valeurs ne convient. L'appel à description() peut fournir des détails.

Documentation des fonctions membres

QPropertyBindingError::QPropertyBindingError()

La construction par défaut de QPropertyBindingError. hasError() renverra false, type renverra NoError et description() renverra une chaîne vide.

QPropertyBindingError::QPropertyBindingError(QPropertyBindingError::Type type, const QString &description = QString())

Construit une QPropertyBindingError de type type avec description comme description.

QPropertyBindingError::QPropertyBindingError(const QPropertyBindingError &other)

Copie-construit QPropertyBindingError à partir de other.

QPropertyBindingError::QPropertyBindingError(QPropertyBindingError &&other)

Move-construit QPropertyBindingError à partir de other. other sera laissé dans son état par défaut.

[noexcept] QPropertyBindingError::~QPropertyBindingError()

Détruit le site QPropertyBindingError.

QString QPropertyBindingError::description() const

Renvoie un message d'erreur descriptif pour QPropertyBindingError s'il a été défini.

QPropertyBindingError::Type QPropertyBindingError::type() const

Renvoie le type de QPropertyBindingError.

Voir aussi QPropertyBindingError::Type.

QPropertyBindingError &QPropertyBindingError::operator=(QPropertyBindingError &&other)

Move-assigne other à ce QPropertyBindingError. other sera laissé dans son état par défaut.

QPropertyBindingError &QPropertyBindingError::operator=(const QPropertyBindingError &other)

Copie other sur QPropertyBindingError.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.