TableView with multiple resize mode
-
I have a table with several columns. When I set it like this, the content is occupying whole free space:
ui->tableView->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
But when i am not in fullscreen, some contents not fits to its column size.
QHeaderView::ResizeToContents
does this job. But when I use it, the tableview not occupy whole free space but just needed space. I want to use them together withQHeaderView::Interactive
but last called one overrides formers. How can I do this? -
Hi,
One possible way would be to change the resize mode when the window state changes, get the result wanted and then change it back to interactive.