QQmlSA::Binding Class
class QQmlSA::BindingRepresents a single QML property binding for a specific type. More...
Header: | #include <Binding> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS QmlCompiler) target_link_libraries(mytarget PRIVATE Qt6::QmlCompiler) |
Status: | Technical Preview |
Public Types
class | Bindings |
Public Functions
QQmlSA::Element | attachedType() const |
QQmlSA::Element | groupType() const |
bool | hasObject() const |
double | numberValue() const |
QQmlSA::Element | objectType() const |
QString | propertyName() const |
QQmlSA::ScriptBindingKind | scriptKind() const |
QQmlSA::SourceLocation | sourceLocation() const |
QString | stringValue() const |
Static Public Members
bool | isLiteralBinding(QQmlSA::BindingType bindingType) |
Member Function Documentation
QQmlSA::Element Binding::attachedType() const
Returns the attached type if the content type of this binding is AttachedProperty, otherwise returns an invalid Element.
QQmlSA::Element Binding::groupType() const
Returns the type of the property of this binding if it is a group property, otherwise returns an invalid Element.
bool Binding::hasObject() const
Returns true
if this binding has an objects, otherwise returns false
.
[static]
bool Binding::isLiteralBinding(QQmlSA::BindingType bindingType)
Returns true
if bindingType is a literal type, and false
otherwise. Literal types include strings, booleans, numbers, regular expressions.
double Binding::numberValue() const
Returns the associated number if the content type of this binding is NumberLiteral, otherwise returns 0.
QQmlSA::Element Binding::objectType() const
Returns the type of the associated object if the content type of this binding is Object, otherwise returns an invalid Element.
QString Binding::propertyName() const
Returns the name of the property bound with this binding.
QQmlSA::ScriptBindingKind Binding::scriptKind() const
Returns the kind of the associated script if the content type of this binding is Script, otherwise returns Script_Invalid.
QQmlSA::SourceLocation Binding::sourceLocation() const
Returns the location in the QML code where this binding is defined.
QString Binding::stringValue() const
Returns the associated string literal if the content type of this binding is StringLiteral, otherwise returns an empty string.
© 2024 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.