A ListView is created with a model that is initialized with a number of elements.
When the model is cleared (i.e. all elements are removed from the model), the ListView.count drops to 0 as expected, but one delegate is still visible in the ListView.
This seems to happen, when the ListView has also a header item set, only.
Attached, you'll find a sample qml file, which demonstrates the likely bug, and some screenshots. The "Screenshot-zero-elements.jpg" shows that the ListView.count is zero (at the bottom of the window), but there is still a row visible in the ListView.
A workaround for this issue seems to be to explicitly set currentIndex to -1 as initial value.
The issue did not appear prior to Qt 5.15.7.