Results 1 to 2 of 2

Thread: Output of QProcess - Git

  1. #1
    Join Date
    Jan 2016
    Posts
    54
    Thanks
    7
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Output of QProcess - Git

    Hiii Forum

    I have to read the output of QProcess with :
    Qt Code:
    1. readAllStandardOutput();
    To copy to clipboard, switch view to plain text mode 

    My code :
    Qt Code:
    1. if (!process.waitForStarted()) {
    2. qDebug() << "Error : " << process.errorString();
    3. return false;
    4. }
    5.  
    6. if(process.waitForFinished(-1))
    7. {
    8. qDebug() << ">>> "+process.readAllStandardOutput();
    9. }
    To copy to clipboard, switch view to plain text mode 

    The problem is : I can not read all the output

    OUTPUT with Qt : Updating 14a89b0..e16c540

    OUTPUT with the console :

    Why readAllStandardOutput() can not read the rest of the output !

    Regards;
    Last edited by Binary01; 20th March 2017 at 17:01.

  2. #2
    Join Date
    Dec 2009
    Location
    New Orleans, Louisiana
    Posts
    791
    Thanks
    13
    Thanked 153 Times in 150 Posts
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: Output of QProcess - Git

    Is the text you are not albe to read written to stdout or stderr? My guess is the output you do get is written to stdout and the part that's missing is written to stderr... You can merge the channels and read all at once or you can read them separately.
    Last edited by jefftee; 20th March 2017 at 13:04.
    I write the best type of code possible, code that I want to write, not code that someone tells me to write!

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

    Binary01 (20th March 2017)

Similar Threads

  1. How to Plot from QProcess output
    By suhairkp in forum Newbie
    Replies: 0
    Last Post: 31st January 2017, 14:12
  2. QProcess Standard Output
    By Decessus in forum Qt Programming
    Replies: 4
    Last Post: 15th August 2012, 17:10
  3. Timing in QProcess output
    By homerun4711 in forum Newbie
    Replies: 0
    Last Post: 20th December 2010, 18:37
  4. Can't get QProcess output
    By croscato in forum Qt Programming
    Replies: 6
    Last Post: 18th November 2010, 15:56
  5. Help on QProcess - Output Read
    By augusbas in forum Qt Programming
    Replies: 5
    Last Post: 24th September 2009, 11:54

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.