PDA

View Full Version : QTableWidget Resize issue



ToddAtWSU
6th March 2008, 15:50
This seems like it should be a trivial problem but I cannot seem to figure out how to solve this. I have a QTableWidget with a couple columns. When the user resizes the window and makes it bigger, I get this dead space on the right side of the table. Is there a way to have the columns fill the available space so there is no dead space on a resize? I don't want to resize to contents because the contents may be too small. Thanks!

jpn
6th March 2008, 17:34
Set header view's resize mode to "stretch".

QTableView::horizontalHeader()
QHeaderView::setResizeMode()

ToddAtWSU
6th March 2008, 20:08
That worked...didn't realize it would be in the header view. Thanks!