En esta página

QPropertyBindingError Class

Cabecera: #include <QPropertyBindingError>
CMake: find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core
Desde: Qt 6.0

Tipos Públicos

enum Type { NoError, BindingLoop, EvaluationError, UnknownError }

Funciones públicas

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)

Descripción detallada

QPropertyBindingError es utilizado por el sistema de propiedades para informar de los errores que se han producido al evaluar un enlace. Utiliza type() para consultar qué error se ha producido, y description() para extraer un mensaje de error que puede contener más detalles. Si no hay error, QPropertyBindingError tiene el tipo QPropertyBindingError::NoError y hasError() devuelve false.

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

Documentación del tipo de miembro

enum QPropertyBindingError::Type

Este enum especifica qué error se ha producido.

ConstanteValorDescripción
QPropertyBindingError::NoError0No se ha producido ningún error al evaluar el enlace.
QPropertyBindingError::BindingLoop1La evaluación de la vinculación se detuvo porque una propiedad dependía de su propio valor.
QPropertyBindingError::EvaluationError2La evaluación de la vinculación se detuvo por cualquier otro motivo que no fuera un bucle de vinculación. Por ejemplo, este valor se utiliza en el motor QML cuando se produce una excepción durante la evaluación de un enlace.
QPropertyBindingError::UnknownError3Un tipo de error genérico utilizado cuando ninguno de los otros valores es adecuado. La llamada a description() puede proporcionar detalles.

Documentación de las funciones miembro

QPropertyBindingError::QPropertyBindingError()

Construcciones por defecto QPropertyBindingError. hasError() devolverá false, type devolverá NoError y description() devolverá una cadena vacía.

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

Construye un QPropertyBindingError de tipo type con description como descripción.

QPropertyBindingError::QPropertyBindingError(const QPropertyBindingError &other)

Copia-construye QPropertyBindingError de other.

QPropertyBindingError::QPropertyBindingError(QPropertyBindingError &&other)

Move-construye QPropertyBindingError a partir de other. other se dejará en su estado por defecto.

[noexcept] QPropertyBindingError::~QPropertyBindingError()

Destruye el QPropertyBindingError.

QString QPropertyBindingError::description() const

Devuelve un mensaje de error descriptivo para QPropertyBindingError si se ha establecido.

QPropertyBindingError::Type QPropertyBindingError::type() const

Devuelve el tipo de QPropertyBindingError.

Véase también QPropertyBindingError::Type.

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

Mover-asigna other a este QPropertyBindingError. other se dejará en su estado por defecto.

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

Copias other a este 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.