Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
5.8.0
-
None
Description
Here is a distilled testcase. With Qt 5.6 "Hello" is changed to "Goodbye" after two seconds, because someProp changes value.
With Qt 5.8, the change does not occur. Presumably, because the use of the property is inside an if() which is initially false, the QML engine does not track the property for changes.
import QtQuick 2.3 Item { id: root width: 500 height: 500 property string someProp property var someObject: {return { cond: false }} function refreshText() { if (someObject.cond) { return someProp } return "Hello" } Text { width: 100 height: 100 x: 100 y: 100 text: refreshText() } Timer { running: true interval: 1000 onTriggered: { console.log("Change condition") someObject.cond = true; } } Timer { running: true interval: 2000 onTriggered: { console.log("Change string") someProp = "Goodbye" } } }
Attachments
Issue Links
- is duplicated by
-
QTBUG-21844 Support bindable JavaScript objects
- Open