Hide/Show data groups in a list view

  • Hi

    I am a having a working list model based on QAbstractListModel. I have grouped the data in the model based on a role and given headings for each group in qml as shown here. The Image only shows part of the data there are many more groups following same pattern.

    I want to hide and show a particular group data on the click of the heading element. I have tried implement QSortFilterProxyModel. When I tried using the filter model even the headings are hidden which is essential for showing the data on click.How do I implement this?


  • Hi,
    it looks like a special kind of tree view, though I am not sure you can modify QTreeView in a way that allows it show the data as in your image.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.