Trigger widget signals from external program



  • I am working with a closed-source program using Qt. Due to the nature of this program, I would like to be able to some add functionality to allow me to map keys on my keyboard to trigger the clicked() signal on buttons in the program.

    What would be the best way to go about this?

    I was thinking about possibly modifying the source code for the Qt dll responsible for triggering these signals and adding the functionality for them to take input from an outside source, possibly a window message. With this method, however, I would first need to identify which buttons are which and figure out how to store that data for use by the modified code, which seems like it would be overly difficult. If this is the most efficient method, what would be the best way to approach implementing it?



  • bq. I am working with a closed-source program using Qt. Due to the nature of this program, I would like to be able to some add functionality to allow me to map keys on my keyboard to trigger the clicked() signal on buttons in the program.

    Does this mean you want to send some inputs (like mouse click, key press events) to a program which you don't know was written to accept such inputs.

    bq. What would be the best way to go about this?

    Best way is to get the source code and add hooks to accept such external inputs.

    bq. I was thinking about possibly modifying the source code for the Qt dll responsible ....

    Modifying (replacing) Qt dlls will give you a way to hack into the pushbutton signals, and this will be the next alternate as program source is not available to be modified. When modifiing the push button source you should add some mechanism to store a map of all the push buttons created by the application and then add a way to take external inputs (like native events, or messages) and relay them to the targeted push button, or just emit it's signal. It is definitely not simple but is possbile.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.