code: def set_menu(self, menu):
          
  
          self.__menu = menu
  
          if not self.parent():
              return False
  
          parent = [parent for parent in umbra.ui.common.parents_walker(self)].pop()
          for action in self.__menu.actions():
              not action.shortcut().isEmpty() and parent.addAction(action)
          return True
docs: Sets the Widget menu.
  
          :param menu: Menu.
          :type menu: QMenu
          :return: Method success.
          :rtype: bool