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. How to add a Search option in a ListView in Qml
QtWS25 Last Chance

How to add a Search option in a ListView in Qml

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
6 Posts 3 Posters 1.3k 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.
  • D Offline
    D Offline
    danild
    wrote on 14 Jun 2018, 12:30 last edited by
    #1

    Hai..
    I am looking code for Searching an item from the listview.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      KillerSmath
      wrote on 14 Jun 2018, 13:50 last edited by
      #2

      @danild
      Are you talking about find an item or apply a filter in the model of listview ?

      @Computer Science Student - Brazil
      Web Developer and Researcher
      “Sometimes it’s the people no one imagines anything of who do the things that no one can imagine.” - Alan Turing

      D 1 Reply Last reply 16 Jun 2018, 06:20
      1
      • K KillerSmath
        14 Jun 2018, 13:50

        @danild
        Are you talking about find an item or apply a filter in the model of listview ?

        D Offline
        D Offline
        danild
        wrote on 16 Jun 2018, 06:20 last edited by
        #3

        @KillerSmath yes

        1 Reply Last reply
        -1
        • K Offline
          K Offline
          KillerSmath
          wrote on 16 Jun 2018, 20:39 last edited by
          #4

          @danild
          Can you be more specific ?

          @Computer Science Student - Brazil
          Web Developer and Researcher
          “Sometimes it’s the people no one imagines anything of who do the things that no one can imagine.” - Alan Turing

          1 Reply Last reply
          1
          • D Offline
            D Offline
            danild
            wrote on 18 Jun 2018, 06:07 last edited by
            #5

            I have one Listview and one TextFileld. We are inputting values to TextFiled, that value matched items are displayed in the Listview.

            D 1 Reply Last reply 18 Jun 2018, 07:44
            0
            • D danild
              18 Jun 2018, 06:07

              I have one Listview and one TextFileld. We are inputting values to TextFiled, that value matched items are displayed in the Listview.

              D Offline
              D Offline
              Diracsbracket
              wrote on 18 Jun 2018, 07:44 last edited by
              #6

              @danild
              I recently faced the same problem in QML and found the following very convenient and easy to use solution, which I am currenly using:
              https://github.com/oKcerG/SortFilterProxyModel

              You can get most of the ideas therein also from the Qt example:
              http://doc.qt.io/qt-5/qtquickcontrols-tableview-src-sortfilterproxymodel-cpp.html

              1 Reply Last reply
              2

              4/6

              16 Jun 2018, 20:39

              • Login

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