yeah thats what i need.. so i will add exec() then?
exec() is only required if you want to start an event loop on a thread. If you used QTcpSocket in conjunction with readyRead signal then you would need an event loop. But if you use Linux sockets, and I assume you do NOT use select/poll, just read/write, then you use them in a blocking fashion and your code should be similar to this example http://doc.trolltech.com/4.4/network...uneclient.html Even if sockets are used there in a blocking way, GUI thread does not block because blocking read/write calls occur on a separate thread.

And as caduel pointed out, there is a way to achieve non-blocking behavior without creating extra threads, but it seems that it is not an option for you because you are just integrating existing code and do not want to do many changes to it.