-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
6.10.0
-
None
-
MacOS, M2 Pro
Issue
Some qml view items (GridView, ListView) inconsistently update on C++ model update. Therefore, very often the view items (so the display) are not sync with model. Calling beginResetModel() and endResetModel() one after the one seems to cause the issue.
Reproduction
Please find attached a minimal reproduction code. It was tested on Qt 6.10.0 built from source.
The code initialises a C++ model with 3 items and after 2 secs update the model to leave one 1 item. Usually at the first launch the update works correctly but after multiple app relaunches I see the list not being updated. Are you able to reproduce it ?
Workaround
Adding a small delay after the beginResetModel() (10ms) always give consistent and correct updates.