Results 1 to 3 of 3

Thread: changing the order in which you display items in a gridview

  1. #1
    Join Date
    Oct 2009
    Posts
    47
    Thanks
    10

    Default changing the order in which you display items in a gridview

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: changing the order in which you display items in a gridview

    It is your decision where you add items to the model.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Oct 2016
    Posts
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: changing the order in which you display items in a gridview

    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}

Similar Threads

  1. Changing QTableView column display order
    By scarleton in forum Qt Programming
    Replies: 3
    Last Post: 18th October 2010, 00:04
  2. Replies: 5
    Last Post: 25th February 2010, 17:29
  3. The order of items in QTreeWidget
    By KK in forum Qt Programming
    Replies: 4
    Last Post: 27th February 2009, 04:54
  4. Changing column order in QTableView
    By Banjo in forum Qt Programming
    Replies: 1
    Last Post: 18th January 2008, 06:49
  5. Changing the order of columns in QTreeView
    By johnny_sparx in forum Qt Programming
    Replies: 1
    Last Post: 15th February 2006, 00:00

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.