PDA

View Full Version : QTableview set columns maximun width



danalex07
6th January 2016, 17:54
im trying to set a maximun width size for all columns in a qtableview but i can´t find anything in the documentation to make it possible....any ideas?

anda_skoa
6th January 2016, 18:39
column width or row height are controlled by the respective header view, i.e. for columns that would be the horizontal header view, see QTableview::horizontalHeader().

Cheers,
_

danalex07
6th January 2016, 20:04
thx man i got it all working with ui->tableView->horizontalHeader()->setMaximumSectionSize(int);