このページでは

QQmlSA::Binding Class

class QQmlSA::Binding

特定の型に対する単一の QML プロパティバインディングを表します。詳細...

ヘッダー: #include <qqmlsa.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS QmlCompiler)
target_link_libraries(mytarget PRIVATE Qt6::QmlCompiler)
ステータス: テクノロジープレビュー

このクラスはテクノロジープレビュー段階にあり、変更される可能性があります。

パブリック型

(technology preview) class Bindings

パブリック関数

Binding()
Binding(const QQmlSA::Binding &other)
Binding(QQmlSA::Binding &&other)
~Binding()
QQmlSA::Element attachedType() const
QQmlSA::Element bindingScope() const
QQmlSA::BindingType bindingType() const
QQmlSA::Element groupType() const
bool hasFunctionScriptValue() const
bool hasObject() const
bool hasUndefinedScriptValue() const
bool isAttached() const
double numberValue() const
QQmlSA::Element objectType() const
QString propertyName() const
QQmlSA::ScriptBindingKind scriptKind() const
QQmlSA::SourceLocation sourceLocation() const
QString stringValue() const
QQmlSA::Binding &operator=(QQmlSA::Binding &&other)
QQmlSA::Binding &operator=(const QQmlSA::Binding &other)

静的パブリック メンバー

bool isLiteralBinding(QQmlSA::BindingType bindingType)
bool operator!=(const QQmlSA::Binding &lhs, const QQmlSA::Binding &rhs)
bool operator==(const QQmlSA::Binding &lhs, const QQmlSA::Binding &rhs)

詳細な説明

メンバ関数のドキュメント

Binding::Binding()

新しい Binding オブジェクトを作成します。

Binding::Binding(const QQmlSA::Binding &other)

other のコピーを作成します。

[noexcept] Binding::Binding(QQmlSA::Binding &&other)

Binding インスタンスをムーブコンストラクトで生成します。

[noexcept] Binding::~Binding()

バインディングを解除します。

QQmlSA::Element Binding::attachedType() const

このバインディングのコンテンツタイプが `AttachedProperty` の場合、アタッチされた型を返します。それ以外の場合は、無効な `Element` を返します。

QQmlSA::Element Binding::bindingScope() const

バインディングが定義されている要素スコープを返します。

QQmlSA::BindingType Binding::bindingType() const

このバインディングの型を返します。

QQmlSA::Element Binding::groupType() const

このバインディングのプロパティがグループプロパティである場合はその型を返し、そうでない場合は無効な Element を返します。

bool Binding::hasFunctionScriptValue() const

このバインディングに(ラムダ)メソッド、矢印関数、またはステートメントブロックが代入された場合と同様に、スクリプト値型の関数であるかどうかを返します。このバインディングの内容型がQQmlSA::BindingType::Script でない場合、false を返します。

bool Binding::hasObject() const

このバインディングにオブジェクトが含まれている場合は `true ` を返し、そうでない場合は `false` を返します。

bool Binding::hasUndefinedScriptValue() const

このバインディングに、undefined が割り当てられた場合のように、スクリプト値の型がundefinedであるかどうかを返します。このバインディングのコンテンツ型がQQmlSA::BindingType::Script でない場合は、false を返します。

bool Binding::isAttached() const

この型が別の型にアタッチされている場合は `true ` を返し、そうでない場合は `false ` を返します。

[static] bool Binding::isLiteralBinding(QQmlSA::BindingType bindingType)

bindingType がリテラル型である場合はtrue を返し、それ以外の場合はfalse を返します。

double Binding::numberValue() const

このバインディングのコンテンツタイプがNumberLiteral の場合、関連する番号を返します。それ以外の場合は0を返します。

QQmlSA::Element Binding::objectType() const

このバインディングのコンテンツタイプが Object の場合、関連付けられたオブジェクトの型を返します。それ以外の場合は、無効な Element を返します。

QString Binding::propertyName() const

このバインディングでバインドされているプロパティの名前を返します。

QQmlSA::ScriptBindingKind Binding::scriptKind() const

このバインディングのコンテンツタイプが「Script」の場合、関連付けられたスクリプトの種類を返します。それ以外の場合は「Invalid」を返します。

QQmlSA::SourceLocation Binding::sourceLocation() const

このバインディングが定義されているQMLコード内の位置を返します。

QString Binding::stringValue() const

このバインディングのコンテンツタイプがStringLiteral の場合、関連する文字列リテラルを返します。それ以外の場合は、空の文字列を返します。

[noexcept] QQmlSA::Binding &Binding::operator=(QQmlSA::Binding &&other)

other をこの Binding インスタンスに割り当てます。

QQmlSA::Binding &Binding::operator=(const QQmlSA::Binding &other)

このバインディングインスタンスに `other ` を割り当てます。

関連する非メンバー

bool operator!=(const QQmlSA::Binding &lhs, const QQmlSA::Binding &rhs)

lhs とrhs が等しくない場合は `true ` を返し、それ以外の場合は `false ` を返します。2つの `Bindings ` は、プロパティ名、コンテンツタイプ、およびソースの場所が一致する場合に等しいとみなされます。

bool operator==(const QQmlSA::Binding &lhs, const QQmlSA::Binding &rhs)

lhs とrhs が等しい場合は `true ` を返し、それ以外の場合は `false ` を返します。2つの `Bindings ` は、プロパティ名、コンテンツタイプ、およびソースの場所が一致する場合に等しいとみなされます。

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