Expand middle column of table to fit contents

  • I have a QTableWidget and would like the contents to expand to fit the middle column, I have three columns total. I can get ot to do this for the last column but how do I set for the middle column?
    Thanks for any help

  • tableWidget->horizontalHeader()->setSectionResizeMode(column,QHeaderView::ResizeToContents);

  • @VRonin Thanks, that did the trick.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.