ham-sandwich
ham-sandwich

Reputation: 4052

QTableView / QTableWidget: Stretch Last Column using Qt Designer

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

Upvotes: 2

Views: 1868

Answers (1)

ham-sandwich
ham-sandwich

Reputation: 4052

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

Upvotes: 2

Related Questions