Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Capture the full output of QProcess (including its child processes)
Qt 6.12 LTS is out! See what's new in the release blog

Capture the full output of QProcess (including its child processes)

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 1.3k Views
  • 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.
  • B Offline
    B Offline
    billconan
    wrote on last edited by
    #1

    Hi,

    I'm trying to implement a Qt program to run git grammatically. I do this using QProcess to trigger git.

    but I realized the output of git isn't enacted. I read the output via QProcess' readReady readAll function.

    I figured out the reason is that git execute different commands using different child processes, certain outputs are generated by those child processes.

    And QProcess doesn't seem to be able to capture the outputs of child processes.

    Taking the git clone command as an example,

    the main process git will print a message "cloning into xxx ...."
    then, the actual cloning is carried out by a process called git-https-remote under /usr/lib/git-core

    QProcess can't capture the stdout of git-https-remote

    Thanks,

    aha_1980A 1 Reply Last reply
    0
    • B Offline
      B Offline
      billconan
      wrote on last edited by
      #2

      I have figured out a workaround by requesting progress when performing git clone

      based on

      https://stackoverflow.com/questions/37669115/how-to-redirect-full-output-of-git-clone-to-a-file

      aha_1980A 1 Reply Last reply
      1
      • B billconan

        Hi,

        I'm trying to implement a Qt program to run git grammatically. I do this using QProcess to trigger git.

        but I realized the output of git isn't enacted. I read the output via QProcess' readReady readAll function.

        I figured out the reason is that git execute different commands using different child processes, certain outputs are generated by those child processes.

        And QProcess doesn't seem to be able to capture the outputs of child processes.

        Taking the git clone command as an example,

        the main process git will print a message "cloning into xxx ...."
        then, the actual cloning is carried out by a process called git-https-remote under /usr/lib/git-core

        QProcess can't capture the stdout of git-https-remote

        Thanks,

        aha_1980A Offline
        aha_1980A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • B billconan

          I have figured out a workaround by requesting progress when performing git clone

          based on

          https://stackoverflow.com/questions/37669115/how-to-redirect-full-output-of-git-clone-to-a-file

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @billconan Then please mark this thread as solved.

          Thanks and Merry Christmas.

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