def findMenu(self, title): """ find a menu with a given title @type title: string @param title: English title of the menu @rtype: QMenu @return: None if no menu was found, else the menu with title """ # See also http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/pyqt4ref.html#differences-between-pyqt-and-qt title = QApplication.translate(mikro.classname(self.window), title) for menu in self.iter_menus(): if menu.title() == title: return menu
def findMenu(self, title): """ find a menu with a given title @type title: string @param title: English title of the menu @rtype: QMenu @return: None if no menu was found, else the menu with title """ # See also http://pyqt.sourceforge.net/Docs/PyQt5/i18n.html#differences-between-pyqt5-and-qt title = QApplication.translate(mikro.classname(self.window), title) for menu in self.iter_menus(): if menu.title() == title: return menu for innerMenu in self.iter_inner_menus(menu): if innerMenu.title() == title: return innerMenu