2

I am trying to stretch the last header of my QTableView / QTableWidget in PyQt. Multiple questions have been asked about this topic already by hard coding the value into the file such as:

Qt table last column not stretching to fill in parent

How to stretch QTableView last column header

But how can this be achieved from the Qt Designer?

Before

Community
  • 1
  • 1
ham-sandwich
  • 3,975
  • 10
  • 34
  • 46

1 Answers1

2

In the Qt Designer, Select the QTableWidget / QTableView and navigate to the Property Editor. Here, scroll down to the 'Header section' and enable horizontalHeaderStretchLastSection.

Qt Designer Property Box Qt After stretch

ham-sandwich
  • 3,975
  • 10
  • 34
  • 46