PDA

View Full Version : Regarding QProcess-Readstdout



SYR
3rd March 2011, 09:13
Hi to all
I am making GUI using QT3.3. Through GUI I am invoking a process using QProcess.
I want to get the messages which are all writing to a standard output.I am able to get them by connecting readstdout signal but i could display them in GUI(in textview) only after that process is exited.Can some one help me how to display them as soon as it written to stdout.

stampede
3rd March 2011, 09:24
Probably messages are buffered, so you wont get them until the buffer is flushed.
If this external program is made by you, you can force flushing by

std::cout << "a message" << std::flush; // C++
fflush(stdout); // C/C++