code: def insertTab(self, index, widget, title):
          
          self.insertWidget(index, widget)
          tab = self.tabBar().insertTab(index, title)
          tab.titleChanged.connect(widget.setWindowTitle)
docs: Inserts a new tab for this widget.
  
          :param      index  | <int>
                      widget | <QtGui.QWidget>
                      title  | <str>