Nesta página

QQmlSA::Element Class

class QQmlSA::Element

Representa um tipo QML. Mais...

Cabeçalho: #include <qqmlsa.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS QmlCompiler)
target_link_libraries(mytarget PRIVATE Qt6::QmlCompiler)
Status: Pré-visualização tecnológica

Esta classe está em pré-visualização tecnológica e está sujeita a alterações.

Funções públicas

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)

Descrição detalhada

Documentação da função de membro

Element::Element()

Cria um novo objeto Element.

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

Cria uma cópia de other.

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

Cria uma instância do Element por meio de move.

[noexcept] Element::~Element()

Destrói o elemento.

QQmlSA::AccessSemantics Element::accessSemantics() const

Retorna a semântica de acesso deste Elemento. Por exemplo, Referência, Valor ou Sequência.

QQmlSA::Element Element::baseType() const

Retorna o elemento do qual este elemento deriva.

QString Element::baseTypeName() const

Retorna o nome do Elemento do qual este Elemento deriva.

QString Element::defaultPropertyName() const

Retorna o nome da propriedade padrão deste Elemento. Caso não haja nenhuma, retorna uma string vazia.

QString Element::filePath() const

Retorna o caminho do arquivo do código QML que define este Elemento.

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

Retorna se este Element possui um método chamado “ methodName ”.

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

Retorna se este Elemento define uma propriedade com o nome “ propertyName ” que não esteja definida em seus objetos base ou de extensão.

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

Retorna se este Elemento possui ligações de propriedades que não estão definidas em seus objetos base ou de extensão e cujos nomes são propertyName.

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

Retorna se este Elemento possui uma propriedade com o nome “ propertyName ”.

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

Retorna se este elemento possui uma ligação de propriedade com o nome name.

QQmlSA::SourceLocation Element::idSourceLocation() const

Retorna o local no código QML onde é atribuído o id a este Elemento, caso ele possua um.

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

Retorna se este Elemento herda d element.

bool Element::isComposite() const

Retorna ` true ` para objetos definidos em Qml e ` false ` para objetos declarados em C++.

bool Element::isFileRootComponent() const

Retorna se este Element é o componente raiz do seu arquivo QML.

bool Element::isNull() const

Retorna ` true ` se este elemento for nulo; caso contrário, retorna ` false `.

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

Retorna se a propriedade com o nome “ propertyName ”, resolvida neste Element, é obrigatória. Retorna “false” se a propriedade não for encontrada.

QString Element::name() const

Retorna o nome deste elemento.

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

Retorna os métodos deste elemento que não estão definidos em seus objetos base ou de extensão.

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

Retorna as ligações de propriedades deste elemento que não estão definidas em seus objetos base ou de extensão.

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

Retorna as ligações de propriedades deste elemento que não estão definidas em seus objetos base ou de extensão e que possuem o nome “ propertyName ”.

QQmlSA::Element Element::parentScope() const

Retorna o elemento que engloba este elemento.

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

Retorna a propriedade com o nome “ propertyName ”, caso ela seja encontrada neste elemento ou em seus objetos base e de extensão; caso contrário, retorna uma propriedade inválida.

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

Retorna as ligações de propriedades deste elemento que tenham o nome “ propertyName ”.

QQmlSA::ScopeType Element::scopeType() const

Retorna o tipo do escopo do Element.

QQmlSA::SourceLocation Element::sourceLocation() const

Retorna a localização no código QML onde este Elemento está definido.

[explicit] Element::operator bool() const

Retorna ` true ` se este elemento não for nulo; caso contrário, retorna ` false `.

bool Element::operator!() const

Retorna ` true ` se este elemento for nulo; caso contrário, retorna ` false `.

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

Atribui other a esta instância do Element.

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

Atribui ` other ` a esta instância do elemento.

Não-membros relacionados

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

Retorna o valor hash para key, utilizando seed como semente para o cálculo.

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

Retorna ` true ` se ` lhs ` e ` rhs ` não forem iguais e, caso contrário, ` false `.

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

Retorna ` true ` se ` lhs ` e ` rhs ` forem iguais e, caso contrário, ` 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.