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

이 열거형은 발생한 오류를 지정합니다.

Constant설명
QPropertyBindingError::NoError0바인딩을 평가하는 동안 오류가 발생하지 않았습니다.
QPropertyBindingError::BindingLoop1속성이 자체 값에 종속되어 있기 때문에 바인딩 평가가 중지되었습니다.
QPropertyBindingError::EvaluationError2바인딩 루프가 아닌 다른 이유로 바인딩 평가가 중지되었습니다. 예를 들어, 이 값은 바인딩이 평가되는 동안 예외가 발생할 때 QML 엔진에서 사용됩니다.
QPropertyBindingError::UnknownError3다른 값 중 어느 것도 적합하지 않을 때 사용되는 일반 오류 유형입니다. 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 으로 복사합니다.

© 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.