View Full Version : redirection of standard input and output

15th October 2006, 21:16
Two scenarios here.

1. if I write a standard console type program this program starts another program which would normally send it's output to the standard output - how can i get this spawned program to redirect it's output back to my program?

2. Scenario 2 - pretty much the same as aboove, but my program will be a QT GUI program which will start up some standard linux programs like ls, and grep but I want the standard output and stanadrd error outputs of these programs to come back to my GUI program for processing.

15th October 2006, 21:30
Use QProcess::readStdout() et al.

15th October 2006, 21:30
QProcess provides all required functionality.