You are correct... The first line was in the "in" buffer.... while i was only printing the "response".

This seems to work fine...

Thanks for the pointer.

Qt Code:
  1. void Rsh::receiveMessage() {
  2.  
  3. QString responseLine;
  4. QString response;
  5.  
  6. QTextStream in(tcpSocket);
  7.  
  8. if( !tcpSocket->canReadLine() )
  9. {
  10. return;
  11. }
  12.  
  13. while( tcpSocket->canReadLine() ){
  14. responseLine = in.readAll();
  15. response.append(responseLine);
  16. }
  17. ui.ResultsTextEdit->append(response);
  18. }
To copy to clipboard, switch view to plain text mode