title: How to Make Qt Grid Layout Auto Size Column Widths
body: <p>I have a <code>QDialog</code> with a grid layout in it. The grid is 5 columns wide by a variable number of rows. The <code>QDialog</code> begins with a prebuilt UI that has a label in each of the 5 columns. The rest of the grid is built as follows. For each row added:</p>
  
  <ul>
  <li>a QLineEdit is added to col 0</li>
  <li>a QComboBox is added to cols 1-3 and each has a variable and different number of items</li>
  <li>a QCheckBox is added to col 4</li>
  </ul>
  
  <p>When this is complete column 0 is the widest column. Columns 1-4 are the same width. Some combo box items (cols 1-3) are too wide to see and show up as "...". The check box column (4) is wider than it needs to be. I've tried using <code>QWidget::adjustSize()</code> on every damn widget in there including the dialog itself and I can't get it to auto size to fit everything. In trying to debug it I printed out the widget's width for each column but the values I'm seeing are no way what I'm seeing on screen. I was under the impression the grid layout would automatically adjust each widget in each column to be just wide enough to fit the widest item but it doesn't seem to be doing that. Is there some sort of <code>setAutoColumnWidth</code> property or something?</p>