From cc848be61ca822cdc4fc69a0ffa1c1d90dba518d Mon Sep 17 00:00:00 2001 From: f321x Date: Fri, 13 Jun 2025 10:59:43 +0200 Subject: [PATCH] qt: fix: set ApplicationAttribute.AA_DontShowIconsInMenus False Explicitly sets the AA_DontShowIconsInMenus attribute to false as it defaults to true on some Qt versions / environments which causes icons to not show up in the menus (e.g. MacOS). see https://forum.qt.io/post/813228 The attribute has to be set on self.app after the QApplication has been instanciated (https://doc.qt.io/qt-6/qt.html#ApplicationAttribute-enum) --- electrum/gui/qt/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/electrum/gui/qt/__init__.py b/electrum/gui/qt/__init__.py index 6a109da50..bcadcfb5f 100644 --- a/electrum/gui/qt/__init__.py +++ b/electrum/gui/qt/__init__.py @@ -157,6 +157,8 @@ class ElectrumGui(BaseElectrumGui, Logger): self.screenshot_protection_efilter = ScreenshotProtectionEventFilter() if sys.platform in ['win32', 'windows'] and self.config.GUI_QT_SCREENSHOT_PROTECTION: self.app.installEventFilter(self.screenshot_protection_efilter) + # explicitly set 'AA_DontShowIconsInMenus' False so menu icons are shown on MacOS + self.app.setAttribute(Qt.ApplicationAttribute.AA_DontShowIconsInMenus, on=False) self.app.setWindowIcon(read_QIcon("electrum.png")) self.translator = ElectrumTranslator() self.app.installTranslator(self.translator)