QPropertyBindingError Class
| Überschrift: | #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) |
Ausführliche Beschreibung
QPropertyBindingError wird vom Eigenschaftssystem 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 abzurufen, die möglicherweise weitere Details enthält. Wenn kein Fehler vorliegt, 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();Dokumentation zu den Mitgliedstypen
enum QPropertyBindingError::Type
Diese Enumeration gibt an, welcher Fehler aufgetreten ist.
| Konstante | Wert | Beschreibung |
|---|---|---|
QPropertyBindingError::NoError | 0 | Bei der Auswertung der Bindung ist kein Fehler aufgetreten. |
QPropertyBindingError::BindingLoop | 1 | Die Auswertung der Bindung wurde beendet, weil eine Eigenschaft von ihrem eigenen Wert abhängig war. |
QPropertyBindingError::EvaluationError | 2 | Die Auswertung der Bindung wurde aus einem anderen Grund als einer Bindungsschleife abgebrochen. Dieser Wert wird beispielsweise in der QML-Engine verwendet, wenn während der Auswertung einer Bindung eine Ausnahme auftritt. |
QPropertyBindingError::UnknownError | 3 | Ein generischer Fehlertyp, der verwendet wird, wenn keiner der anderen Werte zutrifft. Der Aufruf von ` description()` liefert möglicherweise weitere Details. |
Dokumentation der Mitgliedsfunktion
QPropertyBindingError::QPropertyBindingError()
Bei Standardkonstrukten von `QPropertyBindingError` gibt `hasError()` den Wert „false“ zurück, `type` liefert „ NoError “ und ` description()` gibt eine leere Zeichenkette zurück.
QPropertyBindingError::QPropertyBindingError(QPropertyBindingError::Type type, const QString &description = QString())
Erzeugt ein `QPropertyBindingError` vom Typ ` type ` mit der Beschreibung ` description `.
QPropertyBindingError::QPropertyBindingError(const QPropertyBindingError &other)
Kopiert die Konstruktoren von `QPropertyBindingError` aus other.
QPropertyBindingError::QPropertyBindingError(QPropertyBindingError &&other)
QPropertyBindingError wird aus other verschoben. other bleibt in seinem Standardzustand erhalten.
[noexcept] QPropertyBindingError::~QPropertyBindingError()
Zerstört den „ QPropertyBindingError “.
QString QPropertyBindingError::description() const
Gibt eine beschreibende Fehlermeldung für die „ QPropertyBindingError “ zurück, sofern diese festgelegt wurde.
QPropertyBindingError::Type QPropertyBindingError::type() const
Gibt den Typ des ` QPropertyBindingError` zurück.
Siehe auch „ QPropertyBindingError::Type “.
QPropertyBindingError &QPropertyBindingError::operator=(QPropertyBindingError &&other)
other wird per Move-Zuweisung auf dieses QPropertyBindingError verschoben. other bleibt in seinem Standardzustand erhalten.
QPropertyBindingError &QPropertyBindingError::operator=(const QPropertyBindingError &other)
Kopiert „ other “ an diese Adresse: 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.