title: How do I set the QComboBox width to fit the largest item?
body: <p>I have a <code>QComboBox</code> that I fill with <code>QString</code> using:</p>
  
  <pre><code>comboBox-&gt;addItem(someString);
  </code></pre>
  
  <p>When I start my GUI application the width of the <code>QComboBox</code> is always 70, even if the smallest item is much larger. How can I dynamically set the width of a <code>QComboBox</code>, for instance, to the largest <code>QString</code> within the <code>comboBox</code>?</p>
  
  <p><b>Edit:</b></p>
  
  <p>After some further testing I found the following solution:</p>
  
  <pre><code>// get the minimum width that fits the largest item.
  int width = ui-&gt;sieveSizeComboBox-&gt;minimumSizeHint().width();
  // set the ComboBoxe to that width.
  ui-&gt;sieveSizeComboBox-&gt;setMinimumWidth(width);
  </code></pre>