[Interest] how do I load massive table views instantly?

David M. Cotter dave at kjams.com
Thu Jun 4 23:31:36 CEST 2020


>> alternately, if "loading only what you see" is just "how it's done", then can i just set the scroll bar height to be the total height?  so CAN still grab the scroll thumb, and drag it to the end, and see the data at the end, without waiting for all the unseen data to load?
>> i know other apps do this... how is it done?
> 
> What table view are you talking about, specifically?

QTableView with QSortFilterProxyModel

> What did you try so far?
when showing the view for the proxy model:

while (modelP->canFetchMore(modelIndex)) {
	modelP->fetchMore(modelIndex);

	if (dlgP) {
		dlgP->Inc(false);
	}
}

but that is way slow

i'd rather just quick-calc the number of items and set the scroll bar to max at the start
then let the viewer fetch what it needs to when the rows get revealed?

is this possible?

or can i pre-load the proxyModel at startup and just "swap it in" when the user switches playlists?

-dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20200604/8476f049/attachment.html>


More information about the Interest mailing list