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 を返します。

externQProperty<int>prop;QPropertyBindingErrorerror=prop.binding().error();if(error.hasError())     qDebug() << error.description();

メンバー・タイプ・ドキュメンテーション

enum QPropertyBindingError::Type

この列挙型は、どのエラーが発生したかを指定する。

定数説明
QPropertyBindingError::NoError0バインディングの評価中にエラーは発生しませんでした。
QPropertyBindingError::BindingLoop1プロパティがそれ自身の値に依存していたため、バインディング評価が停止しました。
QPropertyBindingError::EvaluationError2バインディングループ以外の理由でバインディング評価が停止した。例えば、バインディングの評価中に例外が発生した場合、QMLエンジンでこの値が使用されます。
QPropertyBindingError::UnknownError3他のいずれの値も適切でない場合に使用される汎用的なエラータイプ。description() を呼び出すと詳細がわかるかもしれません。

メンバ関数ドキュメント

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)

Move-construct QPropertyBindingError fromother.other はデフォルトの状態のままになります。

[noexcept] QPropertyBindingError::~QPropertyBindingError()

QPropertyBindingError を破壊する。

QString QPropertyBindingError::description() const

QPropertyBindingError が設定されている場合、そのエラーメッセージを返す。

QPropertyBindingError::Type QPropertyBindingError::type() const

QPropertyBindingError の型を返します。

QPropertyBindingError::Typeも参照

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

Move-assignother をこの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.