I’m using a QTableView and a subclass of QAbstractTableModel as its model.
I saw that (by default) when the user types something the QTableView start searching the typed text in the first column and scroll the view to the matching element. This is what I wanted but not in the first column.
I cannot find a way to tell (code) QTableView or QAbstractTableModel which is the “search column”.
Any idea?
Thank you
QTableView usually searches in the column that currently has focus. Just click into a cell in the column you want to search at and start typing.
[Edit:]
Regarding your comment: You can set any cell to the active cell using
This will also select the cell. If you don’t want that, you can do
If you have slots connected to your current[Row|Column]Changed or selectionChanged signals of the table view’s selectionModel(), you might wanna do the following, dependent on your code: