<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[auto completions in QComboBox]]></title><description><![CDATA[<p dir="auto">How to set auto completions in QComboBox? I want to have ability to open QComboBox and type, for example, a4 to select corresponding (last) line.<br />
<img src="https://ddgobkiprc33d.cloudfront.net/6e27bbb6-7fda-41aa-b36e-305b2a8f9529.png" alt="combo1.png" class=" img-fluid img-markdown" /><br />
My <a href="https://github.com/AndreiCherniaev/QComboBox_uses_QCompleter" target="_blank" rel="noopener noreferrer nofollow ugc">example</a> is based on <a href="https://doc.qt.io/qt-6/qcompleter.html#details" target="_blank" rel="noopener noreferrer nofollow ugc">doc</a>. Behaviour makes me confuse:</p>
<ol>
<li>I can press "a" to go to next item. But after push "a" I should wait about 3 seconds and then I can push "a" again to go to the next item. When last item is selected, I can push "a" to go to initial item, like on circle. It is strange. Why this happen?</li>
<li>I open QComboBox, then type "a4" but "a2" is selected instead of "a4". It looks like auto completions is totally doesn't work...</li>
<li>How to do QComboBox without setEditable(true)? I want design similar to <a href="github.com/shiftkey/desktop/releases/">GitHub Desktop</a>: I can type "Qt" to go to corresponding item but user has no ability to write any text directly to QComboBox.<br />
<img src="https://ddgobkiprc33d.cloudfront.net/fcccae28-9465-4810-adf4-be1aed299fe0.png" alt="GitHub Desktop qt.png" class=" img-fluid img-markdown" /></li>
<li>I want auto completions between a1, a2, .., a20 but user on keyboard will type number without a: just 1 or 2 or 20 and inside QComboBox text should be with a: a1 or a2 or a20. How to do it?</li>
</ol>
<pre><code>QStringList wordList;
wordList &lt;&lt; "a1" &lt;&lt; "a2" &lt;&lt; "a3" &lt;&lt; "a4";

QComboBox *combobox = new QComboBox(this);
foreach(QString str, wordList){
    combobox-&gt;addItem(str);
}
combobox-&gt;setEditable(true);

QCompleter *completer = new QCompleter(wordList, this);
completer-&gt;setCaseSensitivity(Qt::CaseInsensitive);
combobox-&gt;setCompleter(completer);
</code></pre>
<p dir="auto">Ubuntu 25.10 (wayland)<br />
Qt 6.11.0-rc and Qt 6.8.0-rc were tested</p>
]]></description><link>https://forum.qt.io/topic/164403/auto-completions-in-qcombobox</link><generator>RSS for Node</generator><lastBuildDate>Thu, 23 Apr 2026 11:11:14 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/164403.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 09 Mar 2026 10:51:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to auto completions in QComboBox on Mon, 09 Mar 2026 21:47:06 GMT]]></title><description><![CDATA[<p dir="auto">1 and 2 worked on my computer debian 12 KDE X11. Maybe the problem is related with wayland.</p>
]]></description><link>https://forum.qt.io/post/836990</link><guid isPermaLink="true">https://forum.qt.io/post/836990</guid><dc:creator><![CDATA[CKurdu]]></dc:creator><pubDate>Mon, 09 Mar 2026 21:47:06 GMT</pubDate></item></channel></rss>