Hi,

I have a ListView which loads a model from JSON with JSONListModel. The model 
contains items and category ids, but is not sorted by category.

What I wand to do is to display the items sorted by categories in the ListView. 
I have put a section.property in the ListView but it is working only half as 
expected because it is not sorting the model.

For instance, if my model content is:

Item1 - Category1
Item2 - Category1
Item3 - Category2
Item4 - Category3
Item5 - Category3
Item6 - Category1

Then my ListView will display:

Category1
  Item1
  Item2
Category2
  Item3
Category3
  Item4
  Item5
Category1
  Item6

Of course I would like Item6 to be set between Item2 and Item3.

How is possible to do that in QML? I would like to avoid manually iterating on 
all the items to re-order.

Thanks,

Antoine
_______________________________________________
SailfishOS.org Devel mailing list

Reply via email to