def _activate_context_menu_action(self, action_index):
    item = self.chat_window.messageList.item((self.chat_window.messageList.count() - 1))
    message_widget = self.chat_window.messageList.itemWidget(item)
    message_widget.context_menu.actions()[action_index].trigger()
def _activate_context_menu_action(self, action_index):
    item = self.chat_window.messageList.item((self.chat_window.messageList.count() - 1))
    message_widget = self.chat_window.messageList.itemWidget(item)
    message_widget.context_menu.actions()[action_index].trigger()