I am searching for a way to locate data in a qtableview.

For instance I want to know the row where the first cell has text 'something'.
What I'm doing now to achieve this, is making a query with the same filter and sorting as the model that feeds the table and then traversing this query till I get to that cell.

But this method fails if the table gets a sortByColumn() in a column which has exactly the same data in the cells.

I don't know what sortByColumn exactly does in this case, at least the order of the data is not the same as with the query so this trick does not work then.

Thanks.