<?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[value not updated on gui]]></title><description><![CDATA[<p dir="auto">Hi</p>
<p dir="auto">i am updating a value on GUI in QT in single thread using below code</p>
<p dir="auto">Label[Index]-&gt;setText(time);<br />
this-&gt;update();<br />
qApp-&gt;processEvents();<br />
qDebug()&lt;&lt;"setting--------------------------------1"&lt;&lt;time&lt;&lt;"index=="&lt;&lt;Index&lt;&lt;"&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;"&lt;&lt;Label[Index]-&gt;text();</p>
<p dir="auto">first time value updated on gui but later it is not updating on gui.</p>
<p dir="auto">value is set on label correctly, checked using code  Label[Index]-&gt;text().</p>
<p dir="auto">but it is  not updating on gui.</p>
<p dir="auto">why it is not updating on GUI, please suggest me what i have to do.</p>
<p dir="auto">Thanks<br />
Shashi</p>
]]></description><link>https://forum.qt.io/topic/84072/value-not-updated-on-gui</link><generator>RSS for Node</generator><lastBuildDate>Tue, 04 Aug 2026 23:41:04 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/84072.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 11 Oct 2017 05:21:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to value not updated on gui on Wed, 11 Oct 2017 07:27:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/shashi-prasad">@<bdi>shashi-prasad</bdi></a> As I wrote in another thread: do not update UI in other thread than main thread! This is not going to work! UI must be updated in the main thread.</p>
]]></description><link>https://forum.qt.io/post/420084</link><guid isPermaLink="true">https://forum.qt.io/post/420084</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Wed, 11 Oct 2017 07:27:17 GMT</pubDate></item><item><title><![CDATA[Reply to value not updated on gui on Wed, 11 Oct 2017 07:03:30 GMT]]></title><description><![CDATA[<p dir="auto">std::thread commandExecutor(TimeThread);// created thread for updating playback  commandExecutor.detach();</p>
<p dir="auto">Label is created in constructor only before this thread</p>
<p dir="auto">void Mode::TimeThread()<br />
{<br />
int Index=0;<br />
//time is calculated here in qstring<br />
Label[Index]-&gt;setText(time);<br />
this-&gt;update();<br />
qApp-&gt;processEvents();</p>
<p dir="auto">}</p>
]]></description><link>https://forum.qt.io/post/420077</link><guid isPermaLink="true">https://forum.qt.io/post/420077</guid><dc:creator><![CDATA[shashi prasad]]></dc:creator><pubDate>Wed, 11 Oct 2017 07:03:30 GMT</pubDate></item><item><title><![CDATA[Reply to value not updated on gui on Wed, 11 Oct 2017 06:51:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/shashi-prasad">@<bdi>shashi-prasad</bdi></a> said in <a href="/post/420046">value not updated on gui</a>:</p>
<blockquote>
<p dir="auto">why it is not updating on GUI, please suggest me what i have to do</p>
</blockquote>
<p dir="auto">I would suggest to provide more information as with what you provided it is actually impossible to say why it behaves like this.<br />
Where and when is this code executed? Are you sure it is executed second time at all?<br />
Did you put another QLabel in Label[Index] after first call?<br />
Show your code.</p>
]]></description><link>https://forum.qt.io/post/420075</link><guid isPermaLink="true">https://forum.qt.io/post/420075</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Wed, 11 Oct 2017 06:51:01 GMT</pubDate></item><item><title><![CDATA[Reply to value not updated on gui on Wed, 11 Oct 2017 06:39:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/venkatesh-v">@<bdi>Venkatesh-V</bdi></a> said in <a href="/post/420052">value not updated on gui</a>:</p>
<blockquote>
<p dir="auto">label.setParent(this);</p>
</blockquote>
<p dir="auto">yes i have set label as</p>
<p dir="auto">Label[i] = new QLabel(this); but its not working</p>
]]></description><link>https://forum.qt.io/post/420071</link><guid isPermaLink="true">https://forum.qt.io/post/420071</guid><dc:creator><![CDATA[shashi prasad]]></dc:creator><pubDate>Wed, 11 Oct 2017 06:39:50 GMT</pubDate></item><item><title><![CDATA[Reply to value not updated on gui on Wed, 11 Oct 2017 05:41:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/shashi-prasad">@<bdi>shashi-prasad</bdi></a></p>
<p dir="auto">Have you set parent to the label as this widget?<br />
here you are updating widget if label has not set parent, update wont reflect to label.<br />
label.setParent(this);</p>
]]></description><link>https://forum.qt.io/post/420052</link><guid isPermaLink="true">https://forum.qt.io/post/420052</guid><dc:creator><![CDATA[Venkatesh V]]></dc:creator><pubDate>Wed, 11 Oct 2017 05:41:33 GMT</pubDate></item></channel></rss>