Auf dieser Seite

QQmlSA::Binding Class

class QQmlSA::Binding

Stellt eine einzelne QML-Eigenschaftsbindung für einen bestimmten Typ dar. Mehr...

Kopfzeile: #include <qqmlsa.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS QmlCompiler)
target_link_libraries(mytarget PRIVATE Qt6::QmlCompiler)
Status: Technologievorschau

Diese Klasse befindet sich in der Technologievorschau und kann sich ändern.

Öffentliche Typen

(technology preview) class Bindings

Öffentliche Funktionen

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)

Statische öffentliche Mitglieder

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)

Ausführliche Beschreibung

Dokumentation der Mitgliedsfunktionen

Binding::Binding()

Erstellt ein neues Binding-Objekt.

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

Erstellt eine Kopie von „ other “.

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

Erstellt eine „ Binding “-Instanz mithilfe von „Move“.

[noexcept] Binding::~Binding()

Löst die Bindung auf.

QQmlSA::Element Binding::attachedType() const

Gibt den zugeordneten Typ zurück, wenn der Inhaltstyp dieser Bindung „ AttachedProperty “ lautet; andernfalls wird ein ungültiges Element zurückgegeben.

QQmlSA::Element Binding::bindingScope() const

Gibt den Element-Gültigkeitsbereich zurück, in dem die Bindung definiert ist.

QQmlSA::BindingType Binding::bindingType() const

Gibt den Typ dieser Bindung zurück.

QQmlSA::Element Binding::groupType() const

Gibt den Typ der Eigenschaft dieser Bindung zurück, sofern es sich um eine Gruppeneigenschaft handelt; andernfalls wird ein ungültiges Element zurückgegeben.

bool Binding::hasFunctionScriptValue() const

Gibt zurück, ob diese Bindung den Skriptwerttyp „Funktion“ hat, z. B. wenn ihr eine (Lambda-)Methode, eine Pfeilfunktion oder ein Anweisungsblock zugewiesen ist. Wenn der Inhaltstyp dieser Bindung nicht „ QQmlSA::BindingType::Script “ ist, wird „ false “ zurückgegeben.

bool Binding::hasObject() const

Gibt „ true “ zurück, wenn diese Bindung ein Objekt enthält; andernfalls wird „ false “ zurückgegeben.

bool Binding::hasUndefinedScriptValue() const

Gibt zurück, ob diese Bindung den Skriptwert „undefined“ hat, wie beispielsweise bei der Zuweisung von „ undefined “. Wenn der Inhaltstyp dieser Bindung nicht „ QQmlSA::BindingType::Script “ ist, wird „ false “ zurückgegeben.

bool Binding::isAttached() const

Gibt „ true “ zurück, wenn dieser Typ mit einem anderen verknüpft ist, andernfalls „ false “.

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

Gibt „ true “ zurück, wenn „ bindingType “ ein Literaltyp ist, andernfalls „ false “.

double Binding::numberValue() const

Gibt die zugehörige Nummer zurück, wenn der Inhaltstyp dieser Bindung „ NumberLiteral “ lautet; andernfalls wird 0 zurückgegeben.

QQmlSA::Element Binding::objectType() const

Gibt den Typ des zugehörigen Objekts zurück, wenn der Inhaltstyp dieser Bindung „Object“ ist; andernfalls wird ein ungültiges Element zurückgegeben.

QString Binding::propertyName() const

Gibt den Namen der Eigenschaft zurück, die mit dieser Bindung verknüpft ist.

QQmlSA::ScriptBindingKind Binding::scriptKind() const

Gibt den Typ des zugehörigen Skripts zurück, wenn der Inhaltstyp dieser Bindung „Script“ ist; andernfalls wird „Invalid“ zurückgegeben.

QQmlSA::SourceLocation Binding::sourceLocation() const

Gibt die Stelle im QML-Code zurück, an der diese Bindung definiert ist.

QString Binding::stringValue() const

Gibt das zugehörige String-Literal zurück, wenn der Inhaltstyp dieser Bindung „ StringLiteral “ ist; andernfalls wird eine leere Zeichenfolge zurückgegeben.

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

Weist dieser Binding-Instanz „ other “ zu.

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

Weist dieser Binding-Instanz „ other “ zu.

Zugehörige Nicht-Mitglieder

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

Gibt „ true “ zurück, wenn „ lhs “ und „ rhs “ nicht identisch sind, andernfalls „ false “. Zwei „ Bindings “ gelten als identisch, wenn ihr Eigenschaftsname, ihr Inhaltstyp und ihr Speicherort übereinstimmen.

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

Gibt „ true “ zurück, wenn „ lhs “ und „ rhs “ gleich sind, andernfalls „ false “. Zwei „ Bindings “ gelten als gleich, wenn ihr Eigenschaftsname, ihr Inhaltstyp und ihr Speicherort übereinstimmen.

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