View Full Version : Searching a QTable

8th August 2007, 22:26
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?


8th August 2007, 23:15
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.