QSystemTrayIcon Ubuntu 15.10
-
Hello,
I'm developing for the Open Source cross-platform RetroShare.
With new version of Ubuntu (with Unity) 15.10 and compiled with Qt 4.8.6, the QSystemTrayIcon doesn't work properly.
We have multi icons depends the service notification. When we trigger .show() for service icon, a new main icon appears (with its ContextMenu). And when we trigger .hide() the new icon stay.
So, to test it, I've wrote a lite application with only SystrayIcon.
I've tested it with different version of Qt5. Only 5.5.1 works, but with only one icon. When I want to show the second directly, no one appears. If I don't show second, the first take its own and the second's context menu. When I trigger second.show() nothing happens.
showMessage() is working well (not msecs) with one or two icons.
contextmenu only works with one icon shown.
toolTip doesn't work.
activated signal isn't triggered.What can I do to get icons (or something else) in systray?
I recall that it's a cross-platform application (linux, win and MacOs).Thanks.
-
Hi and welcome to devnet,
You should try to build again your application using your Distribution Qt 5 to see if you are still experiencing this.
-
How many icons do you want ?
-
While I do agree that a number restriction is not a solution, having a software that adds 8 or more system tray icons is not a good design sign. Personally I would find it strange that I have to check such an amount of icons for status or other things for one software.
Note that Ubuntu's custom tray management might also add limitations to what you can do.
-
Well we don't have really 8 icons at the same time. But one for each service (mail, lobby, forum, channel, transfer, ...)
The problem is, now we have only one copied x times...
I invite you to test this application.PS: And if you've got time, maybe (surely) you can improve the code. ;)
-
I don't have a 15.10 at hand but on OS X I get both tray icons (once I uncomment the call to show) and each has its own menu.
-
Yes, it's only on Ubuntu 15.10.
You are on OS X? Good, we need developer on it ;)
In fact, other subject, we can't link main library (application) to plugins.
If you can have a look to RetroShare. -
Then you should contact the Ubuntu folks about that matter.
Who "we" ? ;)
Link application to plugin ? That doesn't sound right.
-
Happy new Year,
"We" are the RetroShare devs.
In fact, RS have plugin using some of its data. For Windows, we have to export symbol for compilation:
https://github.com/RetroShare/RetroShare/blob/master/retroshare-gui/src/retroshare-gui.pro#L186
In Linux it seems to do it automatically.
But on OSX I've got error at end of compilation with:
ld: symbol(s) not found for architecture x86_64.
All of them are defined from retroshare-gui (main application).PS: Were can I found a link to talk with Ubuntu Qt Folks?