Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QProcess::setStandardOutputFile
Qt 6.11 is out! See what's new in the release blog

QProcess::setStandardOutputFile

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vince42
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • Pradeep P NP Offline
      Pradeep P NP Offline
      Pradeep P N
      wrote on last edited by
      #2

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

      Pradeep Nimbalkar.
      Upvote the answer(s) that helped you to solve the issue...
      Keep code clean.

      1 Reply Last reply
      0
      • V Offline
        V Offline
        Vince42
        wrote on last edited by
        #3

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

        BR
        Vincent

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved