Skip to content

qt: use `reuseItems` of ListView in various places when Qt >= 5.15

Fatih Uzunoğlu requested to merge fuzun/vlc:qt-listview-compat into master

This makes fast scrolling much more fluid, by reducing stuttering caused by constantly deleting and adding item instances.

More information: https://doc.qt.io/qt-5/qml-qtquick-listview.html#reusing-items

Since 5.15, ListView can be configured to recycle items instead of instantiating from the delegate whenever new rows are flicked into view. This approach improves performance, depending on the complexity of the delegate. Reusing items is off by default (for backwards compatibility reasons), but can be switched on by setting the reuseItems property to true.

I have somewhat tested it with the setting turned on, and did not experience any bug caused by the feature. However, I can not be sure that the delegates of various views are fully compatible with it, so I'd appreciate if you let me know if there are issues arose after setting it on.

Merge request reports