Details
-
Task
-
Resolution: Unresolved
-
P3: Somewhat important
-
6.4.2
-
None
-
70f1732ee (dev), 09587cc89 (6.5), 80723c47a (tqtc/lts-6.2)
Description
This is a feature request about explicit setter that do not break existing bindings. Suppose we have a currentIndex property binding between a SwipeView and a TabBar. As soon as we set the currenIndex manually, this binding will break, and we would have to repair it via:
onMyEvent: { swipeView.currentIndex = newIndex // repair the binding swipeView.currentIndex = Qt.binding(function() { return tabBar.currentIndex } ) }
What about we generate a setter that updates the value without breaking the property binding, like this:
swipeView.setCurrentIndex(newIndex)
Attachments
Issue Links
- relates to
-
QTBUG-30596 bi-directional or multi-sync variation of Binding
- Open
Gerrit Reviews
For Gerrit Dashboard: QTBUG-109996 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
455562,4 | Doc: explain how to manage currentIndex without breaking bindings | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
456181,2 | Doc: explain how to manage currentIndex without breaking bindings | 6.5 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
456182,5 | Doc: explain how to manage currentIndex without breaking bindings | tqtc/lts-6.2 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |