QPropertyBindingError Class
Kopfzeile: | #include <QPropertyBindingError> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
qmake: | QT += core |
Seit: | Qt 6.0 |
Öffentliche Typen
enum | Type { NoError, BindingLoop, EvaluationError, UnknownError } |
Öffentliche Funktionen
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) |
Detaillierte Beschreibung
QPropertyBindingError wird vom Property-System verwendet, um Fehler zu melden, die bei der Auswertung einer Bindung aufgetreten sind. Verwenden Sie type(), um abzufragen, welcher Fehler aufgetreten ist, und description(), um eine Fehlermeldung zu extrahieren, die weitere Details enthalten kann. Liegt kein Fehler vor, hat QPropertyBindingError den Typ QPropertyBindingError::NoError
und hasError()
gibt false zurück.
extern QProperty<int> prop;QPropertyBindingError error = prop.binding().error();if (error.hasError()) qDebug() << error.description();
Mitgliedstyp Dokumentation
enum QPropertyBindingError::Type
Diese Aufzählung gibt an, welcher Fehler aufgetreten ist.
Konstante | Wert | Beschreibung |
---|---|---|
QPropertyBindingError::NoError | 0 | Bei der Auswertung des Datenflusses ist kein Fehler aufgetreten. |
QPropertyBindingError::BindingLoop | 1 | Die Auswertung des Datenflusses wurde gestoppt, weil eine Eigenschaft von ihrem eigenen Wert abhing. |
QPropertyBindingError::EvaluationError | 2 | Die Bindungsauswertung wurde aus einem anderen Grund als einer Bindungsschleife gestoppt. Dieser Wert wird zum Beispiel in der QML-Engine verwendet, wenn bei der Auswertung eines Datenflusses eine Ausnahme auftritt. |
QPropertyBindingError::UnknownError | 3 | Ein allgemeiner Fehlertyp, der verwendet wird, wenn keiner der anderen Werte geeignet ist. Der Aufruf von description() kann Details liefern. |
Dokumentation der Mitgliedsfunktionen
QPropertyBindingError::QPropertyBindingError()
Standardkonstrukte QPropertyBindingError. hasError() gibt false zurück, type gibt NoError
zurück und description() gibt einen leeren String zurück.
QPropertyBindingError::QPropertyBindingError(QPropertyBindingError::Type type, const QString &description = QString())
Konstruiert einen QPropertyBindingError vom Typ type mit description als Beschreibung.
QPropertyBindingError::QPropertyBindingError(const QPropertyBindingError &other)
Kopiert QPropertyBindingError von other.
QPropertyBindingError::QPropertyBindingError(QPropertyBindingError &&other)
Move-konstruiert QPropertyBindingError aus other. other wird in seinem Standardzustand belassen.
[noexcept]
QPropertyBindingError::~QPropertyBindingError()
Zerstört die QPropertyBindingError.
QString QPropertyBindingError::description() const
Gibt eine beschreibende Fehlermeldung für die QPropertyBindingError zurück, wenn sie gesetzt wurde.
QPropertyBindingError::Type QPropertyBindingError::type() const
Gibt den Typ des QPropertyBindingError zurück.
Siehe auch QPropertyBindingError::Type.
QPropertyBindingError &QPropertyBindingError::operator=(QPropertyBindingError &&other)
Verschieben - weist other dieser QPropertyBindingError zu. other wird in seinem Standardzustand belassen.
QPropertyBindingError &QPropertyBindingError::operator=(const QPropertyBindingError &other)
Kopien other zu diesem QPropertyBindingError.
© 2025 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.