Closed immiProgrammer closed 10 months ago
Is there an example? I didn't understand what it meant
1 subMeun is used in 2 parent menus Menu1.addMenu(submenu) Menu2.addMenu(submenu) when exec Menu1 it has item of 'submenu' but doesn't work when hover it and Menu2 also has 'submenu' item and working fine both parent menus (Menu1 and Menu2) has 'submenu' in self._subMenus list
Submenu stores a parent pointer. So you should create one more submenu instead of sharing the same one.
Done
a menu has multiple self.parentMenu and self.menuItem in https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/6b37964b70e0f7d1d16fa455b01ff233fcc728e6/qfluentwidgets/components/widgets/menu.py#L328C9-L328C9