[Interest] Qt Events/Signals and Loops (while ... for..)

Thiago Macieira thiago.macieira at intel.com
Wed Aug 29 16:44:48 CEST 2012


On quarta-feira, 29 de agosto de 2012 16.19.46, Abhishek wrote:
> Hello all,
> I have a program in which on main thread I have TCP server to receive
> messages and process on it.
>  - on one specific message TCP server start one while infinite loop
>  - to stop this loop I have another TCP message
> 
> but while in loop I see that I am not able to receive any TCP signals.
> 
> I tried adding QCoreApplication::processEvents()  in my loop but nothing
> work.
> 
> Please let me know the proper way to handle such situation.

Add this:
	return;

Let your application return to the main event loop.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120829/9e84532e/attachment.sig>


More information about the Interest mailing list