Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Where is the systray example in QT5.x?
Hi, I have to work on system tray. I find systray example in internet. but it isn't there in my qt.
So, I type it my self. But unfortunately when I build it, tray icon does not appear.
I need a working example. Is there a way to get this example? Any other example for system tray will also great.
If you know this, please help me. Thank you.
"Example from 4.8":http://qt-project.org/doc/qt-4.8/desktop-systray.html I don't think it has changed since then.
If you install Qt5.3.0 using Qt installer then search at Qt5.3.0/Examples/Qt-5.3/widgets/desktop/systray
Thank you, andreyc! The location is where I was looking for.
The example does not show me system tray icon though.
What OS do you use?
I've tested the example from Qt-5.3.0 and it works on MacOSX and GNU/Linux with Gnome shell.
Are there any errors in a terminal if you start it from a terminal or in application output panel if you start it from QtCreator?
I am using openSUSE13.1 with xfce desktop.
And... No, there isn't any error message.
I have both 5.3.0 and 5.0.0 compiler. But neither show me a tray icon.
Have you enabled systray applet in xfce?
I have it enabled but I still don't see icon.
I can see the messages, which I have not seen without systray applet.
And there is a clear spot on a panel where I can click and menu from the example will appear.
I guess that xfce and Qt implementation of "systray protocol":http://standards.freedesktop.org/systemtray-spec/systemtray-spec-0.2.html are a little bit different.
Thank you for the useful info andreyc.
I don't know how to enable systray applet in xfce. Please let me know. :)
Then what will the best way to work around this? I found a program that show a tray icon which made by Qt. But they use Qt4.
If you have Qt4 app that shows a systray icon then you have systray enabled.
It is possible that there is a regression in Qt5 systray implementation.
You may try to compare the sources or create a simple example build it with Qt4 and Qt5 and if the results are different submit a bug report.
"Here":http://qt-project.org/wiki/ReportingBugsInQt is how to report the bugs in Qt.
Qt4 shows my system tray icon. So I bug reported.
Thank you for all your guides!