PDA

View Full Version : how to create its own tray(system tray) in QT application



Soumya Somasekhar Ram
29th August 2013, 05:00
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.

wagmare
29th August 2013, 05:20
http://harmattan-dev.nokia.com/docs/platform-api-reference/xml/daily-docs/libqt4/desktop-systray.html
check this example ..

Santosh Reddy
29th August 2013, 07:39
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 :confused:

Or

Do you mean that these application are running on OS and you want to show the minimized stats in you Qt application?

Soumya Somasekhar Ram
29th August 2013, 10:06
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.

Santosh Reddy
29th August 2013, 10:13
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?

Soumya Somasekhar Ram
29th August 2013, 10:50
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.

Santosh Reddy
29th August 2013, 11:39
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 :eek:

Soumya Somasekhar Ram
30th August 2013, 05:34
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.

wysota
30th August 2013, 06:47
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?

Santosh Reddy
30th August 2013, 07:54
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 (http://msdn.microsoft.com/en-us/magazine/cc188966.aspx). It also gives an examples towards the end.

Soumya Somasekhar Ram
2nd September 2013, 06:53
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...

anda_skoa
3rd September 2013, 09:38
I am pretty sure Windows has API for that. Check in MSDN.

Cheers,
_

Gokulnathvc
6th September 2013, 13:23
http://qt-project.org/doc/qt-4.8/desktop-systray.html