QTableView Column setSectionResizeMode and Font
Qt.Jo.Ha last edited by
i have a table View, and column count 3
setColumnWidth 0 -> 30
setColumnWidth 1 -> 150
setColumnWidth 2-> 150
Depending on the font, the width of the column may change, but what should be done to not change it?
JonB last edited by JonB
This should produce 3 columns: width 30, width 150, width whatever to stretch to fit.
If you are saying some of the columns grow wider to fit their content, perhaps according to font, and you do not want that, then I think look at using
horizontalHeader()->setSectionResizeMode(column, QHeaderView::Fixed);for each column?