Results 1 to 5 of 5

Thread: How to control client application while running

  1. #1
    Join Date
    Nov 2012
    Location
    Coimbatore
    Posts
    53
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11
    Thanks
    1
    Thanked 3 Times in 3 Posts

    Default How to control client application while running

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: How to control client application while running

    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,
    _

  3. #3
    Join Date
    Nov 2012
    Location
    Coimbatore
    Posts
    53
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11
    Thanks
    1
    Thanked 3 Times in 3 Posts

    Default Re: How to control client application while running

    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

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: How to control client application while running

    Quote Originally Posted by mania View Post
    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?

    Quote Originally Posted by mania View Post
    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.

    Quote Originally Posted by mania View Post
    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,
    _

  5. #5
    Join Date
    Nov 2012
    Location
    Coimbatore
    Posts
    53
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11
    Thanks
    1
    Thanked 3 Times in 3 Posts

    Default Re: How to control client application while running

    Hi,
    I am using Embedded Linux , in that how to process the low level window system API

Similar Threads

  1. Replies: 4
    Last Post: 19th November 2012, 15:35
  2. Client/server application
    By sali555 in forum Qt Programming
    Replies: 5
    Last Post: 22nd April 2011, 10:55
  3. How to control an external application?
    By lixo1 in forum Qt Programming
    Replies: 4
    Last Post: 25th September 2009, 22:29
  4. TCP Client-Server Application
    By Tavit in forum Qt Programming
    Replies: 1
    Last Post: 18th March 2008, 14:20

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
  •  
Qt is a trademark of The Qt Company.