Nominate our 2022 Qt Champions!


  • 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?



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

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


Log in to reply