QProcess and Signal/Slot
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().
Thanks for answers
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.
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
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.
I have forget that start() is asynchronous. I have myProcess->waitforStarted() behind...
It works well, without waitforStarted() but I need to use this method.
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...