Represents a single QML property binding for a specific type. 更多...
头: | #include <Binding> |
CMake: |
find_package(Qt6 REQUIRED COMPONENTS QmlCompiler)
target_link_libraries(mytarget PRIVATE Qt6::QmlCompiler) |
状态: | 技术预览 |
class | Bindings |
QQmlSA::Element | attachingType () 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 |
bool | isLiteralBinding (QQmlSA::BindingType bindingType ) |
Returns the attached type if the content type of this binding is AttachedProperty, otherwise returns an invalid Element.
Returns the type of the property if this element is a group property, otherwise returns an invalid Element.
返回
true
if this binding has an objects, otherwise returns
false
.
[static]
bool
Binding::
isLiteralBinding
(
QQmlSA::BindingType
bindingType
)
返回
true
if
bindingType
is a literal type, and
false
otherwise. Literal types include strings, booleans, numbers, regular expressions among other.
Returns the associated number if the content type of this binding is NumberLiteral, otherwise returns 0.
Returns the type of the associated object if the content type of this binding is Object, otherwise returns an invlaid Element.
Returns the name of the property using this binding.
Returns the kind of associated associated script if the content type of this binding is Script, otherwise returns Script_Invalid.
Returns the location in the QML code where this binding is defined.
Returns the associated string literal if the content type of this binding is StringLiteral, otherwise returns an empty string.