I have a listview object that reads data from a web api through a javascript function that adds data to a listmodel. Below is a listview of listview and listmodel.
I want to implement an infinite scroll type when the user approaches or reaches the last element of the list.
I cannot figure out how to determine the scroll event and get 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)
}
}
}
source
share