Results 1 to 6 of 6

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

  1. #1

    Question Can I emit a signal to a child process which is also created by Qt3?

    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?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Can I emit a signal to a child process which is also created by Qt3?

    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.

  3. #3

    Default Re: Can I emit a signal to a child process which is also created by Qt3?

    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?

  4. #4
    Join Date
    Nov 2007
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Can I emit a signal to a child process which is also created by Qt3?

    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

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Can I emit a signal to a child process which is also created by Qt3?

    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.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Can I emit a signal to a child process which is also created by Qt3?

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.