Sets the Widget menu.

        :param menu: Menu.
        :type menu: QMenu
        :return: Method success.
        :rtype: bool

def set_menu(self, menu):
        """
        Sets the Widget menu.

        :param menu: Menu.
        :type menu: QMenu
        :return: Method success.
        :rtype: bool
        """

        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