ListView is (very) slow to move to current item
-
Write my own listview it's possibility, but a total waste of time.
enhance behior/ability of existing listview may be more useful for more people. (I guess)In my point of view, if listview visits all element in order to get their height,
it must exist a property of listview saying 'all elements have same height'.
With that property listview may discover once the height and remember it in order to accelerate the scroll.(thanks for pointing me thread 1368, it's the same issue).
-
ListView will move the highlight from its current position to the new current item, scrolling the view as it moves. If your model is slow to provide data or you have a complex delegate then it will struggle to scroll smoothly. The best solution is to move the view directly to the target index and then set the currentIndex, e.g.
@
idLV.positionViewAtIndex(nci, ListView.Visible)
idLV.currentIndex = nci
@ -
[quote author="Alexander Kuchumov" date="1292868441"]Andre, where is it in QListView? QListView also evaluates height for all elements.[/quote]
It is right "here":http://doc.qt.nokia.com/4.6/qlistview.html#uniformItemSizes-prop. You can tell QListView that the items are all the same size, and then it only evaluates the hight of the first item. -
Hi, I have a problem similar to yours. I have a ListView with possibly thousands of elements. I keep a property in my PySide backend which is the currentIndex for my ListView. Whenever I change the index, the ListView should scroll to the current item.
It works, but the scrolling is very slow. I think it is the same problem you are describing. Do you have any idea how should I solve my case?