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 |
| Binding () | |
| Binding (const QQmlSA::Binding & other ) | |
| Binding (QQmlSA::Binding && other ) | |
| ~Binding () | |
| QQmlSA::Element | attachingType () const |
| QQmlSA::BindingType | bindingType () const |
| QQmlSA::Element | groupType () const |
| bool | hasObject () const |
| bool | hasUndefinedScriptValue () 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 ) |
| 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 ) |
Constructs a new Binding object.
创建副本为 other .
[noexcept]
Binding::
绑定
(
QQmlSA::Binding
&&
other
)
移动构造
Binding
实例。
[noexcept]
Binding::
~Binding
()
Destroys the binding.
Returns the attached type if the content type of this binding is AttachedProperty , otherwise returns an invalid Element.
Returns the type of this binding.
Returns the type of the property of this binding if it is a group property, otherwise returns an invalid Element.
返回
true
if this binding has an objects, otherwise returns
false
.
Returns whether this binding has script value type undefined like when it is assigned
undefined
. If the content type of this binding is not
QQmlSA::BindingType::Script
,返回
false
.
[static]
bool
Binding::
isLiteralBinding
(
QQmlSA::BindingType
bindingType
)
返回
true
if
bindingType
is a literal type, and
false
否则。
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 invalid Element.
Returns the name of the property bound with this binding.
Returns the kind of the associated script if the content type of this binding is Script, otherwise returns 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.
[noexcept]
QQmlSA::Binding
&Binding::
operator=
(
QQmlSA::Binding
&&
other
)
移动赋值 other to this Binding instance.
赋值 other to this Binding instance.
返回
true
if
lhs
and
rhs
are not equal, and
false
otherwise. Two
Bindings
are considered equal if their property name, content type, and source location match.
返回
true
if
lhs
and
rhs
are equal, and
false
otherwise. Two
Bindings
are considered equal if their property name, content type, and source location match.