Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.8.0
-
None
-
f514451cc2e3610e160b5dc8ccd1e390730ecc67
Description
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.
Attachments
Issue Links
- relates to
-
QTBUG-66945 Qt Qml: sometimes properties expressions are evaluated twice during initialization
- Closed