Results 1 to 8 of 8

Thread: how to get the status of an application called from another app.

  1. #1
    Join Date
    Mar 2010
    Location
    Ahmedabad, Gujarat
    Posts
    35
    Thanks
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default how to get the status of an application called from another app.

    hi all,

    i'm working on a simple gui design project.
    in this i have made main project which shows 9 app icon in grid view like in mobile.

    now when i click the miidle icon , i'm calling an application like eBook reader using QProcess, by giving the path of ebook reader to QProcess object.
    with this object i can get the information that the ebook reader is running or not.

    but my main target is to design a taskbar button to make ebook reader minimise and maximize (like in windows or linux).
    so how can i get the information that ebookreader is minimized or maximized.

    note:- i'm calling seperate executable file of ebook reader.
    i'm using Qt Creator 1.3.1 based on Qt 4.6.2 in linux operating system.

    thanks.
    Jigar Thacker
    Last edited by jthacker; 17th March 2010 at 09:32.

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to get the status of an application called from another app.

    I dont think there is a cross platform solution to this. You will need either handle or id of the ebook reader app, and then send event to the OS to minimize / maximize that window.

    And if ebook reader is a qt dialog or window, then probably you have its object. Then in this case you can use the object to maximize or minimize the ebook reader.

  3. The following user says thank you to aamer4yu for this useful post:

    jthacker (17th March 2010)

  4. #3
    Join Date
    Mar 2010
    Location
    Ahmedabad, Gujarat
    Posts
    35
    Thanks
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: how to get the status of an application called from another app.

    Thanx for your reply "aamer4yu"

    i made a mistake that i'm using unix but it's linux.

    and ebook reader is not qt dialog or window but its a seperate qt application and i want to use that for raeding books in my project.

    you told that i'll need id of the ebookreader process and hve to send event to OS for minimize/maximize but i don't know how to send events to OS for min./max.

    does Qt have any class which can help me in this.

    or

    can you help me in this....?

  5. #4
    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: how to get the status of an application called from another app.

    Qt has no classes that influence other applications directly. I think the easiest way to do what you want is to rebuild this other application with dbus or shared memory facilities that will inform its environment that the state of the application has just changed. You will have to code both sides of this mechanism though. An alternative is to use XEmbed to embed the window of the ebook reader into your application (then you will know when it is minimized or maximized) or to hook into X11 event system and intercept appropriate messages sent by the window manager to the application in question.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. The following user says thank you to wysota for this useful post:

    jthacker (17th March 2010)

  7. #5
    Join Date
    Mar 2010
    Location
    Ahmedabad, Gujarat
    Posts
    35
    Thanks
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: how to get the status of an application called from another app.

    can you help to learn to send events to OS.
    as "aamer4yu" told.

  8. #6
    Join Date
    Mar 2010
    Location
    Ahmedabad, Gujarat
    Posts
    35
    Thanks
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default how to get the status of an application called from another app.

    can anybody help?

  9. #7
    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: how to get the status of an application called from another app.

    Search the Web for X11+events.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  10. #8
    Join Date
    Mar 2010
    Location
    Ahmedabad, Gujarat
    Posts
    35
    Thanks
    5
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: how to get the status of an application called from another app.

    hey wysota ,
    i've dropped the idea of sending events to the OS but i liked to continue with shared memory.
    i think it will be better, isn't it?

    thanks.!

Similar Threads

  1. Status Bar Empty
    By waynew in forum Newbie
    Replies: 5
    Last Post: 22nd November 2009, 13:01
  2. Status Bar
    By waynew in forum Newbie
    Replies: 3
    Last Post: 21st November 2009, 09:07
  3. Why Qt is called Qt?
    By nifei in forum Qt Programming
    Replies: 1
    Last Post: 10th October 2009, 07:40
  4. Status Bar in a SUB WINDOW.
    By Cutey in forum Qt Programming
    Replies: 3
    Last Post: 23rd July 2008, 07:42
  5. need help with the status bar
    By filmfreak in forum Qt Programming
    Replies: 2
    Last Post: 15th February 2006, 08:34

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.