Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.8, 6.9
-
None
-
6a8478829 (dev), 1c3bbebb2 (6.9), 3d486bfce (6.8)
Description
The following reproducer works with Qt 6.7.3 but is broken with >= Qt 6.8.
The code should toggle between displaying "foo" and "bar".
The reason is likely e2fa7ab91310ea74c30e9458dfbe20d257578659 (QTBUG-106103)
Why would one use this construct? In my case I use the Repeater as a singleton object factory. An item outside is supposed to display some data of that object.
pragma ComponentBehavior: Bound import QtQuick import QtQuick.Controls Window { width: 640 height: 480 visible: true title: qsTr("Hello World") Text { id: text } Button { y: 30 text: "Foo" onClicked: repeater.model = ["foo"] } Button { y: 60 text: "Bar" onClicked: repeater.model = ["bar"] } Repeater { id: repeater delegate: Item { id: delegate required property string modelData Binding { target: text property: "text" value: delegate.modelData // Fix A: // delayed: true // Fix B: (deprecated, says documentation) // restoreMode: Binding.RestoreNone } } } }
Attachments
For Gerrit Dashboard: QTBUG-134922 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
638766,4 | QQmlBind: Only restore previous state if current state is still active | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
640182,3 | QQmlBind: Only restore previous state if current state is still active | 6.9 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
640543,3 | QQmlBind: Only restore previous state if current state is still active | 6.8 | qt/qtdeclarative | Status: MERGED | +2 | 0 |