[Interest] QProcess unbuffered

Bob Babcock wssddc at wssddc.com
Mon Mar 6 05:32:20 CET 2023


Scott Bloom <scott at towel42.com> wrote in
news:BYAPR10MB309616B1C72EF13816384DA6A9B69__18000.3636678279$1678065097$
gmane$org at BYAPR10MB3096.namprd10.prod.outlook.com: 

> --_000_BYAPR10MB309616B1C72EF13816384DA6A9B69BYAPR10MB3096namp_
> 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 

I haven't tested this, but what happens if you use QProcess to run
   cmd /c mkvalidator ...
I suggest this because mkvalidator output isn't buffered when run in a .bat 
file. You might lose return codes doing it this way.



More information about the Interest mailing list