QQmlSA::Binding Class
class QQmlSA::BindingStellt eine einzelne QML-Eigenschaftsbindung für einen bestimmten Typ dar. Mehr...
Kopfzeile: | #include <Binding> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS QmlCompiler) target_link_libraries(mytarget PRIVATE Qt6::QmlCompiler) |
Status: | Technische Vorschau |
Öffentliche Typen
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 | 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) |
Verwandte Nicht-Mitglieder
bool | operator!=(const QQmlSA::Binding &lhs, const QQmlSA::Binding &rhs) |
bool | operator==(const QQmlSA::Binding &lhs, const QQmlSA::Binding &rhs) |
Dokumentation der Mitgliedsfunktionen
Binding::Binding()
Konstruiert ein neues Binding-Objekt.
Binding::Binding(const QQmlSA::Binding &other)
Erzeugt eine Kopie von other.
[noexcept]
Binding::Binding(QQmlSA::Binding &&other)
Move-konstruiert eine Binding
Instanz.
[noexcept]
Binding::~Binding()
Zerstört die Bindung.
QQmlSA::Element Binding::attachedType() const
Gibt den angehängten Typ zurück, wenn der Inhaltstyp dieser Bindung AttachedProperty ist, andernfalls wird ein ungültiges Element zurückgegeben.
QQmlSA::Element Binding::bindingScope() const
Gibt den Elementbereich 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, wenn es sich um eine Gruppeneigenschaft handelt, andernfalls wird ein ungültiges Element zurückgegeben.
bool Binding::hasObject() const
Gibt true
zurück, wenn diese Bindung ein Objekt hat, andernfalls false
.
bool Binding::hasUndefinedScriptValue() const
Gibt zurück, ob diese Bindung den Skript-Wert-Typ undefiniert hat, wie wenn sie undefined
zugewiesen ist. 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 Typ verbunden ist, andernfalls false
.
[static]
bool Binding::isLiteralBinding(QQmlSA::BindingType bindingType)
Gibt true
zurück, wenn bindingType ein literaler Typ ist, und andernfalls false
.
double Binding::numberValue() const
Gibt die zugehörige Nummer zurück, wenn der Inhaltstyp dieser Bindung NumberLiteral ist, 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 gebunden ist.
QQmlSA::ScriptBindingKind Binding::scriptKind() const
Gibt die Art des zugehörigen Skripts zurück, wenn der Inhaltstyp dieser Bindung "Script" ist, andernfalls "Invalid".
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 ein leerer String zurückgegeben.
[noexcept]
QQmlSA::Binding &Binding::operator=(QQmlSA::Binding &&other)
Verschieben - weist other dieser Binding-Instanz zu.
QQmlSA::Binding &Binding::operator=(const QQmlSA::Binding &other)
Weist dieser Binding-Instanz other zu.
Verwandte Nicht-Mitglieder
bool operator!=(const QQmlSA::Binding &lhs, const QQmlSA::Binding &rhs)
Gibt true
zurück, wenn lhs und rhs nicht gleich sind, und andernfalls false
. Zwei Bindings
werden als gleich angesehen, wenn ihr Eigenschaftsname, der Inhaltstyp und der Quellort übereinstimmen.
bool operator==(const QQmlSA::Binding &lhs, const QQmlSA::Binding &rhs)
Gibt true
zurück, wenn lhs und rhs gleich sind, und andernfalls false
. Zwei Bindings
werden als gleich angesehen, wenn ihr Eigenschaftsname, der Inhaltstyp und der Quellort übereinstimmen.
© 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.