code: def mouseDoubleClickEvent(self, event):
          
          if self.rename_tabs is True and \
                  event.buttons() == Qt.MouseButtons(Qt.LeftButton):
              # Tab index
              index = self.tabAt(event.pos())
              if index >= 0:
                  # Tab is valid, call tab name editor
                  self.tab_name_editor.edit_tab(index)
          else:
              # Event is not interesting, raise to parent
              QTabBar.mouseDoubleClickEvent(self, event)
docs: Override Qt method to trigger the tab name editor.