Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
Description
Currently the following binds a to the initial value of b.c, but doesn't update a when b.c is updated. This is highly surprising and runs counter to our understanding of bindings:
QtObject { property var b: ({c : 10}) property var a: b.c signal somethingHappened onSomethingHappened: function() { ++b.c } }
The same effect can be seen for JavaScript arrays in var properties. We should either not allow such bindings in the first place (syntax for declarative one-time assignment might come in handy), or, preferably, properly update the binding when the source changes.
Attachments
Issue Links
- relates to
-
QTBUG-21844 Support bindable JavaScript objects
- Open
-
QTBUG-76975 Allow non-binding declarative property assignment in QML
- Open
-
QTBUG-12117 Add support for JS arrays in ListModel
- Open