On Thu, Mar 26, 2015 at 11:30 AM Jason H <jh...@gmx.com> wrote:

> So I'm trying to use sections, and it seems that the data must be
> explicit  ordered by section otherwise you get the section repeated
> whenever it changes that is to say:
> [
>   { 'a':'A' 'b':'1'}
>   { 'a':'B' 'b':'2'}
>   { 'a':'C' 'b':'1'}
> ]
> section by 'b', we get three groups:
> 1
> + A
> 2
> + B
> 1
> + C
>
> Whereas I expected:
> 1
> + A
> + C
> 2
> + B
>
> Is there some property I need to set or something?
>

In the documentation for ListView's section property (
http://doc.qt.io/qt-5/qml-qtquick-listview.html#section-prop), it states
that it will not reorder the data.  This would be found at the "Note"
portion.  You need to sort your data.
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to