QComboBox - Select no entry : <p>I have a QComboBox on my ui and set the model like this:</p>

<pre><code>QStringListModel* model = new QStringListModel;
QStringList stringlist;
stringlist &lt;&lt; "Test1" &lt;&lt; "Test2" &lt;&lt; "Test3";

model-&gt;setStringList(stringlist);
ui-&gt;comboBox-&gt;setModel(model);
</code></pre>

<p>Now I want to change the current index to be none (so that I get a blank combo box).</p>

<p>I already tried setting the current index to -1 with <code>ui-&gt;comboBox-&gt;setCurrentIndex(-1);</code>, but that results to an index aout of range exeption in qlist:</p>

<pre><code>ASSERT failure in QList&lt;T&gt;::operator[]: "index out of range", file F:/Qt/5.4/mingw491_32/include/QtCore/qlist.h, line 486
</code></pre>
