QQmlSA::Element Class
class QQmlSA::ElementRepresenta un tipo QML. Más información...
| Encabezado: | #include <qqmlsa.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS QmlCompiler) target_link_libraries(mytarget PRIVATE Qt6::QmlCompiler) |
| Estado: | Versión preliminar tecnológica |
Esta clase se encuentra en fase de vista previa tecnológica y está sujeta a cambios.
Funciones 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) |
Elementos no miembros relacionados
| 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) |
Documentación de las funciones de miembro
Element::Element()
Crea un nuevo objeto Element.
Element::Element(const QQmlSA::Element &other)
Crea una copia de other.
[noexcept] Element::Element(QQmlSA::Element &&other)
Crea una instancia de Element mediante la construcción por movimiento.
[noexcept] Element::~Element()
Elimina el elemento.
QQmlSA::AccessSemantics Element::accessSemantics() const
Devuelve la semántica de acceso de este elemento. Por ejemplo: «Referencia», «Valor» o «Secuencia».
QQmlSA::Element Element::baseType() const
Devuelve el elemento del que deriva este elemento.
QString Element::baseTypeName() const
Devuelve el nombre del elemento del que deriva este elemento.
QString Element::defaultPropertyName() const
Devuelve el nombre de la propiedad predeterminada de este elemento. Si no tiene ninguna, devuelve una cadena vacía.
QString Element::filePath() const
Devuelve la ruta del archivo del código QML que define este elemento.
bool Element::hasMethod(const QString &methodName) const
Devuelve si este elemento tiene un método llamado « methodName ».
bool Element::hasOwnProperty(const QString &propertyName) const
Devuelve si este elemento define una propiedad con el nombre « propertyName » que no esté definida en sus objetos base o de extensión.
bool Element::hasOwnPropertyBindings(const QString &propertyName) const
Devuelve si este elemento tiene asignaciones de propiedades que no están definidas en sus objetos base o de extensión y cuyo nombre es « propertyName ».
bool Element::hasProperty(const QString &propertyName) const
Devuelve si este elemento tiene una propiedad con el nombre « propertyName ».
bool Element::hasPropertyBindings(const QString &name) const
Devuelve si este elemento tiene una propiedad vinculada con el nombre « name ».
QQmlSA::SourceLocation Element::idSourceLocation() const
Devuelve la ubicación en el código QML donde se asigna el identificador a este elemento, si lo tiene.
bool Element::inherits(const QQmlSA::Element &element) const
Devuelve si este elemento hereda de ` element`.
bool Element::isComposite() const
Devuelve « true » para los objetos definidos en Qml, y « false » para los objetos declarados en C++.
bool Element::isFileRootComponent() const
Devuelve si este elemento es el componente raíz de su archivo QML.
bool Element::isNull() const
Devuelve « true » si este elemento es nulo; en caso contrario, devuelve « false ».
bool Element::isPropertyRequired(const QString &propertyName) const
Devuelve si la propiedad denominada « propertyName » asociada a este elemento es obligatoria. Devuelve «false» si no se ha encontrado la propiedad.
QString Element::name() const
Devuelve el nombre de este elemento.
QQmlSA::Method::Methods Element::ownMethods() const
Devuelve los métodos de este elemento que no están definidos en sus objetos base ni en sus objetos de extensión.
QQmlSA::Binding::Bindings Element::ownPropertyBindings() const
Devuelve los enlaces de propiedades de este elemento que no están definidos en sus objetos base o de extensión.
QQmlSA::Binding::Bindings Element::ownPropertyBindings(const QString &propertyName) const
Devuelve los enlaces de propiedades de este elemento que no están definidos en sus objetos base o de extensión y que tienen el nombre « propertyName ».
QQmlSA::Element Element::parentScope() const
Devuelve el elemento que contiene a este elemento.
QQmlSA::Property Element::property(const QString &propertyName) const
Devuelve la propiedad denominada « propertyName » si se encuentra en este elemento o en sus objetos base y de extensión; en caso contrario, devuelve una propiedad no válida.
QList<QQmlSA::Binding> Element::propertyBindings(const QString &propertyName) const
Devuelve los enlaces de propiedades de este elemento que tengan el nombre « propertyName ».
QQmlSA::ScopeType Element::scopeType() const
Devuelve el tipo del ámbito del elemento.
QQmlSA::SourceLocation Element::sourceLocation() const
Devuelve la ubicación en el código QML donde se define este elemento.
[explicit] Element::operator bool() const
Devuelve « true » si este elemento no es nulo; en caso contrario, devuelve « false ».
bool Element::operator!() const
Devuelve ` true ` si este elemento es nulo; en caso contrario, devuelve ` false `.
[noexcept] QQmlSA::Element &Element::operator=(QQmlSA::Element &&other)
Asigna mediante «move» ` other ` a esta instancia de «Element».
QQmlSA::Element &Element::operator=(const QQmlSA::Element &other)
Asigna « other » a esta instancia del elemento.
Elementos no miembros relacionados
[noexcept] size_t qHash(const QQmlSA::Element &key, size_t seed = 0)
Devuelve el valor hash de « key », utilizando « seed » como semilla para el cálculo.
bool operator!=(const QQmlSA::Element &lhs, const QQmlSA::Element &rhs)
Devuelve « true » si « lhs » y « rhs » no son iguales, y « false » en caso contrario.
bool operator==(const QQmlSA::Element &lhs, const QQmlSA::Element &rhs)
Devuelve « true » si « lhs » y « rhs » son iguales, y « false » en caso contrario.
© 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.