how to make decorated rich popup window instead the default QSystemTrayIcon popup win
I have simple like notification application that sits in the tray every time massage comes
I need it to popup windows , but I need it to be rich so I could color it and add pictures
but all I have is the defulte popup massage box , how can I create new richer one ? that will allways popups above the tray icon?
Re: how to make decorated rich popup window instead the default QSystemTrayIcon popup
Well, you need to create the widget it self, and then overload QSystemTrayIcon::showMessage() to show your custom widget instead of the default one.
Re: how to make decorated rich popup window instead the default QSystemTrayIcon popup
where can i see example for this ? this is not so simple ...
Re: how to make decorated rich popup window instead the default QSystemTrayIcon popup
Example for what?
For creating a custom widget?
For overloading QSystemTrayIcon::showMessage()?
Re: how to make decorated rich popup window instead the default QSystemTrayIcon popup
For overloading QSystemTrayIcon::showMessage()
Re: how to make decorated rich popup window instead the default QSystemTrayIcon popup
You just subclass QSystemTrayIcon, and re implement showMessage().
If you don't know how to do that, you should probably turn to basic C++ tutorial sites first, until you are comfortable with C++ sub classing, as this is off topic for this forum.
But you can feel free to ask any Qt related questions any time.
Re: how to make decorated rich popup window instead the default QSystemTrayIcon popup
I know i know
the main thing is with this popup window , is the calculation of the window to popup in the right place depend on the screen size / title bar place and such ...
do i get it automatically when i subclass it ?
Re: how to make decorated rich popup window instead the default QSystemTrayIcon popup
I don't think so, but I don't know, I haven't subclasses QSystemTrayIcon.
However, the original implementation must do the position calculation, so you can "steal" that part from the original implementation.
Actually you can use all the original code, just replace the default widget with your custom one.
So it will probably be just copy&paste, and a rather small change to replace the default info balloon with your custom widget.
Re: how to make decorated rich popup window instead the default QSystemTrayIcon popup
In russian with screenshots - osd class from Clementine http://slow-tone.blogspot.com/2011/0...retty-osd.html
Re: how to make decorated rich popup window instead the default QSystemTrayIcon popup
i tried to compile the example in visual studio 2008 but it gives me linking problems
1>Linking...
1>qtmaind.lib(qtmain_win.obj) : error LNK2019: unresolved external symbol _main referenced in function _WinMain@16
1>debug\prettyosd.exe : fatal error LNK1120: 1 unresolved externals
Re: how to make decorated rich popup window instead the default QSystemTrayIcon popup
This is not a stand-alone application! It's a class that you can include in your app. There is an example
Re: how to make decorated rich popup window instead the default QSystemTrayIcon popup
ok thanks , now i see
Added after 35 minutes:
Hi , i compiled the source and this is not what i meant , yeah its nice custom tool tip
but its not system tray implementation
Re: how to make decorated rich popup window instead the default QSystemTrayIcon popup
And what? Just adopt it for what you want. I showed only an example