Results 1 to 2 of 2

Thread: Regarding QProcess-Readstdout

  1. #1
    Join Date
    Mar 2011
    Posts
    4
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Question Regarding QProcess-Readstdout

    Hi to all
    I am making GUI using QT3.3. Through GUI I am invoking a process using QProcess.
    I want to get the messages which are all writing to a standard output.I am able to get them by connecting readstdout signal but i could display them in GUI(in textview) only after that process is exited.Can some one help me how to display them as soon as it written to stdout.

  2. #2
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Regarding QProcess-Readstdout

    Probably messages are buffered, so you wont get them until the buffer is flushed.
    If this external program is made by you, you can force flushing by
    Qt Code:
    1. std::cout << "a message" << std::flush; // C++
    2. fflush(stdout); // C/C++
    To copy to clipboard, switch view to plain text mode 

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

    SYR (3rd March 2011)

Similar Threads

  1. Replies: 0
    Last Post: 26th August 2010, 10:44
  2. QProcess inside QProcess
    By bunjee in forum Qt Programming
    Replies: 7
    Last Post: 4th December 2008, 00:39
  3. QProcess readStdOut index
    By user_mail07 in forum Qt Programming
    Replies: 1
    Last Post: 27th February 2008, 19:37
  4. readStdout ( plz help needed urgently)
    By shrikarcse in forum Newbie
    Replies: 1
    Last Post: 3rd April 2006, 13:04
  5. speed up qprocess readstdout
    By kooshball in forum Qt Programming
    Replies: 1
    Last Post: 31st January 2006, 09:42

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.