PDA

View Full Version : Read most recent output from QProcess's stdout



Lawand
8th September 2010, 20:23
Hello

I have an instance of QProcess and I am reading data lines from it's stdout.

The problem is that I want to read the most recent line written to stdout but when I call readLine() I get an old line (which is the first line added to the buffer)

How do I read the latest line written to QProcess's stdout?

wysota
8th September 2010, 22:29
You won't get recent output unless you read the old one first. It's a stream of bytes and you can't jump back and forth in it.