Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Create Filter for QStandardItemModel
Qt 6.11 is out! See what's new in the release blog

Create Filter for QStandardItemModel

Scheduled Pinned Locked Moved Solved General and Desktop
qstandarditemmoqtreeview
4 Posts 2 Posters 1.4k 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.
  • K Offline
    K Offline
    Kita
    wrote on last edited by
    #1

    I want to implement windows like filtering views. I tried to search but couldn't find enough, any reference page or code would be of great help. I attached the photo below about what I'm looking for to implement.

    I already made table using QTreeView and QStandardItemModel, so the sorting works, need to implement the Filtering part.

    Filtering.png

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Are you looking for something like QSortFilterProxyModel ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      K 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        Are you looking for something like QSortFilterProxyModel ?

        K Offline
        K Offline
        Kita
        wrote on last edited by Kita
        #3

        @SGaist I did see that option. I'm sorry I'm new to QT, so I will have to implement Checkboxes separately and take the checked options in the setFilterRegExp.
        thanks, I found it.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Yes, you are in charge of writing the GUI part.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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