[Qt-interest] QProcess flush issue
Etienne Sandré-Chardonnal
etienne.sandre at m4x.org
Mon Oct 31 11:41:17 CET 2011
Dear Qt users,
I have a console application binary which makes computations lasting
roughly one hour. I am writing a Windows GUI that launches it with a
QProcess. My GUI takes progress info from the standard output of the
process and updates progress bars, etc...
But the QProcess updates its standard output buffer only every few minutes
and about 50 lines of output, which makes the progress bar not updating
enough. When I launch the console application in a standard windows
console, the output is updated at every line.
So the question is : why is the QProcess not able to read more frequently
from the standard output, where "cmd.exe" can? Is there anything
configurable somewhere to improve the buffer refresh frequency?
I do not have access to the console app's code.
I have already read some posts about this but nobody seems to have found
the solution so far. In most posts, people answers is suggesting that the
called console app is in cause and not flushing the data enough. But in
this case, how can windows console print the stdout more frequently? It
seems there is a similar issue under linux.
I have not searched through QProcess source yet. But it seems that QProcess
is blocking the data in some buffer until a large amount of lines or bytes
are available.
Thanks,
Etienne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20111031/45d47823/attachment.html
More information about the Qt-interest-old
mailing list