PDA

View Full Version : changing the order in which you display items in a gridview



technoViking
8th December 2010, 10:21
Hi,

I'm using a gridview in QML which is being populated by a QList in C++ code.

Currently I have it displayed 2 items per row in QML.

[ITEM1][ITEM2]
[Item3]

If i were to add another tiem it would add it like this:

[ITEM1][ITEM2]
[Item3][Item4]

is it possible to change the order in which you display/populate a gridview so I can add the items to the front so it will do the following:
For example:
Add 1 item it would look like this:
[Item1]
add another item ti would look like this:
[Item2][Item1]

Add another item:
[Item3][Item2]
[Item1]

Thanks

wysota
8th December 2010, 10:46
It is your decision where you add items to the model.

georgethms10
28th October 2016, 12:12
when i add a item to the index 0 of a gridView, {the newly added item comes to the top of the view hierarchy,can i somehow restrict it to the bottom, just like it stayed in the beginning}