QPropertyBindingError Class
| 헤더: | #include <QPropertyBindingError> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
| qmake: | QT += core |
| 다음부터: | Qt 6.0부터 |
공개 타입
| enum | Type { NoError, BindingLoop, EvaluationError, UnknownError } |
공개 함수
| 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) |
상세 설명
QPropertyBindingError는 속성 시스템에서 바인딩을 평가할 때 발생한 오류를 보고하는 데 사용됩니다. type()을 사용하여 어떤 오류가 발생했는지 조회하고, description()을 사용하여 더 자세한 내용이 포함될 수 있는 오류 메시지를 추출할 수 있습니다. 오류가 없는 경우, QPropertyBindingError의 타입은 QPropertyBindingError::NoError 이며 hasError() 는 false를 반환합니다.
extern QProperty<int> prop;
QPropertyBindingError error = prop.binding().error();
if (error.hasError())
qDebug() << error.description();회원 유형 설명서
enum QPropertyBindingError::Type
이 열거형은 발생한 오류 유형을 지정합니다.
| 상수 | 값 | 설명 |
|---|---|---|
QPropertyBindingError::NoError | 0 | 바인딩을 평가하는 동안 오류가 발생하지 않았습니다. |
QPropertyBindingError::BindingLoop | 1 | 속성이 자체 값에 의존하여 바인딩 평가가 중지되었습니다. |
QPropertyBindingError::EvaluationError | 2 | 바인딩 루프 이외의 다른 이유로 바인딩 평가가 중단되었습니다. 예를 들어, 바인딩 평가 중에 예외가 발생했을 때 QML 엔진에서 이 값이 사용됩니다. |
QPropertyBindingError::UnknownError | 3 | 다른 값 중 어느 것도 적합하지 않을 때 사용되는 일반적인 오류 유형입니다. description()를 호출하면 자세한 내용을 확인할 수 있습니다. |
멤버 함수 문서
QPropertyBindingError::QPropertyBindingError()
기본 생성자는 QPropertyBindingError를 생성합니다. hasError()는 false를 반환하고, type은 “ NoError ”를 반환하며, description()는 빈 문자열을 반환합니다.
QPropertyBindingError::QPropertyBindingError(QPropertyBindingError::Type type, const QString &description = QString())
description 를 설명으로 갖는 type 유형의 QPropertyBindingError 객체를 생성합니다.
QPropertyBindingError::QPropertyBindingError(const QPropertyBindingError &other)
other 에서 QPropertyBindingError를 복사 생성합니다.
QPropertyBindingError::QPropertyBindingError(QPropertyBindingError &&other)
other 에서 QPropertyBindingError를 이동 생성합니다. other 는 기본 상태로 유지됩니다.
[noexcept] QPropertyBindingError::~QPropertyBindingError()
QPropertyBindingError 를 삭제합니다.
QString QPropertyBindingError::description() const
QPropertyBindingError 가 설정되어 있는 경우, 이에 대한 설명이 포함된 오류 메시지를 반환합니다.
QPropertyBindingError::Type QPropertyBindingError::type() const
QPropertyBindingError 의 유형을 반환합니다.
QPropertyBindingError::Type도 참조하십시오 .
QPropertyBindingError &QPropertyBindingError::operator=(QPropertyBindingError &&other)
other 를 이 QPropertyBindingError 로 이동-할당합니다. other 는 기본 상태로 유지됩니다.
QPropertyBindingError &QPropertyBindingError::operator=(const QPropertyBindingError &other)
other 를 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.