Results 1 to 2 of 2

Thread: Searching a QTable

  1. #1
    Join Date
    Aug 2007
    Qt products
    Qt3 Qt4

    Default Searching a QTable

    Im working with a project that uses a QTable (Q3Table i suppose) and a 'search' QLineEdit. What I would like to happen is that as the user types in a string in the line edit, the QTable will automatically update, showing only the elements that contain the entered string. I'm aware that this can be done with a QTableView but I would like to know how to accomplish this using a QTable since the project I'm working on contains one that is deeply situated in the code (i.e would cause me great pain to change so much code!) Can anyone help out?


  2. #2
    Join Date
    Jan 2006
    Warsaw, Poland
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits

    Default Re: Searching a QTable

    I'm afraid achieving what you want with Q3Table might be a pain as well. Each time when the contents of the line edit changes (contentsChanged signal, if I remember correctly), you have to go through all the table items (in a custom slot) and hide/show them as needed.

  3. The following user says thank you to wysota for this useful post:

    nategoofs (12th August 2007)

Similar Threads

  1. QTable - Data Base Problem
    By esq in forum Qt Tools
    Replies: 9
    Last Post: 28th May 2007, 00:08
  2. QTable - Date Base Problem
    By esq in forum Qt Programming
    Replies: 4
    Last Post: 23rd May 2007, 03:32
  3. Regarding alignment in QTable
    By joseph in forum Qt Programming
    Replies: 4
    Last Post: 5th December 2006, 11:35
  4. Problem with QTable
    By zlatko in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2006, 11:00
  5. QTable..Vs.. QListView
    By :db:sStrong in forum Qt Programming
    Replies: 1
    Last Post: 15th February 2006, 22:03


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.