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. Hiding some listelement in a section

Hiding some listelement in a section

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 1.5k Views 1 Watching
  • 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.
  • H Offline
    H Offline
    huluyige
    wrote on last edited by
    #1

    Hi everyone,

    As we know, we can create a section in a listview to group listelements. Now, what i would like to do is to hide some listelements(because there are too many listelements in a section), and create a button at the end of a section. when i clicked the buttom. all of the rest listelements show up.

    I tried to use simple list view, but i failed.

    Does anyone have ideas?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dialingo
      wrote on last edited by
      #2

      Essentially you need to filter your Data. Implementation depends on your model. You may use a QSortFilterProxyModel to filter your data. Another option is to implement the filtering yourself.
      Do not forget to emit dataChanged() once you have reduced the items in your pool.

      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