def set_window_title(self):
        """Set the title of the console window"""
        old_title = self.windowTitle()
        title, ok = QtWidgets.QInputDialog.getText(self,
                                                   "Rename Window",
                                                   "New title:",
                                                   text=old_title)
        if ok:
            self.setWindowTitle(title)
Set the title of the console window
angrmanagement/vendor/qtconsole/mainwindow.py