I have a program that uses an input tab with multiple entry boxes for a user to fill out, and when those entry boxes are filled in, I hit run and another program will run the data entered. I'd like for my program to have a tab button with a plus sign that will duplicate the tabs dynamically so that I can run multiple instances. I'd like for each tab to use the same name, but have a variant at the end - e.g. "EntryBox0", "EntryBox1", "EntryBox2".
Is there an easy way to do this, while keeping the formatting (widget positions) the same in all tabs?
My first thought was to code the multiple tabs manually and have a hide/unhide button for each tab, however that would be a lot more code.

I'd like to add the + sign next to "Tab 2". All of the tabs will identical. The widgets will have same name, but have a dynamic number at the end to identify which tab is being used.
from Stage import Ui_Form
from Tabs import Ui_TabPage
class TabPage(QWidget, Ui_TabPage):
def __init__(self, parent=None):
super().__init__(parent)
self.setupUi(self)
class Stage(QMainWindow, Ui_Form):
def __init__(self, parent=None):
super().__init__(parent)
self.setupUi(self)
button = QtWidgets.QToolButton()
button.setToolTip('Add New Tab')
button.clicked.connect(self.addNewTab)
button.setIcon(self.style().standardIcon(
QtWidgets.QStyle.SP_DialogYesButton))
self.tabWidget.setCornerWidget(button, QtCore.Qt.TopRightCorner)
self.addNewTab()
def addNewTab(self):
text = 'Tab %d' % (self.tabWidget.count() + 1)
self.tabWidget.addTab(TabPage(self.tabWidget), text)
if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
window = Stage()
window.setGeometry(600, 100, 300, 200)
window.show()
sys.exit(app.exec_())
