do you mean return statement after my loop ? like while(x==true){..} return;<div><br><div>but I have while(x == true) { ... } which I want to stop when I receive stop message from my client.</div><div>  <br><br><div class="gmail_quote">
On Wed, Aug 29, 2012 at 4:44 PM, Thiago Macieira <span dir="ltr"><<a href="mailto:thiago.macieira@intel.com" target="_blank">thiago.macieira@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On quarta-feira, 29 de agosto de 2012 16.19.46, Abhishek wrote:<br>
> Hello all,<br>
> I have a program in which on main thread I have TCP server to receive<br>
> messages and process on it.<br>
>  - on one specific message TCP server start one while infinite loop<br>
>  - to stop this loop I have another TCP message<br>
><br>
> but while in loop I see that I am not able to receive any TCP signals.<br>
><br>
> I tried adding QCoreApplication::processEvents()  in my loop but nothing<br>
> work.<br>
><br>
> Please let me know the proper way to handle such situation.<br>
<br>
</div>Add this:<br>
        return;<br>
<br>
Let your application return to the main event loop.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Thiago Macieira - thiago.macieira (AT) <a href="http://intel.com" target="_blank">intel.com</a><br>
  Software Architect - Intel Open Source Technology Center<br>
     Intel Sweden AB - Registration Number: 556189-6027<br>
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden<br>
</font></span><br>_______________________________________________<br>
Interest mailing list<br>
<a href="mailto:Interest@qt-project.org">Interest@qt-project.org</a><br>
<a href="http://lists.qt-project.org/mailman/listinfo/interest" target="_blank">http://lists.qt-project.org/mailman/listinfo/interest</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Abhishek<br><a href="http://thezeroth.net" target="_blank">http://thezeroth.net</a><br><br><br>
</div></div>