<?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[QTimeedit set color]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I want to set the <strong>font color for QTimeedit in source code</strong>(mainwindow.cpp) . Instead of setstylesheet function, is there any tool to set the font color in qtimeedit?. I tried QPalette class,but it was not work.<br />
Can you help me to sort out this issues?</p>
]]></description><link>https://forum.qt.io/topic/76570/qtimeedit-set-color</link><generator>RSS for Node</generator><lastBuildDate>Tue, 18 Aug 2026 01:33:34 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/76570.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 24 Feb 2017 06:05:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QTimeedit set color on Fri, 24 Feb 2017 07:30:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a> said in <a href="/post/378118">QTimeedit set color</a>:</p>
<blockquote>
<p dir="auto">Hi<br />
Small note.</p>
<p dir="auto">There is no reason to new the palette</p>
<p dir="auto">QPalette palette;<br />
...<br />
yourtimeedit-&gt;setPalette(palette);</p>
<p dir="auto">Works just fine</p>
<p dir="auto">The setPalette makes copy.</p>
<p dir="auto">Also, with new you must then<br />
delete palette;<br />
to avoid to leak.</p>
</blockquote>
<p dir="auto">Good point <a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a>  ,</p>
<p dir="auto">Delete palette was obvious for me , but you are right ,</p>
<pre><code>QPalette palette;
</code></pre>
<p dir="auto">Already does the job,</p>
<p dir="auto">Thank you for your answer !</p>
]]></description><link>https://forum.qt.io/post/378120</link><guid isPermaLink="true">https://forum.qt.io/post/378120</guid><dc:creator><![CDATA[mostefa]]></dc:creator><pubDate>Fri, 24 Feb 2017 07:30:27 GMT</pubDate></item><item><title><![CDATA[Reply to QTimeedit set color on Fri, 24 Feb 2017 07:25:22 GMT]]></title><description><![CDATA[<p dir="auto">Hi<br />
Small note.</p>
<p dir="auto">There is no reason to new the palette</p>
<p dir="auto">QPalette palette;<br />
...<br />
yourtimeedit-&gt;setPalette(palette);</p>
<p dir="auto">Works just fine</p>
<p dir="auto">The setPalette makes copy.</p>
<p dir="auto">Also, with new you must then<br />
delete palette;<br />
to avoid to leak.</p>
]]></description><link>https://forum.qt.io/post/378118</link><guid isPermaLink="true">https://forum.qt.io/post/378118</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Fri, 24 Feb 2017 07:25:22 GMT</pubDate></item><item><title><![CDATA[Reply to QTimeedit set color on Fri, 24 Feb 2017 07:25:22 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/surendark">@<bdi>SurendarK</bdi></a></p>
<pre><code>QPalette *palette = new QPalette();
palette-&gt;setColor(QPalette::Text,Qt::red);//Here i change font color to red
yourtimeedit-&gt;setPalette(*palette);
</code></pre>
<p dir="auto">Hope this can help!</p>
]]></description><link>https://forum.qt.io/post/378110</link><guid isPermaLink="true">https://forum.qt.io/post/378110</guid><dc:creator><![CDATA[mostefa]]></dc:creator><pubDate>Fri, 24 Feb 2017 07:25:22 GMT</pubDate></item></channel></rss>