PropertyPass 类
类 QQmlSA::PropertyPass所有属性静态分析遍历的基类。 更多...
| 头文件 | #include <PropertyPass> | 
| CMake | find_package(Qt6 REQUIRED COMPONENTS QmlCompiler) target_link_libraries(mytarget PRIVATE Qt6::QmlCompiler) | 
| 继承自 | QQmlSA::GenericPass | 
| 状态 | 技术预览 | 
公共函数
| virtual void | onBinding(const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Binding &binding, const QQmlSA::Element &bindingScope, const QQmlSA::Element &value) | 
| virtual void | onRead(const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Element &readScope, QQmlSA::SourceLocation location) | 
| virtual void | onWrite(const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Element &expressionType, const QQmlSA::Element &writeScope, QQmlSA::SourceLocation location) | 
成员函数文档
[virtual] void PropertyPass::onBinding(const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Binding &binding, const QQmlSA::Element &bindingScope, const QQmlSA::Element &value)
每次属性被绑定到值时都会执行。
element 的属性 propertyName 用 binding 在 bindingScope 中绑定到 value 上。
[virtual] void PropertyPass::onRead(const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Element &readScope, QQmlSA::SourceLocation location)
每次读取属性时都会执行。
element 的属性 propertyName 在 location 定义的 readScope 中的指令被读取。
[虚拟] void PropertyPass::onWrite(const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Element &expressionType, const QQmlSA::Element &writeScope, QQmlSA::SourceLocation location)
每当属性被写入时执行。
在location位置定义的writeScope指令中将element的属性propertyName写入。写入到propertyName的表达式类型为expressionType。
© 2024 Qt 公司有限公司。本文件中包含的文档贡献是各自所有者的版权。此处提供的文档是根据由自由软件基金会发布的GNU自由文档许可版本1.3条款授权的。Qt及其相关标志是芬兰及/或世界其他地区的Qt公司商标。所有其他商标均为各自所有者的财产。