[Python-modules-team] Bug#867794: python3-pyqt5: App tray icon won't show if show() before systray is available

Jérôme jerome at jolimont.fr
Sun Jul 9 20:56:05 UTC 2017


Here's a minified example to reproduce the issue :

----------------------------------------------------

import sys

from PyQt5 import QtGui, QtWidgets

app = QtWidgets.QApplication([])
app.setQuitOnLastWindowClosed(False)

main_window = QtWidgets.QMainWindow()

QtWidgets.QSystemTrayIcon(
    QtGui.QIcon.fromTheme("view-refresh"),
    main_window
).show()

sys.exit(app.exec_())

----------------------------------------------------

Remove systray applet from panel, launch code, add systray applet. The
icon does not show up.

If the panel was there when the code was launched, however, the systray
applet can be added/removed and the icon always shows up.

I think this does not conform to what it says in the docs.

Hope this helps.

-- 
Jérôme



More information about the Python-modules-team mailing list