Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    [solved] QProcess interaction

    General and Desktop
    2
    3
    2686
    Loading More Posts
    • 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.
    • A
      ahsub last edited by

      is there a way to have the output of a process pushed to the interface in real time.
      for example: if i run a ping 127.0.0.1 in a process, the interface should show immediately "pinging ..."
      then the first ping, the second ping ...

      the usual way is to wait till the process completes, then use readall to capture the output and print it to the interface.
      but, this way the user has to wait till the process completes and only then will be able to see all the output.

      instead if he/she can see it real time, it will be very efficient. is that possible?

      1 Reply Last reply Reply Quote 0
      • G
        giesbert last edited by

        If you look at the API of QProcess, it should be possible. Look at "QProcess::readyReadStandardOutput":http://doc.qt.nokia.com/4.7/qprocess.html#readyReadStandardOutput

        Nokia Certified Qt Specialist.
        Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

        1 Reply Last reply Reply Quote 0
        • A
          ahsub last edited by

          thank you for the reply. am now reading the same :)

          1 Reply Last reply Reply Quote 0
          • First post
            Last post