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 and Signal/Slot
Qt 6.11 is out! See what's new in the release blog

QProcess and Signal/Slot

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 2.5k 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.
  • B Offline
    B Offline
    Beberd
    wrote on last edited by
    #1

    Hi,

    I have make an IPC with DBus between two applications.
    The main app start the second application.
    I need to receive signal from the second app and do something with my slot in the main app.
    The problem is :
    I can't receive signal because I use @QProcess::start()@ and not @QProcess::startDetached()@ and I need to use start().

    Any idea?
    Thanks for answers

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

      Hi,

      What do you mean by "receive a signal from the second app" ?

      Since you're using DBus all communication between your two applications should go through it.

      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
      • B Offline
        B Offline
        Beberd
        wrote on last edited by
        #3

        Yes, I receive communications between my applications but i use QProcess::start() and the main app is waiting the end of the application. So the signal is not processed

        1 Reply Last reply
        0
        • B Offline
          B Offline
          bodzio131
          wrote on last edited by
          #4

          I don't understand something here. QProcess::start() seems to be asynchronous (non-blocking), so your program shouldn't be blocked and event loop should work well. There shouldn't be problem with processing signals, unless you messed something with DBus implementation.

          1 Reply Last reply
          0
          • B Offline
            B Offline
            Beberd
            wrote on last edited by
            #5

            I have forget that start() is asynchronous. I have myProcess->waitforStarted() behind...
            It works well, without waitforStarted() but I need to use this method.

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

              There's something that's not clear at all here:

              • You say that you use DBus for the communication between your tow applications
              • You say that you want a signal from an app that runs in a QProcess
              • Now you need to use waitForStarted

              So please: explain why do you need to wait on your second application, what kind of signal should come out, why do you expect a signal from QProcess, etc...

              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