I have a huge vector (100+K elements) with elements that I want to show to the user in a QTableView. To do this I am using a custom model to serve the vector and a filter model. The user can then filter the data, which is often the first thing the user does.
Now, whenever the user "filters" by an empty string or also when the thing starts up for the first time - then there is a long delay where the model is serving all the 100+K items to the view.
Since the user is never interested in looking at all the 100,000 items, it would make sens to only show the first few hundred to the user and fetch more if and as needed. There appears to be a mechanism in the Qt model/view framework to do just that: canFetchMore() and fetchMore().
however, I do not understand how these work in conjunction with a linear data structure like a vector. There is a tree based example which fetches data when the user expands a node - but I dont understand how that might work for a vector or a datastructure without such a clear cut parent-child/visible-invisible relation.
Bookmarks