在 QML 中打印 属性 绑定的代码
Print code of property binding in QML
有没有办法在 QML 中为某个 属性 打印 属性 绑定的代码?
例如:
root.foo = Qt.binding(function() {return width + "2"})
console.log(<code of root.foo>)
无法在 QML 中获取函数体。在这里你可以阅读关于它的精彩 post:
我认为绑定也是如此。
有没有办法在 QML 中为某个 属性 打印 属性 绑定的代码?
例如:
root.foo = Qt.binding(function() {return width + "2"})
console.log(<code of root.foo>)
无法在 QML 中获取函数体。在这里你可以阅读关于它的精彩 post:
我认为绑定也是如此。