I have a listview object that reads data from a web api via a javascript function that appends the data to the listmodel. I've attached the listview and listmodel below.
I want to implement a type of infinite scroll when the user gets close or reaches the last element of the listview.
I can't figure out how to detect the scroll event and grab the relative scroll position.
Thanks for any help.
ListModel {
id: subModel
function getSub(idx){
return (idx >=0 && idx < count) ? get(idx).display_name: "";
}
}
ListView {
clip: true
width: parent.width
height: parent.height - searchButton.height
model: subModel
on
delegate: ListingDelegate{
text: title;
subText: subTitle;
icon: Qt.resolvedUrl(thumbnail)
__iconWidth: units.gu(5)
__iconHeight: units.gu(5)
}
}
}