How to make QTableWidget's columns assume the maximum space?
12,735
The headers of the table have methods for controlling this:
header = table.horizontalHeader()
header.setStretchLastSection(True)
or:
header.setResizeMode(QHeaderView.Stretch)
![neydroydrec](https://i.stack.imgur.com/stFKO.png?s=256&g=1)
Author by
neydroydrec
South Asianist, polyglot, amateur programmer, urban farming entrepreneur, development analyst, philosopher, control freak, coffee addict, etc. etc.
Updated on June 04, 2022Comments
-
neydroydrec about 2 years
The columns of my QTableWidget do not fill in the space of the table, so that an empty space is left on the right hand-side. How to make the columns of my QTableWidget assume the maximum space so as to fill in this space?