Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.7.1
Description
There seems to be some kind of difference between using the widget based QSystemTrayIcon implementation directly and the QML labs implementation when it comes to Flatpaks. I'm not 100% sure if this is a Qt issue, but all signs point there in the moment.
Works:
Package the Systray example application as a flatpak and install it. The systray icon is shown and the context menu is in place. Both work, inside a flatpak and directly on the system.
Fails:
Use the attached QML example pasted right from the docs as a flatpak (instructions are in README.md if required). The systray icon is shown, but the context menu initially pops up as a window of it's own:
What might help understanding this issue is the fact that using QGuiApplication instead of QApplication (not recommended in the docs) leads to a
QWidget: Cannot create a QWidget without QApplication
message, while this message does not pop up when starting the same application as non flatpak directly on the system. So it works when not being deployed as a flatpak.
Another thing to note is that if I override the desktop environment using
--env=XDG_CURRENT_DESKTOP=gnome
the flatpak works, too. Independently of using QApplication or QGuiApplication.
The host system is running Fedora 40 / KDE Plasma 6.