In questa pagina

QQmlSA::Element Class

class QQmlSA::Element

Rappresenta un tipo QML. Maggiori informazioni...

Intestazione: #include <qqmlsa.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS QmlCompiler)
target_link_libraries(mytarget PRIVATE Qt6::QmlCompiler)
Stato: Anteprima tecnologica

Questa classe è in anteprima tecnologica ed è soggetta a modifiche.

Funzioni pubbliche

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)

Descrizione dettagliata

Documentazione sulle funzioni membro

Element::Element()

Crea un nuovo oggetto Element.

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

Crea una copia di other.

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

Crea un'istanza di Element tramite il costrutto Move.

[noexcept] Element::~Element()

Elimina l'elemento.

QQmlSA::AccessSemantics Element::accessSemantics() const

Restituisce la semantica di accesso di questo elemento. Ad esempio: Riferimento, Valore o Sequenza.

QQmlSA::Element Element::baseType() const

Restituisce l'elemento da cui deriva questo elemento.

QString Element::baseTypeName() const

Restituisce il nome dell'elemento da cui deriva questo elemento.

QString Element::defaultPropertyName() const

Restituisce il nome della proprietà predefinita di questo elemento. Se non ne ha una, restituisce una stringa vuota.

QString Element::filePath() const

Restituisce il percorso del file contenente il codice QML che definisce questo elemento.

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

Restituisce se questo elemento dispone di un metodo denominato “ methodName ”.

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

Restituisce se questo elemento definisce una proprietà denominata " propertyName " che non è definita nei suoi oggetti base o di estensione.

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

Restituisce se questo elemento presenta associazioni di proprietà non definite nei suoi oggetti di base o di estensione e il cui nome è propertyName.

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

Restituisce se questo elemento possiede una proprietà denominata “ propertyName ”.

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

Restituisce se questo elemento presenta un'associazione di proprietà denominata “ name ”.

QQmlSA::SourceLocation Element::idSourceLocation() const

Restituisce la posizione nel codice QML in cui a questo elemento viene assegnato il proprio ID, se ne possiede uno.

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

Restituisce se questo elemento eredita da element.

bool Element::isComposite() const

Restituisce ` true ` per gli oggetti definiti in Qml e ` false ` per gli oggetti dichiarati in C++.

bool Element::isFileRootComponent() const

Indica se questo elemento è il componente radice del proprio file QML.

bool Element::isNull() const

Restituisce ` true ` se questo elemento è nullo, altrimenti ` false `.

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

Restituisce se la proprietà denominata " propertyName " associata a questo elemento è obbligatoria. Restituisce "false" se la proprietà non è stata trovata.

QString Element::name() const

Restituisce il nome di questo elemento.

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

Restituisce i metodi di questo elemento che non sono definiti nei suoi oggetti di base o di estensione.

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

Restituisce i collegamenti delle proprietà di questo elemento che non sono definiti nei suoi oggetti di base o di estensione.

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

Restituisce i binding delle proprietà di questo elemento che non sono definiti nei suoi oggetti di base o di estensione e che hanno il nome “ propertyName ”.

QQmlSA::Element Element::parentScope() const

Restituisce l'elemento che racchiude questo elemento.

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

Restituisce la proprietà denominata “ propertyName ” se presente in questo elemento o nei suoi oggetti di base e di estensione; in caso contrario, restituisce una proprietà non valida.

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

Restituisce i collegamenti delle proprietà di questo elemento che hanno il nome " propertyName".

QQmlSA::ScopeType Element::scopeType() const

Restituisce il tipo di ambito dell'elemento.

QQmlSA::SourceLocation Element::sourceLocation() const

Restituisce la posizione nel codice QML in cui è definito questo elemento.

[explicit] Element::operator bool() const

Restituisce ` true ` se l'elemento non è nullo, altrimenti ` false `.

bool Element::operator!() const

Restituisce ` true ` se questo elemento è nullo, altrimenti ` false `.

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

L'operazione "Move" assegna ` other ` a questa istanza di Element.

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

Assegna " other " a questa istanza dell'elemento.

Non membri correlati

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

Restituisce il valore hash per key, utilizzando seed come seme per il calcolo.

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

Restituisce ` true ` se ` lhs ` e ` rhs ` non sono uguali, e ` false ` in caso contrario.

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

Restituisce ` true ` se ` lhs ` e ` rhs ` sono uguali, altrimenti restituisce ` 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.