ListView renders phantom row after model reset
-
Qt 6.2.1
ListView initially has a model with 100 items (generation 1 of the model).
Renders fine.
Model is reset to have 10 items (gen 2).
Verified that onModelAboutToBeReset() and onModelReset() are both emitted properly.
Bug is that for the first item, the ListView renders both gen 1 and gen 2 versions of the first item (on top of each other).
Bug only happens if ListView.header property is set and the first ListView item is visible when the model is reset.I've whittled a repro situation down to two very simple 50 line files (qml + python).
The bug is even more obvious when the model is reset so that gen 2 of the data has 0 items.
Then the ListView continues to render the phantom first item from gen 1 all by itself (like its haunted...).Ideas? If true bug, how to submit?
main.py
https://pastebin.com/X2uV3c8zqtbug1.qml
https://pastebin.com/NQM85qjV