Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Sorting QML treeview's only root level Item.

Sorting QML treeview's only root level Item.

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 602 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sumit Jadhav
    wrote on last edited by
    #1

    Hi,
    I have model in c++ created using QAbstartctItemModel. I'm also using QSortFilterProxyModel for filtering and sorting purpose. This proxy molel is exposed to QML as a context property and used as model for QML treeview.
    As there is no column based structure in QML, instead we have columns created using user defined roles in c++ model.

    i'm able to sort the selected column according to role but its sorting all the levels of tree either in Ascending or descending order. Documentation also says that it will sort childrens recursively.

          But i need take only root level item into consideration while sorting and order of children within root level item should not be changed.
    

    Is there any one know how to achieve this??

    Thanks !

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved