<?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[Qt: How to display only Image and hide text in a QCombobox]]></title><description><![CDATA[<p dir="auto">I have a Combobox which has 3 items i.e. Item 1, Item 2 and item 3. I added these 3 items in .ui file and also added an image each for all. Now when I am running the application, it shows the first item in combobox along with a image towards left. When i click on dropdown, I can see all the items along with images.</p>
<p dir="auto">What I basically want to do is just display the image in the combobox and when user clicks on dropdown, it should show the image and text too.</p>
<p dir="auto"><em>Scenario:</em> Items and images inside Combobox are added as follows:</p>
<p dir="auto">Image 1 Item 1<br />
Image 2 Item 2<br />
Image 2 Item 3</p>
<p dir="auto">When I run the app, it should display in combobox as</p>
<p dir="auto">Image1 since first item gets displayed by default.</p>
]]></description><link>https://forum.qt.io/topic/22314/qt-how-to-display-only-image-and-hide-text-in-a-qcombobox</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 07:03:27 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/22314.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 18 Dec 2012 09:54:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Qt: How to display only Image and hide text in a QCombobox on Tue, 18 Dec 2012 11:15:20 GMT]]></title><description><![CDATA[<p dir="auto">If you want some extra/custom functionality, you should do it yourself... or use it as is....</p>
]]></description><link>https://forum.qt.io/post/159963</link><guid isPermaLink="true">https://forum.qt.io/post/159963</guid><dc:creator><![CDATA[AcerExtensa]]></dc:creator><pubDate>Tue, 18 Dec 2012 11:15:20 GMT</pubDate></item><item><title><![CDATA[Reply to Qt: How to display only Image and hide text in a QCombobox on Tue, 18 Dec 2012 11:02:44 GMT]]></title><description><![CDATA[<p dir="auto">But this is when Combobox is set dynamically. I mean when it is set programmatically. I am doing it vai .ui file. I tried the above method but it doesn't make any difference.<br />
[quote author="AcerExtensa" date="1355825009"]I think you need to delegate items for your combo box. This topic may be helpful: "SOLVED - QT 4.7 QComboBox Custom Item Delegate Doesn’t affect the current item displayed":<a href="http://qt-project.org/forums/viewthread/17880%5B/quote%5D" target="_blank" rel="noopener noreferrer nofollow ugc">http://qt-project.org/forums/viewthread/17880[/quote]</a></p>
]]></description><link>https://forum.qt.io/post/159957</link><guid isPermaLink="true">https://forum.qt.io/post/159957</guid><dc:creator><![CDATA[Stoned Jesus]]></dc:creator><pubDate>Tue, 18 Dec 2012 11:02:44 GMT</pubDate></item><item><title><![CDATA[Reply to Qt: How to display only Image and hide text in a QCombobox on Tue, 18 Dec 2012 10:03:29 GMT]]></title><description><![CDATA[<p dir="auto">I think you need to delegate items for your combo box. This topic may be helpful: "SOLVED - QT 4.7 QComboBox Custom Item Delegate Doesn’t affect the current item displayed":<a href="http://qt-project.org/forums/viewthread/17880" target="_blank" rel="noopener noreferrer nofollow ugc">http://qt-project.org/forums/viewthread/17880</a></p>
]]></description><link>https://forum.qt.io/post/159940</link><guid isPermaLink="true">https://forum.qt.io/post/159940</guid><dc:creator><![CDATA[AcerExtensa]]></dc:creator><pubDate>Tue, 18 Dec 2012 10:03:29 GMT</pubDate></item></channel></rss>