Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.5.0
-
None
Description
If you create a simple list view with reuseItems enabled the ListView will never fire ListView.onRemove, ListView.onPooled or ListView.onReused for the first item in the list. This would be ok on it's own however ListView.itemAtIndex(0) will return null as if the item has been pooled.
The below gif shows a simple list view and a button that will print the item at index zero. When the first item is in view pressing the button correctly prints the item. However when scrolled out you should see that none of the pooling signals are emitted for the first item however the button then returns null.
This can make correctly updating properties on a delegate tricky.
See the attached Main.qml file for the code shown in the above gif.