<?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[How to style a disabled item in a QComboBox ? (qss)]]></title><description><![CDATA[<p dir="auto">I used this code to disable an item inside a combobox : <a href="https://stackoverflow.com/questions/38915001/disable-specific-items-in-qcombobox" target="_blank" rel="noopener noreferrer nofollow ugc">https://stackoverflow.com/questions/38915001/disable-specific-items-in-qcombobox</a><br />
I can disable specific items in QComboBox (it's ok)</p>
<p dir="auto">And I would like a visual feedback. I would like to put the text of the disabled item in red.</p>
<p dir="auto">I tried this code but it doesn't nothing.</p>
<pre><code>QComboBox::item:!enabled
{
color:red;
}
</code></pre>
<p dir="auto">I think that it's somewhere in the drop-down. But this code doesn't work also :</p>
<pre><code>QComboBox::drop-down:item:!enabled {
color:red;
}
</code></pre>
]]></description><link>https://forum.qt.io/topic/84053/how-to-style-a-disabled-item-in-a-qcombobox-qss</link><generator>RSS for Node</generator><lastBuildDate>Thu, 05 Nov 2026 02:16:36 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/84053.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 10 Oct 2017 12:40:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to style a disabled item in a QComboBox ? (qss) on Fri, 07 Sep 2018 18:17:47 GMT]]></title><description><![CDATA[<p dir="auto">Try my code. It will style the disabled combobox items.</p>
<pre><code>QComboBox QAbstractItemView::disabled {
    color: #FF0000;
}
</code></pre>
]]></description><link>https://forum.qt.io/post/480298</link><guid isPermaLink="true">https://forum.qt.io/post/480298</guid><dc:creator><![CDATA[Cobra91151]]></dc:creator><pubDate>Fri, 07 Sep 2018 18:17:47 GMT</pubDate></item><item><title><![CDATA[Reply to How to style a disabled item in a QComboBox ? (qss) on Tue, 10 Oct 2017 13:20:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/julia_f">@<bdi>julia_f</bdi></a></p>
<pre><code>QComboBox QAbstractItemView::item:!enabled
{
    color:red;
}
</code></pre>
]]></description><link>https://forum.qt.io/post/419924</link><guid isPermaLink="true">https://forum.qt.io/post/419924</guid><dc:creator><![CDATA[raven-worx]]></dc:creator><pubDate>Tue, 10 Oct 2017 13:20:50 GMT</pubDate></item></channel></rss>