I'm using a QListView
which wraps a very simple list model. I would like to try implementing something similar to the "infinite scroll" seen in some web pages.
Currently the model is updated by a method which adds at most 100 items (they're taken from an external web API which takes at most 100 items per call). My goal: when the user moves to the last element of the list view (in my case, by scrolling down) I would like to start a call to get up to 100 more items, and so on.
To simplify in this example:
- Populate the list with 100 items
- View scrolled down (by user) to the bottom
- Other 100 items fetched.
Is there anything in QListView
that tells me when I'm at the end of the visible view?