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 button in table widget
Forum Updated to NodeBB v4.3 + New Features

Search button in table widget

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 830 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
    deleted286
    wrote on last edited by
    #1

    How to add search button into table widget?

    Here is an example of pyqt.I want to something like it. Is it possible to do it?
    https://www.learnpyqt.com/tutorials/widget-search-bar/

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Add a QLineEdit above your QTableWidget and use the input for filtering.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      D 1 Reply Last reply
      3
      • Christian EhrlicherC Christian Ehrlicher

        Add a QLineEdit above your QTableWidget and use the input for filtering.

        D Offline
        D Offline
        deleted286
        wrote on last edited by
        #3

        @Christian-Ehrlicher thank you

        D 1 Reply Last reply
        0
        • D deleted286

          @Christian-Ehrlicher thank you

          D Offline
          D Offline
          deleted286
          wrote on last edited by
          #4

          @suslucoder

          QList<QTableWidgetItem*> arama =ui->tableWidget->findItems(ui->ara->text(), Qt::MatchContains );
               qDebug() << arama.count();
          

          I did it like that but nothing happened

          jsulmJ 1 Reply Last reply
          0
          • D deleted286

            @suslucoder

            QList<QTableWidgetItem*> arama =ui->tableWidget->findItems(ui->ara->text(), Qt::MatchContains );
                 qDebug() << arama.count();
            

            I did it like that but nothing happened

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @suslucoder Was this code executed at all? How is it triggered? Please provide more information when asking!

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            2

            • Login

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