[Qt-interest] Does QProcess::readAllStandardOutput have a limit?

Eric Clark eclark at ara.com
Thu Dec 2 21:13:24 CET 2010


> -----Original Message-----
> From: qt-interest-bounces at trolltech.com [mailto:qt-interest-
> bounces at trolltech.com] On Behalf Of Christian Gagneraud
> Sent: Thursday, December 02, 2010 1:42 PM
> To: qt-interest at trolltech.com
> Subject: Re: [Qt-interest] Does QProcess::readAllStandardOutput have a
> limit?
> 
> On 12/02/2010 07:16 PM, Eric Clark wrote:
> > What do you mean by soon? I am not receiving any more calls to my slot
> > connected to the readyReadStandardOutput signal. The process that is
> > running outputs a bunch of startup text and then goes into an infinite
> > loop waiting to receive commands. I have waited a while
> > (minutes) after the process was started and I do not receive any more
> > signals that the standard output is ready to be read.
> 
> Have you tried the QIODevice::Unbuffered flag when you
> setStandardOutputFile() in your sub-process?

I do not usually use the setStandardOutputFile function because I would prefer to read the output myself and output it to a text editor in the parent process. However, I did just try to pass Unbuffered in as the open mode flag to QProcess::start when I start the sub-process, but this yielded no output except an error message "QIODevice: write only device".

> It is possible that the output buffer is flushed/drained only when it reach a
> certain water mark level, in that case one solution is to use unbuffered
> output (with potential penalty on the performance), or flush/drain your
> output yourself.

I am not real sure I understand what you mean by flush or drain the output myself. Any chance you could elaborate on this a little more?

> 
> Chris
> 
> --
> Christian Gagneraud,
> Electronics and software engineer
> 
> TechWorks Marine Ltd
> 4a, Park Lane
> Dun Laoghaire, Co Dublin
> Ireland
> 
> Tel: + 353 1 2365990
> Fax: + 353 1 2365992
> Web: www.techworks.ie
> 
> 
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest




More information about the Qt-interest-old mailing list