column width in QTableWidget and PyQt4
<p>I have a QTableWidget and I want to make sure that all the columns are stretched, i.e occupy all of the form. The solution that I found is provided <a href="http://stackoverflow.com/a/23215842/1636521">here</a> but it seems to be for <code>Qt5</code> and <code>C++</code>. I'm working with <code>PyQt4</code> and <code>Python</code>. Is there a way to do this in <code>PyQt4</code>?</p>

<p>the function for PyQt that is similar to that and which also apply to QHeaderView  is :</p>

<pre><code>setResizeMode (self, ResizeMode mode)
</code></pre>

<p>with possible values for resize mode </p>

<pre><code>enum ResizeMode { Interactive, Fixed, Stretch, ResizeToContents, Custom }
</code></pre>

<p>more information :</p>

<p><a href="http://pyqt.sourceforge.net/Docs/PyQt4/qheaderview.html" rel="nofollow">http://pyqt.sourceforge.net/Docs/PyQt4/qheaderview.html</a></p>

python python-2.7 qt qt4 pyqt4