Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.15.2
-
-
b322a971f06823a4356f2b3aa331501aa4d0dc7f (qt/qtdeclarative/dev) 7f99a69e25ee3ae99c3b4ba713b8c6b5e8e60135 (qt/qtdeclarative/6.0) 045718e821d1d1f1d5732f123c7a9c189bd92b19 (qt/tqtc-qtdeclarative/tqtc/lts-5.15)
Description
The following example binds model's "visible" role to Item.visible property,
one by "required visible" and the other by "visible: model.visible".
Both texts should blink reflecting model.visible. However, the "required visible"
one does not blink if compiled with CONFIG+=qtquickcompiler.
Window { width: 640 height: 480 visible: true ListModel { id: fakeModel ListElement { visible: false tick: 0 } } Column { spacing: 2 Repeater { model: fakeModel Text { required visible required property int tick required property var model text: "hello required, tick: " + tick + ", model.visible: " + model.visible } } Repeater { model: fakeModel Text { visible: model.visible text: "hello old style, tick: " + model.tick } } } Timer { property int tick: 0 interval: 1000 repeat: true running: true onTriggered: { ++tick; fakeModel.set(0, {visible: !!(tick % 2), tick: tick}); } } }
(full source code attached)