Results 1 to 2 of 2

Thread: Searching a QTable

  1. #1
    Join Date
    Aug 2007
    Posts
    19
    Thanks
    5
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    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?
    Thanks!

    Nate

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    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

Bookmarks

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.