[Qt-interest] About QProcess :How to read stdoutput realtime?
Andreas Pakulat
apaku at gmx.de
Tue May 5 11:56:40 CEST 2009
On 05.05.09 14:43:00, Princy K. V. wrote:
> Hi,
>
> Thanks for ur reply.
>
> But slot is not invoked when I used these signals
> readyReadStandardError () & readyReadStandardOutput (
Then either your connect call is wrong, or the process you're starting
doesn't flush its buffers properly.
> ..so I used following code snippets, this consumes lot of
> time..sometimes not getting desired output..
With that code you won't ever get the output as soon as the process
produces it because you're waiting for the process to finish its execution
before anything happens. waitForFinish is a blocking method.
The only way to achieve what you want is using the readyRead signals and
making sure the process you start properly flushes its buffers.
Andreas
--
You are dishonest, but never to the point of hurting a friend.
More information about the Qt-interest-old
mailing list