From: Björn Schäpers <qt-maill...@hazardy.de>
Sent: Monday, March 6, 2023 12:18 PM
To: Scott Bloom <sc...@towel42.com>; interest@qt-project.org
Subject: Re: [Interest] QProcess unbuffered

Am 06.03.2023 um 02:11 schrieb Scott Bloom:
I have an external executable (mkvalidator from 
https://www.matroska.org/downloads/mkvalidator.html

It never flushes the output, and it uses linefeed without carriage returns to 
overwrite existing text on the output.

The problem is, when I run it via QProcess (on windows, Qt 5.15.10), I get zero 
output until the process ends.  As if it was buffered, and the output was 
finally flushed

When running from the command line, I do get output continuously during the 
processing.

I setup a timer to waitForRead, didn’t do anything. I cant seem to force the 
QProcess to read all stdout or stderror info.

Any thoughts?

TIA
Scott



_______________________________________________

Interest mailing list

Interest@qt-project.org<mailto:Interest@qt-project.org>

https://lists.qt-project.org/listinfo/interest
Hi,

I had the exact same problem (but without QProcess). You have to use a trick to 
disable the buffering, I don't know if its possible with QProcess, you will 
have to use QProcess::CreateProcessArgumentModifier or most likely 
CreateProcess directly.

If there is interest I can copy some of my data, but currently I can't access 
it.

Kind regards,
Björn.
I would love any info/data you can provide.  Feel free to email me privately if 
you want.

Thanks
Scott
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to