En esta página

QQmlSA::Binding Class

class QQmlSA::Binding

Representa un único enlace de propiedad QML para un tipo específico. 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.

Tipos públicos

(technology preview) class Bindings

Funciones públicas

Binding()
Binding(const QQmlSA::Binding &other)
Binding(QQmlSA::Binding &&other)
~Binding()
QQmlSA::Element attachedType() const
QQmlSA::Element bindingScope() const
QQmlSA::BindingType bindingType() const
QQmlSA::Element groupType() const
bool hasFunctionScriptValue() const
bool hasObject() const
bool hasUndefinedScriptValue() const
bool isAttached() const
double numberValue() const
QQmlSA::Element objectType() const
QString propertyName() const
QQmlSA::ScriptBindingKind scriptKind() const
QQmlSA::SourceLocation sourceLocation() const
QString stringValue() const
QQmlSA::Binding &operator=(QQmlSA::Binding &&other)
QQmlSA::Binding &operator=(const QQmlSA::Binding &other)

Miembros públicos estáticos

bool isLiteralBinding(QQmlSA::BindingType bindingType)
bool operator!=(const QQmlSA::Binding &lhs, const QQmlSA::Binding &rhs)
bool operator==(const QQmlSA::Binding &lhs, const QQmlSA::Binding &rhs)

Descripción detallada

Documentación de las funciones de miembro

Binding::Binding()

Crea un nuevo objeto «Binding».

Binding::Binding(const QQmlSA::Binding &other)

Crea una copia de other.

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

Crea una instancia de ` Binding ` mediante la construcción por movimiento.

[noexcept] Binding::~Binding()

Rompe la encuadernación.

QQmlSA::Element Binding::attachedType() const

Devuelve el tipo adjunto si el tipo de contenido de este enlace es AttachedProperty; en caso contrario, devuelve un Elemento no válido.

QQmlSA::Element Binding::bindingScope() const

Devuelve el ámbito «Element» en el que se define el enlace.

QQmlSA::BindingType Binding::bindingType() const

Devuelve el tipo de este enlace.

QQmlSA::Element Binding::groupType() const

Devuelve el tipo de la propiedad de este enlace si se trata de una propiedad de grupo; en caso contrario, devuelve un Element no válido.

bool Binding::hasFunctionScriptValue() const

Devuelve si este enlace tiene un tipo de valor de script «función», como cuando se le asigna un método (lambda), una función flecha o un bloque de sentencias. Si el tipo de contenido de este enlace no es « QQmlSA::BindingType::Script », devuelve « false ».

bool Binding::hasObject() const

Devuelve « true » si este enlace contiene objetos; en caso contrario, devuelve « false ».

bool Binding::hasUndefinedScriptValue() const

Devuelve si este enlace tiene un valor de script de tipo «undefined», como cuando se le asigna ` undefined`. Si el tipo de contenido de este enlace no es ` QQmlSA::BindingType::Script`, devuelve ` false`.

bool Binding::isAttached() const

Devuelve ` true ` si este tipo está vinculado a otro; en caso contrario, devuelve ` false `.

[static] bool Binding::isLiteralBinding(QQmlSA::BindingType bindingType)

Devuelve « true » si « bindingType » es un tipo literal y, en caso contrario, « false ».

double Binding::numberValue() const

Devuelve el número asociado si el tipo de contenido de este enlace es « NumberLiteral »; en caso contrario, devuelve 0.

QQmlSA::Element Binding::objectType() const

Devuelve el tipo del objeto asociado si el tipo de contenido de este enlace es «Object»; en caso contrario, devuelve un «Element» no válido.

QString Binding::propertyName() const

Devuelve el nombre de la propiedad asociada a este enlace.

QQmlSA::ScriptBindingKind Binding::scriptKind() const

Devuelve el tipo del script asociado si el tipo de contenido de este enlace es «Script»; en caso contrario, devuelve «Invalid».

QQmlSA::SourceLocation Binding::sourceLocation() const

Devuelve la ubicación en el código QML donde se define este enlace.

QString Binding::stringValue() const

Devuelve la cadena literal asociada si el tipo de contenido de este enlace es ` StringLiteral`; en caso contrario, devuelve una cadena vacía.

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

Asigna « other » a esta instancia de «Binding».

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

Asigna ` other ` a esta instancia de `Binding`.

Elementos no miembros relacionados

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

Devuelve « true » si « lhs » y « rhs » no son iguales, y « false » en caso contrario. Dos « Bindings » se consideran iguales si coinciden en el nombre de la propiedad, el tipo de contenido y la ubicación de origen.

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

Devuelve « true » si « lhs » y « rhs » son iguales, y « false » en caso contrario. Dos « Bindings » se consideran iguales si coinciden el nombre de la propiedad, el tipo de contenido y la ubicación de origen.

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