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;
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())
`type ` 型の `QPropertyBindingError` を、説明として `description ` を指定して生成します。
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.