Say I add a bunch of columns to my TableWidget.
Qt Code:
  1. tw.horizontalHeader().resizeSection(0, 130)
  2. tw.horizontalHeader().resizeSection(1, 150)
  3. tw.horizontalHeader().resizeSection(2, 400)
  4. tw.horizontalHeader().resizeSection(3, 100)
  5. tw.horizontalHeader().resizeSection(4, 100)
To copy to clipboard, switch view to plain text mode 

How can it resize (keeping proportions) so you never get the empty space at the end, nor horizontal scrollbars?

Screenshot.png

Thanks.