damn...thats the drawback of using QNetworkAccessManager with a plain tcp socket.
Your response also has to be a HTTP response in order to make QNetworkReply work properly.
E.g.HTTP/1.0 200 OK Date: Fri, 01 Jan 1970 23:59:59 GMT Content-Type: text/html Content-Length: 1259 <CONTENT-with-a-size-of-1259-bytes>
So the most important is the first line that says everything was ok. Which is reflected by QNetworkReply's error.
I would take this as an minimal example for an response, don't know for sure which headers are mandatory.
Note the empty line between the header and body section! And each line should end with \r\n
See RFC-2616 for more details.