Oct-27-2022, 09:29 PM
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?
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?