-
Type:
Bug
-
Status: Closed
-
Priority:
P3: Somewhat important
-
Resolution: Done
-
Affects Version/s: 5.8.0
-
Fix Version/s: 5.11.0 Beta 2
-
Component/s: QML: Declarative and Javascript Engine
-
Labels:None
-
Commits:f514451cc2e3610e160b5dc8ccd1e390730ecc67
With the following QML the names setter of each component is entered twice both with a given value of ["one", "two"]. Without using customType.names the setter is only entered once.
CustomType { id: customType objectName: "customType" names: ["one", "two"] } CustomType { id: customType2 objectName: "customType2" names: customType.names }
If id: customType2 is defined above id: customType then each setter is only entered once.
CustomType { id: customType2 objectName: "customType2" names: customType.names } CustomType { id: customType objectName: "customType" names: ["one", "two"] }
FWIW I use Qt with PyQt5 and here is my test case. https://gist.github.com/Siecje/f19c737c8cdbb72e468b18c2da5a6a6f
Lucijan from the #qt-quick freenode IRC channel created a C++ version which shows the behaviour, which I have attached.
- relates to
-
QTBUG-66945 Qt Qml: sometimes properties expressions are evaluated twice during initialization
-
- Closed
-