Results 1 to 13 of 13

Thread: how to create its own tray(system tray) in QT application

  1. #1
    Join Date
    Jul 2013
    Posts
    25
    Qt products
    Qt5
    Platforms
    Windows

    Default how to create its own tray(system tray) in QT application

    I would like to create a tray in qt, like system tray.
    In my application there are several link to other applications like MS Word, Excel,IE etc.
    If the user tries to minimize the particular application it should come to the newly created QT system tray.
    What I mean is I have to create a new tray for my application, like system tray.
    Can you suggest any method or code.
    All your suggestions are appreciable.
    Thanks in advance.

  2. #2
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to create its own tray(system tray) in QT application

    "Behind every great fortune lies a crime" - Balzac

  3. #3
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: how to create its own tray(system tray) in QT application

    In my application there are several link to other applications like MS Word, Excel,IE etc.
    Do you mean these applications run inside you Qt application

    Or

    Do you mean that these application are running on OS and you want to show the minimized stats in you Qt application?
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

  4. #4
    Join Date
    Jul 2013
    Posts
    25
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: how to create its own tray(system tray) in QT application

    Thank you Mr.Santhosh Reddy.
    Actually I want to run those applications in to my QT application.
    When the user tries to minimize those application(MS word, Excel etc.),its icon should be displayed on a frame in the QT application instead of the system tray of OS. Can you suggest any method to do this.
    Last edited by Soumya Somasekhar Ram; 29th August 2013 at 10:46.

  5. #5
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: how to create its own tray(system tray) in QT application

    Actually I want to run those applications in to my QT application. Can you suggest any method to do this.
    Are yo sure about it?
    Let me ask again.
    Do you want to run those applications inside your Qt application?
    or
    Do you want to start those applications from Qt application?
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

  6. #6
    Join Date
    Jul 2013
    Posts
    25
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: how to create its own tray(system tray) in QT application

    Actually I want the control of that application.Those applications can start from Qt application.But when we minimize those application ,it's icon should display on a frame in the QT application Instead of going to the system tray of OS.When the user click it again, then it should be opened and can be used.
    Can u suggest any method? Please help me.
    Last edited by Soumya Somasekhar Ram; 29th August 2013 at 11:01.

  7. #7
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: how to create its own tray(system tray) in QT application

    I am afraid Qt does not have anything which will enable to do this directly. Qt can help to show the tray, icons and other menu operations but, you will have to use windows native APIs to have control the application (like minimize/maximize) and also get native events when applications are minimized/maximized.

    I hope you not looking at cross platfrom system tray
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

  8. #8
    Join Date
    Jul 2013
    Posts
    25
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: how to create its own tray(system tray) in QT application

    Ok. Then, can i get the minimized window from the task bar of the OS? I need the code for getting the minimised window when the user clicks a particular button.
    Can u help me?
    Thanks for your valuable reply.

  9. #9
    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 create its own tray(system tray) in QT application

    Quote Originally Posted by Soumya Somasekhar Ram View Post
    Ok. Then, can i get the minimized window from the task bar of the OS? I need the code for getting the minimised window when the user clicks a particular button.
    Can u help me?
    Thanks for your valuable reply.
    How about you tell us what you are trying to get implemented?
    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. #10
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: how to create its own tray(system tray) in QT application

    Ok. Then, can i get the minimized window from the task bar of the OS? I need the code for getting the minimised window when the user clicks a particular button.
    Can u help me?
    Like I said earlier Qt does not have anything directly to help you in this case.

    Take a look at this article which will help you do this using .NET Windows Hooks in the .NET Framework. It also gives an examples towards the end.
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

  11. #11
    Join Date
    Jul 2013
    Posts
    25
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: how to create its own tray(system tray) in QT application

    Can I open the minimized window using Qt?
    There are several links in my QT application,like word,excel etc.
    Can I check whether they are minimized or not?
    When the user clicks a particular button, the minimized window should be opened.
    How can we recognize that the particular application is minimized or closed?
    can u help my to do this?
    Thanks for your replies...

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

    Default Re: how to create its own tray(system tray) in QT application

    I am pretty sure Windows has API for that. Check in MSDN.

    Cheers,
    _

  13. #13
    Join Date
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Thanks
    10
    Thanked 13 Times in 12 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: how to create its own tray(system tray) in QT application


Similar Threads

  1. QT System Tray menus
    By jeyanthinatarajan in forum Newbie
    Replies: 0
    Last Post: 7th May 2012, 07:40
  2. Minimize to system tray
    By aLiNuSh in forum Newbie
    Replies: 17
    Last Post: 4th March 2010, 12:51
  3. How to keep System tray icons
    By mkkguru in forum Qt Programming
    Replies: 10
    Last Post: 24th February 2010, 16:19
  4. Minimize to system tray
    By krivenok in forum Qt Programming
    Replies: 5
    Last Post: 13th January 2009, 04:34
  5. system tray problem
    By vvdounai in forum Qt Programming
    Replies: 5
    Last Post: 14th November 2007, 08:25

Tags for this Thread

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.