How to limit and repeat the items in a QML List View
-
Hi,
I have a model which basically contains some integers (say 1 to 10). I want my list view to show only 3 items ( one highlighted, one above and one below). How do i achieve this? Next, imagine that the view is flicked and the last item is visible..on further flicking i want the first item to become visible again...i.e the data in the model is repeated from the beginning.
I am not sure how to achieve this and any hints will be appreciated.
thanks,
max -
-
Hi,
ListView in Qt Quick 1 doesn't have built-in support for "infinite"/wrapping lists, so as mario indicated the standard advice in this situation is to try PathView.
Another approach might be to try manipulating the model -- maybe it would work to add items to the end of the model (and remove some from the beginning) when you got near the end of the list? I'd be very interested to hear if you (or others) were able to get something working with ListView.
Regards,
Michael