Python Forum

Full Version: Determine whether text in QTableView cell is fully visible or not
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi!

I need to implement a feature for QTableView which many spreadsheet programs have. For example, LibreOffice Calc shows an arrow for a cell if text within this cell cannot be made fully visible without resizing it.

I know about sizeHint method, however calculating a height for each cell takes about the same time as resizing the table by contents, i.e. it is very slow (my program which needs to show 400x10 table becomes about 5 times slower).

So, if there is a fast method to tell if text fully fits the cell?