There's no dedicated signal for "scrolled to end", but you can easily check that in the valueChanged
signal:
def scrolled(scrollbar, value):
if value == scrollbar.maximum():
print 'reached max' # that will be the bottom/right end
if value == scrollbar.minimum():
print 'reached min' # top/left end
scrollBar = listview.verticalScrollBar()
scrollBar.valueChanged.connect(lambda value: scrolled(scrollBar, value))
EDIT:
Or, within a class:
class MyWidget(QWidget):
def __init__(self):
# here goes the rest of your initialization code
# like the construction of your listview
# connect the valueChanged signal:
self.listview.verticalScrollBar().valueChanged.connect(self.scrolled)
# your parameter "f"
self.f = 'somevalue' # whatever
def scrolled(self, value):
if value == self.listview.verticalScrollBar().maximum():
self.loadNextChunkOfData()
def loadNextChunkOfData(self):
# load the next piece of data and append to the listview
You should probably catch up on the docs for lambda's and the signal-slot framework in general.