Simulate user clicking in QSystemTrayIcon
问题 Even through the activated slot is being executed, the menu is still not showing. I traced through manually clicking the tray icon and the simulated click, and its going through the same execution logic. Currently I have class MyClass(QObject): def __init__(): self._testSignal.connect(self._test_show) self.myTrayIcon.activated.connect(lambda reason: self._update_menu_and_show(reason)) def show(): self._testSignal.emit() @pyqtSlot() def _test_show(): self._trayIcon.activated.emit(QtWidgets