Hi,
I am rewriting my application from Borland to Qt. It calls an exe and pipes the output to the app. Originally I used CreateProcess, PeekNamedPipe etc. but these are native to windows and not multiplatform. I want to use QProcess and do not get very far. My simple code:
Qt Code:
  1. calcProcess = new QProcess(this);
  2. connect(calcProcess, SIGNAL(readyReadStandardOutput()), this, SLOT(readFromStdout()) );
To copy to clipboard, switch view to plain text mode 
and in readFromStdout():
Qt Code:
  1. QString output;
  2. output = calcProcess->readAllStandardOutput();
  3. outputedit->appendPlainText(output); //outputedit is a PlainTextEdit
To copy to clipboard, switch view to plain text mode 

This seems to fill an output buffer (4096 bytes?) and the output is appended when the output buffer is full. I would then have to parse the output breaking it into strings with split or something.
I have read that the signal is triggered each time the external exe produces something, and I want to read this output each time (per line). I have looked at many pieces of code in the forum but can't find how to do this. Thanks.