Hi,
First of all, are you sure that you need threads for this?
If you comment "waitForReadyRead()" is normal that you get "num == 0" because you are not waiting to get data into the socket, you only ask how many data is into the buffer and the buffer is not filled until some data arrives. You are expecting to have data into the buffer, but the application that have to write data still not wrote it.
Bookmarks