[Interest] how do I load massive table views instantly?
David M. Cotter
dave at kjams.com
Fri Jun 5 01:48:06 CEST 2020
> 1) quickly calculate/get the total number of items and return that value from rowCount() to let views properly configure their scroll bars;
is that a method one overrides? where is "rowCount()" defined?
do i override it by subclassing QSortFilterProxyModel?
> 2) load data in the background;
i think this is already happening
> 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.
wouldn't the view ask the model for whatever data is revealed as visible, all by itself?
so no need to show mock data? the point is i want to show the real data, even if the user jumps to the last rows immediately
do i *need* to manually do this?
thanks for the suggestions, i'm trying to understand
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest