How to set the column width to be the whole QTableWidget width?
<p>I have an object of type QTableWidget. It contains only one column.
How do I set the column width to be the whole QTableWidget width?</p>

<p><img src="http://i.stack.imgur.com/7Yq3o.png" alt="Graphical representation"></p>

<p>Also: is there a way to delete the header of the column?</p>

<p>Try to use the following (assuming your table widget is called <code>tableWidget</code>)...</p>

<pre><code>tableWidget.horizontalHeader().setStretchLastSection(True)
</code></pre>

python pyqt width pyqt5 qtablewidget