<?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[QLabel::setText() on inactive window of Mac]]></title><description><![CDATA[<p dir="auto">Hi, this seems to be a bit of a tricky one. Problem observed on Qt 5.9, 5.12 and 5.15.</p>
<p dir="auto">In the app I am debugging on Mac, there is a main app window, and a non-modal tabbed settings window in which there are some <code>QLabel</code> items that get regularly updated with data values (a couple of times a second).</p>
<p dir="auto">The problem is that if the settings window is displayed, but is <em>not</em> on top (the main app window is on top), <em>and</em> the user is not interacting with the program, the label updates result in steadily increasing memory usage. Then after some time (10 minutes or more), when the user next tries to interact with the program, the program goes busy (spinning ball) for a significant time before resuming. Once the program has resumed, the memory usage has gone down somewhat.</p>
<p dir="auto">If the settings window <em>is</em> on top, the memory usage does not increase significantly.</p>
<p dir="auto">It seems like there are objects being queued for deletion by the label updates, but that these deletions are only processed when the owning window is on top, and otherwise are queued for an event loop that doesn't run until the user interacts with the program again.</p>
<p dir="auto">Is there a way to ensure these queued deletions get processed in the background as soon as they can be, rather than being queued up for a long time?</p>
<p dir="auto">One further data item is that an older version of the program did not use a tabbed dialog for the settings window, just a simple dialog, and it doesn't suffer from this problem. It seems that maybe the tabbed dialog somehow gives rise to the issue.</p>
<p dir="auto">This issue has only been observed on Mac, not on Windows or Linux.</p>
]]></description><link>https://forum.qt.io/topic/126949/qlabel-settext-on-inactive-window-of-mac</link><generator>RSS for Node</generator><lastBuildDate>Thu, 05 Nov 2026 04:20:02 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/126949.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 24 May 2021 16:12:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QLabel::setText() on inactive window of Mac on Tue, 25 May 2021 19:28:08 GMT]]></title><description><![CDATA[<p dir="auto">Is it hidden or just not active ?</p>
<p dir="auto">One thing you can do is use GammaRay to check what is going on.</p>
]]></description><link>https://forum.qt.io/post/661536</link><guid isPermaLink="true">https://forum.qt.io/post/661536</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Tue, 25 May 2021 19:28:08 GMT</pubDate></item><item><title><![CDATA[Reply to QLabel::setText() on inactive window of Mac on Mon, 24 May 2021 16:41:48 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> That would be a significant challenge. The program exhibiting the issue (Jamulus) is large and complex.</p>
<p dir="auto">At this stage I was hoping to understand the principles involved with Qt, particularly how the event loop relates to a background window.</p>
]]></description><link>https://forum.qt.io/post/661309</link><guid isPermaLink="true">https://forum.qt.io/post/661309</guid><dc:creator><![CDATA[Tony Mountifield]]></dc:creator><pubDate>Mon, 24 May 2021 16:41:48 GMT</pubDate></item><item><title><![CDATA[Reply to QLabel::setText() on inactive window of Mac on Mon, 24 May 2021 16:34:23 GMT]]></title><description><![CDATA[<p dir="auto">Hi and welcome to devnet,</p>
<p dir="auto">Can you provide a minimal compilable example that shows this behaviour ?</p>
]]></description><link>https://forum.qt.io/post/661307</link><guid isPermaLink="true">https://forum.qt.io/post/661307</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Mon, 24 May 2021 16:34:23 GMT</pubDate></item></channel></rss>