<?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[Inserting Widgets in layout with ForLoop cause Freeze]]></title><description><![CDATA[<p dir="auto">what can i do in order to fix this.<br />
i tried sending Widgets by signals so maybe Qt handle it.<br />
and also tried using ProcessEvent in my event loop but i know its too risky.</p>
]]></description><link>https://forum.qt.io/topic/98963/inserting-widgets-in-layout-with-forloop-cause-freeze</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Apr 2026 09:56:32 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/98963.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 26 Jan 2019 08:25:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Inserting Widgets in layout with ForLoop cause Freeze on Sat, 26 Jan 2019 11:20:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mahd96">@<bdi>mahd96</bdi></a><br />
Yes, <a class="plugin-mentions-user plugin-mentions-a" href="/user/aha_1980">@<bdi>aha_1980</bdi></a> will mean something like that.  Along the lines of: set the timer to a short period, each time it ticks pull, say, 10 widgets off your queue and insert, then the next batch comes a hundredth of a second later or whatever.  By doing that the UI will not "freeze" from the user's point of view.  Of course, if the user interacts with your page after the first bunch of widgets have been placed but before the rest  have been added, you may not be a good place, so you will have to do something suitable about that....</p>
<p dir="auto">Just how long is your 100 widgets taking?  Is the content of certain ones what is costly?  Don't forget that, for example, if you are populating them with a list or images which are taking time, you can rearrange to place them initially with empty content and then do the costly population in the background/on a timer.  Like web pages arrive initially, and only afterward the pictures get filled in, etc.</p>
]]></description><link>https://forum.qt.io/post/507317</link><guid isPermaLink="true">https://forum.qt.io/post/507317</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Sat, 26 Jan 2019 11:20:24 GMT</pubDate></item><item><title><![CDATA[Reply to Inserting Widgets in layout with ForLoop cause Freeze on Sat, 26 Jan 2019 10:55:44 GMT]]></title><description><![CDATA[<p dir="auto">how i replace a loop with timer? do you mean a queue that handled by a timer?</p>
]]></description><link>https://forum.qt.io/post/507313</link><guid isPermaLink="true">https://forum.qt.io/post/507313</guid><dc:creator><![CDATA[mahd96]]></dc:creator><pubDate>Sat, 26 Jan 2019 10:55:44 GMT</pubDate></item><item><title><![CDATA[Reply to Inserting Widgets in layout with ForLoop cause Freeze on Sat, 26 Jan 2019 09:59:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mahd96">@<bdi>mahd96</bdi></a> don't use a loop, use a QTimer instead.</p>
]]></description><link>https://forum.qt.io/post/507302</link><guid isPermaLink="true">https://forum.qt.io/post/507302</guid><dc:creator><![CDATA[aha_1980]]></dc:creator><pubDate>Sat, 26 Jan 2019 09:59:49 GMT</pubDate></item><item><title><![CDATA[Reply to Inserting Widgets in layout with ForLoop cause Freeze on Sat, 26 Jan 2019 09:44:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mahd96">@<bdi>mahd96</bdi></a> Hi<br />
Only for information.<br />
Is application for low performance system?</p>
]]></description><link>https://forum.qt.io/post/507301</link><guid isPermaLink="true">https://forum.qt.io/post/507301</guid><dc:creator><![CDATA[CP71]]></dc:creator><pubDate>Sat, 26 Jan 2019 09:44:43 GMT</pubDate></item><item><title><![CDATA[Reply to Inserting Widgets in layout with ForLoop cause Freeze on Sat, 26 Jan 2019 09:02:38 GMT]]></title><description><![CDATA[<p dir="auto">about 100 widgets each contains a text,Image,or some simple Widgets.</p>
]]></description><link>https://forum.qt.io/post/507299</link><guid isPermaLink="true">https://forum.qt.io/post/507299</guid><dc:creator><![CDATA[mahd96]]></dc:creator><pubDate>Sat, 26 Jan 2019 09:02:38 GMT</pubDate></item><item><title><![CDATA[Reply to Inserting Widgets in layout with ForLoop cause Freeze on Sat, 26 Jan 2019 08:58:19 GMT]]></title><description><![CDATA[<p dir="auto">We need some more information - how many widgets do you create? What do the widgets do? Some example code to reproduce the issue.</p>
]]></description><link>https://forum.qt.io/post/507297</link><guid isPermaLink="true">https://forum.qt.io/post/507297</guid><dc:creator><![CDATA[Christian Ehrlicher]]></dc:creator><pubDate>Sat, 26 Jan 2019 08:58:19 GMT</pubDate></item></channel></rss>