Results 1 to 2 of 2

Thread: Read most recent output from QProcess's stdout

  1. #1
    Join Date
    Dec 2008
    Location
    Qt Reference Documentation
    Posts
    62
    Thanks
    25
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Read most recent output from QProcess's stdout

    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?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Read most recent output from QProcess's stdout

    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.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    Lawand (8th September 2010)

Similar Threads

  1. why can't QProcess read all output?
    By Raul in forum Qt Programming
    Replies: 32
    Last Post: 15th June 2013, 12:17
  2. Help on QProcess - Output Read
    By augusbas in forum Qt Programming
    Replies: 5
    Last Post: 24th September 2009, 11:54
  3. read stdout with QProcess under Windows
    By jlbrd in forum Qt Programming
    Replies: 4
    Last Post: 1st September 2006, 17:29
  4. QProcess problem in accessing stdout
    By aruna in forum Qt Programming
    Replies: 1
    Last Post: 19th April 2006, 17:56
  5. Cannot get stdout from QProcess
    By johnny_sparx in forum Qt Programming
    Replies: 11
    Last Post: 3rd March 2006, 11:46

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.