QQmlSA::Element Class

class QQmlSA::Element

Stellt einen QML-Typ dar. Mehr...

Kopfzeile: #include <Element>
CMake: find_package(Qt6 REQUIRED COMPONENTS QmlCompiler)
target_link_libraries(mytarget PRIVATE Qt6::QmlCompiler)
Status: Technische Vorschau

Öffentliche Funktionen

Element()
Element(const QQmlSA::Element &other)
Element(QQmlSA::Element &&other)
~Element()
QQmlSA::AccessSemantics accessSemantics() const
QQmlSA::Element baseType() const
QString baseTypeName() const
QString defaultPropertyName() const
QString filePath() const
bool hasMethod(const QString &methodName) const
bool hasOwnProperty(const QString &propertyName) const
bool hasOwnPropertyBindings(const QString &propertyName) const
bool hasProperty(const QString &propertyName) const
bool hasPropertyBindings(const QString &name) const
bool inherits(const QQmlSA::Element &element) const
bool isComposite() const
bool isFileRootComponent() const
bool isNull() const
bool isPropertyRequired(const QString &propertyName) const
QString name() const
QQmlSA::Method::Methods ownMethods() const
QQmlSA::Binding::Bindings ownPropertyBindings() const
QQmlSA::Binding::Bindings ownPropertyBindings(const QString &propertyName) const
QQmlSA::Element parentScope() const
QQmlSA::Property property(const QString &propertyName) const
QList<QQmlSA::Binding> propertyBindings(const QString &propertyName) const
QQmlSA::ScopeType scopeType() const
QQmlSA::SourceLocation sourceLocation() const
bool operator bool() const
bool operator!() const
QQmlSA::Element &operator=(QQmlSA::Element &&other)
QQmlSA::Element &operator=(const QQmlSA::Element &other)
qsizetype qHash(const QQmlSA::Element &key, qsizetype seed = 0)
bool operator!=(const QQmlSA::Element &lhs, const QQmlSA::Element &rhs)
bool operator==(const QQmlSA::Element &lhs, const QQmlSA::Element &rhs)

Detaillierte Beschreibung

Dokumentation der Mitgliederfunktionen

Element::Element()

Konstruiert ein neues Element-Objekt.

Element::Element(const QQmlSA::Element &other)

Erzeugt eine Kopie von other.

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

Move-konstruiert eine Element-Instanz.

[noexcept] Element::~Element()

Zerstört das Element.

QQmlSA::AccessSemantics Element::accessSemantics() const

Gibt die Zugriffssemantik dieses Elements zurück. Zum Beispiel: Referenz, Wert oder Sequenz.

QQmlSA::Element Element::baseType() const

Gibt das Element zurück, von dem dieses Element abgeleitet ist.

QString Element::baseTypeName() const

Gibt den Namen des Elements zurück, von dem dieses Element abgeleitet ist.

QString Element::defaultPropertyName() const

Gibt den Namen der Standardeigenschaft dieses Elements zurück. Wenn es keine hat, wird ein leerer String zurückgegeben.

QString Element::filePath() const

Gibt den Dateipfad des QML-Codes zurück, der dieses Element definiert.

bool Element::hasMethod(const QString &methodName) const

Gibt zurück, ob dieses Element eine Methode mit dem Namen methodName hat.

bool Element::hasOwnProperty(const QString &propertyName) const

Gibt zurück, ob dieses Element eine Eigenschaft mit dem Namen propertyName definiert, die nicht auf seinen Basis- oder Erweiterungsobjekten definiert ist.

bool Element::hasOwnPropertyBindings(const QString &propertyName) const

Gibt zurück, ob dieses Element Eigenschaftsbindungen hat, die nicht in seinen Basis- oder Erweiterungsobjekten definiert sind und die den Namen propertyName haben.

bool Element::hasProperty(const QString &propertyName) const

Gibt zurück, ob dieses Element eine Eigenschaft mit dem Namen propertyName hat.

bool Element::hasPropertyBindings(const QString &name) const

Gibt zurück, ob dieses Element eine Eigenschaftsbindung mit dem Namen name hat.

bool Element::inherits(const QQmlSA::Element &element) const

Gibt zurück, ob dieses Element von element erbt.

bool Element::isComposite() const

Gibt true für Objekte zurück, die von Qml definiert wurden, und false für Objekte, die von C++ deklariert wurden.

bool Element::isFileRootComponent() const

Gibt zurück, ob dieses Element die Wurzelkomponente der zugehörigen QML-Datei ist.

bool Element::isNull() const

Gibt true zurück, wenn dieses Element null ist, andernfalls false.

bool Element::isPropertyRequired(const QString &propertyName) const

Gibt zurück, ob die in diesem Element aufgelöste Eigenschaft mit dem Namen propertyName erforderlich ist. Gibt false zurück, wenn die Eigenschaft nicht gefunden werden konnte.

QString Element::name() const

Gibt den Namen dieses Elements zurück.

QQmlSA::Method::Methods Element::ownMethods() const

Gibt die Methoden dieses Elements zurück, die nicht in seinen Basis- oder Erweiterungsobjekten definiert sind.

QQmlSA::Binding::Bindings Element::ownPropertyBindings() const

Gibt die Eigenschaftsbindungen dieses Elements zurück, die nicht in seinen Basis- oder Erweiterungsobjekten definiert sind.

QQmlSA::Binding::Bindings Element::ownPropertyBindings(const QString &propertyName) const

Gibt die Eigenschaftsbindungen dieses Elements zurück, die nicht auf seinen Basis- oder Erweiterungsobjekten definiert sind und die den Namen propertyName haben.

QQmlSA::Element Element::parentScope() const

Gibt das Element zurück, das dieses Element umschließt.

QQmlSA::Property Element::property(const QString &propertyName) const

Gibt die Eigenschaft mit dem Namen propertyName zurück, wenn sie in diesem Element oder seinen Basis- und Erweiterungsobjekten gefunden wird, andernfalls wird eine ungültige Eigenschaft zurückgegeben.

QList<QQmlSA::Binding> Element::propertyBindings(const QString &propertyName) const

Gibt die Eigenschaftsbindungen dieses Elements zurück, die den Namen propertyName haben.

QQmlSA::ScopeType Element::scopeType() const

Gibt den Typ des Bereichs von Element zurück.

QQmlSA::SourceLocation Element::sourceLocation() const

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

[explicit] bool Element::operator bool() const

Gibt true zurück, wenn dieses Element nicht null ist, andernfalls false.

bool Element::operator!() const

Gibt true zurück, wenn dieses Element null ist, andernfalls false.

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

Verschieben - weist other dieser Elementinstanz zu.

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

Weist dieser Elementinstanz other zu.

Verwandte Nicht-Mitglieder

[noexcept] qsizetype qHash(const QQmlSA::Element &key, qsizetype seed = 0)

Gibt den Hashwert für key zurück, wobei seed als Startwert für die Berechnung verwendet wird.

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

Gibt true zurück, wenn lhs und rhs nicht gleich sind, und andernfalls false.

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

Gibt true zurück, wenn lhs und rhs gleich sind, und andernfalls false.

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