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. Combobox filters?
Qt 6.11 is out! See what's new in the release blog

Combobox filters?

Scheduled Pinned Locked Moved Unsolved General and Desktop
pythoncomboboxqtdesigner
4 Posts 2 Posters 1.4k 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.
  • H Offline
    H Offline
    Heya
    wrote on last edited by Heya
    #1
    This post is deleted!
    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      Image doesn't work so I don't know about the specific issue.

      Normally this is achieved separating the model from the QComboBox and putting a QSortFilterProxyModel in-between the two

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      H 1 Reply Last reply
      0
      • VRoninV VRonin

        Image doesn't work so I don't know about the specific issue.

        Normally this is achieved separating the model from the QComboBox and putting a QSortFilterProxyModel in-between the two

        H Offline
        H Offline
        Heya
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • VRoninV Offline
          VRoninV Offline
          VRonin
          wrote on last edited by
          #4
          • separate QTreeWidget in a QTreeView and a QStandardItemModel.
          • create a QSortFilterProxyModel and set the QStandardItemModel as its suorce model
          • connect currentTextChanged from the combobox to setFilterFixedString of QSortFilterProxyModel

          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
          ~Napoleon Bonaparte

          On a crusade to banish setIndexWidget() from the holy land of Qt

          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