ListView + ScrollBar performance
QAbstractItemModel + ListView with >300 items
Each item is represented by a rectangle and some text. Flicking through such a long list of items is somewhat strenuous, so I decided to add a scrollbar to both display the current position as well as enable the user to quickly jump somewhere else.
My scrollbar is similar to but not as sophisticated as the implementation by "gregschlom":http://bitbucket.org/gregschlom/qmlscrollbar/src/tip/ScrollBar.qml
The basic functionality is the same: modify the contentY variable of a Flickable / ListView.
If the user wants to jump from one end to the other, the entire application freezes for a few seconds (at least this is what it feels like). I am aware of the fact that in this case all delegate instances have to be replaced by new ones. Nevertheless, it does seem strange that jumping in a ListView appears to be more time-consuming than creating the entire model in the first place.
Utilizing cacheBuffer helps for smaller lists, but setting cacheBuffer to 100000 is not an option :)
Is it possible to perform this task in a faster way?
when ListView jump to end, it read all elements from model to calcualte its sizes. It's problem to ListView, which has many items.
Why would it do that? Note that this is about the Quick ListView, not the QListView widget.
Andre, I see, but Quick ListView also read all elements from model from first item to scrolled item.
describe also same behavior.