QProcess::setStandardOutputFile



  • Hi,

    I am using QProcess to start an external program and collect the output on the standard output.

    At a later stage I want to store the output of this program into a file and call setStandardOutputFile() for this purpose.

    But then I would like again to read the standard output of the process. How can I cancel the call to setStandardOutputFile() and suppress the redirection of the standard output into the file?

    BR,

    Vincent



  • Try calling setStandardOutputFile(stdout, ...)
    It may work i have not tried though.



  • Hi,
    the solution was to call setStandardOutputFile(""); to remove the stdout redirection.

    BR
    Vincent


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.