def set_tab_title(self):
        """Set the title of the current tab"""
        old_title = self.tab_widget.tabText(self.tab_widget.currentIndex())
        title, ok = QtWidgets.QInputDialog.getText(self,
                                                   "Rename Tab",
                                                   "New title:",
                                                   text=old_title)
        if ok:
            self.tab_widget.setTabText(self.tab_widget.currentIndex(), title)
Set the title of the current tab
angrmanagement/vendor/qtconsole/mainwindow.py