-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.10.0
-
None
Thanks for the new Synchronizer! It's very helpful. However, there was a pattern I was using with Bindings/Connections that I'm trying to replace with Synchronizer. I only want the synchronization to be "active" (or "enabled", whatever you decide to call it) when another property is true. This seems like an API that should be there.
Here's my example use case that I wish to replace with a synchronizer:
Unable to find source-code formatter for language: qml. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
Binding {
property: "contentY"
target: scrollView.contentItem
value: root.editorSettings.y
when: root.enableYScroll
}
Connections {
function onContentYChanged() {
root.editorSettings.y = scrollView.contentItem.contentY;
}
enabled: root.enableYScroll
target: scrollView.contentItem
}
As you can see I'm doing (probably badly) manual synchronization on a condition. I would like to be able to do the following:
Unable to find source-code formatter for language: qml. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
Synchronizer { sourceObject: root.editorSettings sourceProperty: "y" targetObject: scrollView.contentItem targetProperty: "contentY" enabled: root.enableYScroll // new property }