Here is my idea: 1) quickly calculate/get the total number of items and return that value from rowCount() to let views properly configure their scroll bars; 2) load data in the background; 3) return some placeholder values from data() for items that have not been loaded yet; 4) when a new batch of items is available, add it to the model's internal storage and emit the dataChanged() signal with appropriate index range.
On 06/05/2020 12:39 AM, David M. Cotter wrote: >> What did you try so far? > the other thing tried was showing the table without pre-loading it, but then > loading the rest in the background > > but this has the problem that the user can't then pick up the scroll thumb > and drag it to the bottom, because not all the data is loaded. as soon as > the user lets go, more data keeps getting loaded and the scroll thumb slides > out from under their mouse as more data comes in. > > uck > > :)
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest