<?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 set text again in Text::onTextChanged]]></title><description><![CDATA[<p dir="auto">I am using Text component as label. And programatically I set text to 'Text component'.<br />
But, I would like to check input and set what I want again. For instance, take care of decimal point and unit by my customization.</p>
<p dir="auto">I tried this. But it didn't work even though I succeed updating of 'text' property.</p>
<p dir="auto">onTextChanged: {<br />
text = "my new changes'<br />
console.log("onTextChanged" + text)<br />
}</p>
<p dir="auto">Could you help me this?</p>
]]></description><link>https://forum.qt.io/topic/67051/how-to-set-text-again-in-text-ontextchanged</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 10:22:12 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/67051.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 14 May 2016 08:04:29 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to set text again in Text::onTextChanged on Sat, 14 May 2016 11:13:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/p3c0">@<bdi>p3c0</bdi></a> Thansk it works :)</p>
]]></description><link>https://forum.qt.io/post/327377</link><guid isPermaLink="true">https://forum.qt.io/post/327377</guid><dc:creator><![CDATA[Jehyeok]]></dc:creator><pubDate>Sat, 14 May 2016 11:13:10 GMT</pubDate></item><item><title><![CDATA[Reply to How to set text again in Text::onTextChanged on Sat, 14 May 2016 09:19:53 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/user/jehyeok">@<bdi>Jehyeok</bdi></a> and Welcome,<br />
<code>onTextChanged</code> signal handler returns a copy of the changed text which is what your are try to modify and hence it doesn't affect the text of <code>Text</code> component.<br />
To make it work just set text using <code>id</code> of <code>Text</code> component.<br />
For eg:</p>
<pre><code>onTextChanged: { 
  myText.text = "my new changes" // myText = id of Text component
}
</code></pre>
]]></description><link>https://forum.qt.io/post/327368</link><guid isPermaLink="true">https://forum.qt.io/post/327368</guid><dc:creator><![CDATA[p3c0]]></dc:creator><pubDate>Sat, 14 May 2016 09:19:53 GMT</pubDate></item></channel></rss>