'Remove the button for the action from the layout and delete it.'

def __removeActionButton(self, action):

    actions = [slot.action for slot in self.__gridSlots]
    index = actions.index(action)
    slot = self.__gridSlots.pop(index)
    slot.button.removeEventFilter(self)
    self.__mapper.removeMappings(slot.button)
    self.layout().removeWidget(slot.button)
    self.__shiftGrid((index + 1), (-1))
    slot.button.deleteLater()
