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. [SOLVED] How to get data from another process (QProcess)?
Qt 6.11 is out! See what's new in the release blog

[SOLVED] How to get data from another process (QProcess)?

Scheduled Pinned Locked Moved General and Desktop
qprocess
4 Posts 2 Posters 2.3k Views 2 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.
  • N Offline
    N Offline
    never_ever
    wrote on last edited by never_ever
    #1

    Hi,
    I have two apps.

    • One of them is console application (I only use it and I can modify it, but it must be console app). There is two windows: one with console and the other with image from camera. In console window some data is showed.
    • The other is my app created with Qt.

    When I start console app using QProcess I get only window with camera image so I can't see what is happening in console window.
    How can I get data from that app? I'm able to modify that app but it must be console app.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      QProcess:: readyReadStandardOutput will tell you when there's something to read from the standard output. You can then use readAllStandardOutput to get the data.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      N 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        QProcess:: readyReadStandardOutput will tell you when there's something to read from the standard output. You can then use readAllStandardOutput to get the data.

        Hope it helps

        N Offline
        N Offline
        never_ever
        wrote on last edited by
        #3

        @SGaist Thanks, I overlooked this signal. It works fine.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          You're welcome !

          Since you have it working now, please update the thread title prepending [solved] so other forum users may know a solution has been found :)

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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