Auf dieser Seite

QQmlSA::Element Class

class QQmlSA::Element

Stellt einen QML-Typ dar. Mehr...

Header: #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 noch ändern.

Ö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
QQmlSA::SourceLocation idSourceLocation() 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
operator bool() const
bool operator!() const
QQmlSA::Element &operator=(QQmlSA::Element &&other)
QQmlSA::Element &operator=(const QQmlSA::Element &other)
size_t qHash(const QQmlSA::Element &key, size_t seed = 0)
bool operator!=(const QQmlSA::Element &lhs, const QQmlSA::Element &rhs)
bool operator==(const QQmlSA::Element &lhs, const QQmlSA::Element &rhs)

Ausführliche Beschreibung

Dokumentation zu den Mitgliedsfunktionen

Element::Element()

Erstellt ein neues Element-Objekt.

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

Erstellt eine Kopie von „ other “.

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

Erstellt eine Element-Instanz mithilfe von „Move“.

[noexcept] Element::~Element()

Löscht 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 Standard-Eigenschaft dieses Elements zurück. Falls keine vorhanden ist, wird eine leere Zeichenkette 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 “ besitzt.

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

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

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

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

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

Gibt zurück, ob dieses Element eine Eigenschaft mit dem Namen „ propertyName “ besitzt.

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

Gibt zurück, ob dieses Element eine Eigenschaftsbindung mit dem Namen „ name “ besitzt.

QQmlSA::SourceLocation Element::idSourceLocation() const

Gibt die Stelle im QML-Code zurück, an der diesem Element seine ID zugewiesen wird, sofern es eine 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 in Qml definiert wurden, und „ false “ für Objekte, die in C++ deklariert wurden.

bool Element::isFileRootComponent() const

Gibt zurück, ob dieses Element die Stammkomponente seiner 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 Eigenschaft mit dem Namen „ propertyName “, die für dieses Element aufgelöst wurde, 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 weder in seinem Basisobjekt noch in seinen 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 weder in seinen Basis- noch in seinen Erweiterungsobjekten definiert sind und den Namen „ propertyName “ tragen.

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, sofern sie in diesem Element oder dessen Basis- und Erweiterungsobjekten vorhanden ist; 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 “ tragen.

QQmlSA::ScopeType Element::scopeType() const

Gibt den Typ des Geltungsbereichs von „Element“ zurück.

QQmlSA::SourceLocation Element::sourceLocation() const

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

[explicit] 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)

Weist dieser Element-Instanz „ other “ zu.

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

Weist dieser Elementinstanz „ other “ zu.

Zugehörige Nicht-Mitglieder

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

Gibt den Hash-Wert 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, andernfalls „ false “.

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