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

Search in QTableView

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 2 Posters 682 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.
  • T Offline
    T Offline
    Troyer
    wrote on last edited by
    #1

    Hi! Creating a database in QTableView and want to implement data search in it. How do I implement this? Maybe you have already finished the implementation of the code?

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

      Hi,

      Depends exactly on what you want to search. Are you looking in the data you loaded or at the database level ?

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

      T 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Depends exactly on what you want to search. Are you looking in the data you loaded or at the database level ?

        T Offline
        T Offline
        Troyer
        wrote on last edited by
        #3

        @SGaist I load the database automatically after running the app in QTableView. I have a row field (LineEdit) where I want to enter data, and then a search was performed in TableView, for example, deleting rows not by a search condition

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

          What model are you using ?

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

          T 1 Reply Last reply
          0
          • SGaistS SGaist

            What model are you using ?

            T Offline
            T Offline
            Troyer
            wrote on last edited by
            #5

            @SGaist QSqlTableModel

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

              SQL level: QSqlTableModel::setFilter.

              Otherwise QSortFilterProxyModel.

              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
              1

              • Login

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