def _addMenuFromActions(self, actions, name): menu = qtsupport.actionGroupToMenu(actions, name, self) self.menuBar().addMenu(menu) return menu
def itemContextMenu(self, item): actions = self.itemActions(item) if actions: return qtsupport.actionGroupToMenu(actions, self.tr('Context menu'), self._app.treeview)