-
Bug
-
Resolution: Duplicate
-
P1: Critical
-
6.8.4
Although it is inconsistency, I think Qt6.9.x has the correct behavior and 6.8.4 is the bugged one. Anyway, a reproducer attached.
The log from 6.8.4:
qml: array: [{"count":0},{"count":1}] qml: array[0] before: {"count":0} qml: array[0] after: {"count":0} //This is the weird part, that it stays "0" qml: array after: [{"count":0},{"count":1}]
The log from 6.9.2:
qml: array: [{"count":0},{"count":1}] qml: array[0] before: {"count":0} qml: array[0] after: {"count":100} //Good, assignment is correctly reflected qml: array after: [{"count":100},{"count":1}]
To make 6.8.4 behave in the "correct" way, a workaround is to replace the entire element. So:
array[0] = {"count": 100}
instead of
array[0].count = 100
- duplicates
-
QTBUG-129972 [REG 6.6 → 6.7] Array returned to QML from CPP is not retaining changes made in QML/JS
-
- Closed
-