QSystemTrayIcon doesn't work when several.

Bug #1542691 reported by Phenom
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
qtbase-opensource-src (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Hello,
I've report this bug in Qt forum:
https://forum.qt.io/topic/62137/qsystemtrayicon-ubuntu-15-10
But they say to ask you.

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 litle application with only SystrayIcon. You can find Test Project on original thread.
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.

I've reinstalled fresh ubuntu 15.10 (in VirtualBox) with its own qt5.4.2.
Now main icon appears two time (with same context menu).

What can I do to get icons (or something else) in systray?

Thanks.

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: qtbase5-dev 5.4.2+dfsg-2ubuntu9
ProcVersionSignature: Ubuntu 4.2.0-27.32-generic 4.2.8-ckt1
Uname: Linux 4.2.0-27-generic x86_64
ApportVersion: 2.19.1-0ubuntu5
Architecture: amd64
CurrentDesktop: Unity
Date: Sat Feb 6 19:09:14 2016
InstallationDate: Installed on 2015-12-26 (42 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
ProcEnviron:
 LANGUAGE=fr_FR
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
SourcePackage: qtbase-opensource-src
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Phenom (retrosharephenom) wrote :
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Two different tray icons will be supported with https://codereview.qt-project.org/146951 (and I hope we'll have it backported in Xenial).

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

No, sorry, that doesn't allow two tray icons because the object path on D-Bus is hardcoded. I'll try to fix that later.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in qtbase-opensource-src (Ubuntu):
status: New → Confirmed
Revision history for this message
Felix Moreno (info-justdust) wrote :

Hi, that's what happen using retroshare with qt in ubuntu 16.04 and 15.10.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

I have worked on a fix for this yesterday, or to be more precise on two fixes.

Fix for appmenu-qt5: lp:~mitya57/appmenu-qt5/lp1574699
Fix for pure Qt without appmenu-qt5: https://codereview.qt-project.org/158963

As you seem to be using Unity, you are probably also using appmenu-qt5. So marking this bug as duplicate of bug 1574699 which is reported against right project.

Revision history for this message
BronsonMathews (bronsonmathews) wrote :

this is still an issue.
When will it be fixed?

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

BronsonMathews, this is fixed in Ubuntu 16.10. If the fix works for you, I can backport it to Ubuntu 16.04 too. Please test the branch mentioned in my previous comment.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.