<?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[Detect arbitrary custom attributes from application QSS style in MyWidget::paintEvent?]]></title><description><![CDATA[<p dir="auto">So I have a custom widget that I want to style. I use an application-wide style for styling everything else, but my widget has this specific thing that it paints, and it would be very neat if it could retrieve its color from QSS, e. g.:</p>
<pre><code>MyWidget { customThingColor: red }
</code></pre>
<p dir="auto">Is it doable? Certainly, it's not the only way to pass a parameter to a widget, but it would be most neat if I could put ALL the styling code in a single app-wide QSS string.</p>
]]></description><link>https://forum.qt.io/topic/67612/detect-arbitrary-custom-attributes-from-application-qss-style-in-mywidget-paintevent</link><generator>RSS for Node</generator><lastBuildDate>Tue, 17 Mar 2026 02:34:50 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/67612.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 28 May 2016 20:41:42 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Detect arbitrary custom attributes from application QSS style in MyWidget::paintEvent? on Sun, 29 May 2016 12:50:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a>, awesome, that works! Thanks a lot. Sorry I couldn't find it in the docs.</p>
]]></description><link>https://forum.qt.io/post/330306</link><guid isPermaLink="true">https://forum.qt.io/post/330306</guid><dc:creator><![CDATA[Violet Giraffe]]></dc:creator><pubDate>Sun, 29 May 2016 12:50:52 GMT</pubDate></item><item><title><![CDATA[Reply to Detect arbitrary custom attributes from application QSS style in MyWidget::paintEvent? on Sat, 28 May 2016 22:12:34 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">You can use designable <code>Q_PROPERTIES</code> for that. See <a href="http://doc.qt.io/qt-5/stylesheet-syntax.html#setting-qobject-properties" target="_blank" rel="noopener noreferrer nofollow ugc">here</a></p>
]]></description><link>https://forum.qt.io/post/330271</link><guid isPermaLink="true">https://forum.qt.io/post/330271</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Sat, 28 May 2016 22:12:34 GMT</pubDate></item></channel></rss>