Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.2.2
-
None
Description
Hello,
I have an UI issue with the QSystemTrayIcon on PyQt6 and PySide2 with the following code. The console log when the mouse roll over the systray icon and the menu displayed is not decorated. I put the screenshot in attachement
"CoreSVG has logged an error. Set environment variabe "CORESVG_VERBOSE" to learn more."
The output file logged with CORESVG_VERBOSE=1 is in attachement labels coresvg.log
I'm on macos Monterey 12.1 with PySide2 5.15.2 and the same issue with PyQt6-Qt6 6.2.2.
Does i miss something ?
Thanks for all you amazing works.
import sys from PySide2 import QtWidgets from PySide2.QtGui import QIcon class SystemTrayIcon(QtWidgets.QSystemTrayIcon): def__init__(self, icon, parent=None): QtWidgets.QSystemTrayIcon.__init__(self, icon, parent) menu = QtWidgets.QMenu(parent) action : QtWidgets.QAction = menu.addAction("Item 1") menu.addAction("Item 2") disabledItem = menu.addAction("Item 3 Disabled") disabledItem.setDisabled(True) subMenu = menu.addMenu("Item 4 with sub menu") subMenu.addAction("SubMenu 1") disabledSubMenu = subMenu.addAction("SubMenu 2 Disabled (Not Working)") disabledSubMenu.setDisabled(True) disabledSubMenu2 = subMenu.addMenu("SubMenu Disabled") disabledSubMenu2.setDisabled(True) self.setContextMenu(menu) def main(): app = QtWidgets.QApplication(sys.argv) style = app.style() w = QtWidgets.QWidget() trayIcon = SystemTrayIcon(QIcon(style.standardPixmap(QtWidgets.QStyle.SP_FileIcon))) trayIcon.show() sys.exit(app.exec_()) if __name__ == '__main__': main()