<?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[best way to create diffrent theme in program]]></title><description><![CDATA[<p dir="auto">Hey guys, some question<br />
imagine we a gui that we created mostly in <strong>QtDesigner</strong>; the gui use lots of stylesheet for the element inside of it that mostly changed the look of elements (most of stylesheet add inside the designer itself)<br />
what is best way to create a dark and light mode for the gui? I mean how can we change the color of all element in gui in each mode that work best?<br />
I'm talking about just changing the color, not each time add the whole stylesheet to it with different color?</p>
]]></description><link>https://forum.qt.io/topic/134258/best-way-to-create-diffrent-theme-in-program</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 00:07:19 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/134258.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 11 Feb 2022 14:16:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to best way to create diffrent theme in program on Sat, 19 Feb 2022 13:18:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a> I'm using two color palette for each dark and light theme, so you saying for example its better to get the stylesheet of the parent widget and just replace the values of it to other theme and reApply it? is it the most efficient way?</p>
]]></description><link>https://forum.qt.io/post/703286</link><guid isPermaLink="true">https://forum.qt.io/post/703286</guid><dc:creator><![CDATA[saeid0034]]></dc:creator><pubDate>Sat, 19 Feb 2022 13:18:09 GMT</pubDate></item><item><title><![CDATA[Reply to best way to create diffrent theme in program on Sat, 19 Feb 2022 13:10:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/saeid0034">@<bdi>saeid0034</bdi></a><br />
Indeed, but this is down to you 100% to write the code to read &amp; replace, there is nothing in QSS/CSS that will do that.</p>
]]></description><link>https://forum.qt.io/post/703285</link><guid isPermaLink="true">https://forum.qt.io/post/703285</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Sat, 19 Feb 2022 13:10:00 GMT</pubDate></item><item><title><![CDATA[Reply to best way to create diffrent theme in program on Sat, 19 Feb 2022 13:04:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> can I do somthing like put formating argument in Stylesheet in QDesigner then latter change it using the format?</p>
]]></description><link>https://forum.qt.io/post/703284</link><guid isPermaLink="true">https://forum.qt.io/post/703284</guid><dc:creator><![CDATA[saeid0034]]></dc:creator><pubDate>Sat, 19 Feb 2022 13:04:23 GMT</pubDate></item><item><title><![CDATA[Reply to best way to create diffrent theme in program on Sun, 13 Feb 2022 20:38:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/saeid0034">@<bdi>saeid0034</bdi></a> said in <a href="/post/702363">best way to create diffrent theme in program</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> so I cant just apply it in designer and just later change the color of it?</p>
</blockquote>
<p dir="auto">You would need to retrieve that stylesheet, parse it,<br />
do the modification and then re-apply it.</p>
<blockquote>
<p dir="auto">other then that what is the best way to apply the stylesheet to whole widgets? should I just create a long stylesheet and apply all styles to all element inside it and put it to a top widget?</p>
</blockquote>
<p dir="auto">That depends on what you want to change and the structure of your widgets.</p>
]]></description><link>https://forum.qt.io/post/702390</link><guid isPermaLink="true">https://forum.qt.io/post/702390</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Sun, 13 Feb 2022 20:38:04 GMT</pubDate></item><item><title><![CDATA[Reply to best way to create diffrent theme in program on Sun, 13 Feb 2022 12:20:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> so I cant just apply it in designer and just later change the color of it?<br />
other then that what is the best way to apply the stylesheet to whole widgets? should I just create a long stylesheet and apply all styles to all element inside it and put it to a top widget?</p>
]]></description><link>https://forum.qt.io/post/702363</link><guid isPermaLink="true">https://forum.qt.io/post/702363</guid><dc:creator><![CDATA[saeid0034]]></dc:creator><pubDate>Sun, 13 Feb 2022 12:20:37 GMT</pubDate></item><item><title><![CDATA[Reply to best way to create diffrent theme in program on Fri, 11 Feb 2022 19:50:19 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">If you want to change an element of a stylesheet you have to re-apply the stylesheet afterward.</p>
<p dir="auto">So if you have "changeable" style sheets, the most simple is to keep them in strings with arguments so that you can regenerate them at will.</p>
]]></description><link>https://forum.qt.io/post/702281</link><guid isPermaLink="true">https://forum.qt.io/post/702281</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Fri, 11 Feb 2022 19:50:19 GMT</pubDate></item></channel></rss>