PDA

View Full Version : How to control client application while running



mania
19th November 2012, 14:04
Hi,

QProcess->start(/root/binaryfilename,QProcess::ReadWrite);
QProcess->waitForStarted(10000);

In the above QProcess i am running the client binary file , then how to control the running binary for hide or show

anda_skoa
19th November 2012, 15:42
That mostly depends on what kind of remote control the other program offers.

If it is your own program you could communicate with it through the data channels provided by QProcess. If it registers some objects on D-Bus, you can use QtDBus to call those objects' methods.

If it does not provide any remote command interface at all you'll probably have to use some low-level window system API.

Cheers,
_

mania
20th November 2012, 07:57
Hi,

We not register any D-Bus so we cannot use QtDBus and also not have remote command interface , last option is low-level window system API what do you mean by that and how to implement. Please provide some examples.



Thanks in advance

anda_skoa
20th November 2012, 11:18
We not register any D-Bus so we cannot use QtDBus and also not have remote command interface

And it is a third party executable that you cannot change?


last option is low-level window system API what do you mean by that and how to implement.

Assuming you are on Unix/X11 that would be xlib or XCB. You'll need a way to find the window associated with the process and then request operations on that window.


Please provide some examples.

You can probably find relevant code in X11 window managers or workspace implementations. Some of them have facilities that allow users to kill the process of a non-responding window, thus needing the capability to find the process that create said window.

Cheers,
_

mania
20th November 2012, 14:05
Hi,
I am using Embedded Linux , in that how to process the low level window system API