How to get STDOUT from a QProcess ?

How to get STDOUT from a QProcess ?

Asked on January 8, 2019 in Qt.
Add Comment


  • 2 Answer(s)

    Get STDOUT from a QProcess:

    process.setProcessChannelMode(QProcess::MergedChannels);
    
    

    print by everything and   STDERR output to STDOUT output.

    Answered on January 8, 2019.
    Add Comment

    The given statement is:

    • In the process of QProcess::MergedChannels: QProcess  absorb the output of the running process into the standard output channel stdout. The standard error channel  stderr will not accept  any data.[…]

    Although here,

    • The QProcess::ForwardedChannels: QProcess   the output of the running process onto the main process and the child will writes the standard output and standard error  of the main process.
    Answered on January 8, 2019.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.