PDA

View Full Version : Can I emit a signal to a child process which is also created by Qt3?



mikeshi
2nd November 2007, 08:36
I want to control another Qt3 Application, I have its source, but no right to modify it. I want to control it by emit a signal ( Just like send message in Windows) to it.

Anyone knows about how to realize it?

jacek
2nd November 2007, 11:48
You can't send signals to other processes, you have to use some IPC mechanism. For example if it's a KDE application, you might try DCOP.

mikeshi
5th November 2007, 02:28
thank you, Jacek. But I have no permission to modify the other program's source code, so, in other words, it's the Mission Impossible, right?:eek:

Cheetah
5th November 2007, 09:10
I'd say so, yes.

If the application does not have an official API/interface and you don't have access to the source this is pretty much mission impossible.

~ Cheetah

wysota
5th November 2007, 10:39
If the application is a child process of the current application, you can read and write from/to its stdin/stdout and control the application in such a way. But there is basically no way of sending messages to trigger gui events or so. If you are using Windows, you can of course use the native API to send messages to the target application.

jacek
5th November 2007, 11:13
If you are really desparate, you might use LD_PRELOAD to inject some code to the application that will allow you to send fake events.