<?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 break while loop using some conditional check?]]></title><description><![CDATA[<p dir="auto">Hi<br />
I am using SQLite database to fetch the data in Qt and then I am printing that data simultaneosly.<br />
Kindly go through the process</p>
<p dir="auto">(e.g.</p>
<pre><code>   while(studentList.next())
                 {  studentList("SELECT Name, address FROM class  WHERE Roll No = some variable;
                  Name=studentList.value(0).toString();   
                  address=studentList.value(1).toString();   


 //********   simultaneously I am printing this data (in a string) through GPIO pins by setting them HIGH accordingly.....    ******  //
                                  

{


      ------  PRINTING MODULE ------

 }
                 }  
</code></pre>
<p dir="auto">During printing, GUI goes in a hang state .....<br />
Now I want to break this printing in between as per my wish!<br />
Any way to do it!</p>
]]></description><link>https://forum.qt.io/topic/92674/how-to-break-while-loop-using-some-conditional-check</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Jul 2026 09:15:34 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/92674.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 16 Jul 2018 06:40:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to how to break while loop using some conditional check? on Mon, 23 Jul 2018 06:39:11 GMT]]></title><description><![CDATA[<p dir="auto">Your loop blocks the event loop so it can't process anything.</p>
]]></description><link>https://forum.qt.io/post/471402</link><guid isPermaLink="true">https://forum.qt.io/post/471402</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Mon, 23 Jul 2018 06:39:11 GMT</pubDate></item><item><title><![CDATA[Reply to how to break while loop using some conditional check? on Mon, 16 Jul 2018 09:55:34 GMT]]></title><description><![CDATA[<p dir="auto">See "Staying Responsive During Intensive Processing" page 171 (189 of the pdf) of <a href="http://www-cs.ccny.cuny.edu/~wolberg/cs221/qt/books/C++-GUI-Programming-with-Qt-4-1st-ed.pdf" target="_blank" rel="noopener noreferrer nofollow ugc">C++ GUI Programming with Qt 4</a></p>
]]></description><link>https://forum.qt.io/post/469741</link><guid isPermaLink="true">https://forum.qt.io/post/469741</guid><dc:creator><![CDATA[VRonin]]></dc:creator><pubDate>Mon, 16 Jul 2018 09:55:34 GMT</pubDate></item><item><title><![CDATA[Reply to how to break while loop using some conditional check? on Mon, 16 Jul 2018 09:32:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> Right now I m in the learning stage of threading..so  a bit difficult for me to apply it directly<br />
Could u plz quote an example which can be referred?</p>
]]></description><link>https://forum.qt.io/post/469737</link><guid isPermaLink="true">https://forum.qt.io/post/469737</guid><dc:creator><![CDATA[SHUBHAM SINGH RAO]]></dc:creator><pubDate>Mon, 16 Jul 2018 09:32:29 GMT</pubDate></item><item><title><![CDATA[Reply to how to break while loop using some conditional check? on Mon, 16 Jul 2018 07:38:31 GMT]]></title><description><![CDATA[<p dir="auto">If the time the printing module takes is rather short, it may already be enough to break the loop and put the loops body in a QTimers slot that you call regularly in short intervalls.</p>
<p dir="auto">So in the time between the timers slots Qt has time to execute it's event loop.</p>
]]></description><link>https://forum.qt.io/post/469715</link><guid isPermaLink="true">https://forum.qt.io/post/469715</guid><dc:creator><![CDATA[aha_1980]]></dc:creator><pubDate>Mon, 16 Jul 2018 07:38:31 GMT</pubDate></item><item><title><![CDATA[Reply to how to break while loop using some conditional check? on Mon, 16 Jul 2018 07:19:32 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Depending on how you do that printing and more specifically the time it takes, you should rather offload the work to a secondary thread.</p>
]]></description><link>https://forum.qt.io/post/469710</link><guid isPermaLink="true">https://forum.qt.io/post/469710</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Mon, 16 Jul 2018 07:19:32 GMT</pubDate></item></channel></rss>