Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.0 RC2
-
None
Description
I'll try to be as clear as possible.
My situation is the following :
I try to develop a software that displays logs and is capable to filter them. All the logs are stored in a NoSQL database and are read by my software to be correctly displayed.
In the main Window, I use a ListView to display all the logs with a class derived from QAbstractListModel. As there can be a lot of logs, I don't load all the logs at once and use a lazy-load model with the methods "canFetchMore" and "fetchMore".
In the main Window, the user has the possibility to filter the logs displayed. To do that and avoid to make too many request towards the database, I use a class derived from QSortFilterProxyModel.
My problem is the following :
When the filter is applied on the fetched logs and only 2 logs remains for example that are display in the view, the view doesn't call the "canFetchMore" method. So it's impossible to fetch more logs and filter them. However, if the "ListView" is full, the "canFetchMore" is called without problem.
What can I do to call the "canFetchMore" method when the "Listview" isn't complete but I know there still is some logs in the database.