title: Pyqt5: Attempting to add QLayout " "Form", which already has a layout (multiple inheritance python)
body: <p>i have created a ui file, <strong>window.ui</strong> (consist with a tab widget) and a Widget file <strong>student</strong>(some buttons,functions) using qtDesigner and than convert into py file using pyuic5. and inherit in a separate file like <strong>mainWindow.py</strong> and <strong>mainStudent.py</strong>.</p>
  
  <p>i added a tabWidget into mainWindow.py and i want to call the page student.py from the tab .
  so i create a new file <strong>app.py</strong> ,where i first inherit class from <strong>mainWindow.py</strong>  and add a tab call student and try to inherit class from <strong>mainStudent.py</strong>.</p>
  
  <p>my goal is if i run <strong>app.py</strong> , than <strong>mainWindo</strong>w will appear with tabwidget where tab name is "<strong>student</strong>" and if i hit the student tab than all elements will be show from "<strong>mainStudent.py</strong>".</p>
  
  <p>but i ame getting this error:
  <strong>Attempting to add QLayout "" to studentPage "Form", which already has a layout</strong>
  (Note: function is working fine )</p>
  
  <p>i don't know where i did mistake! please help! </p>
  
  <p><strong>window.py (generated from window.ui using pyuic5)</strong></p>
  
  <pre><code>from PyQt5 import QtCore, QtGui, QtWidgets
  class Ui_MainWindow(object):
      def setupUi(self, MainWindow):
          MainWindow.setObjectName("MainWindow")
          MainWindow.resize(800, 600)
          self.centralwidget = QtWidgets.QWidget(MainWindow)
          self.centralwidget.setObjectName("centralwidget")
          self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget)
          self.verticalLayout.setObjectName("verticalLayout")
          self.label = QtWidgets.QLabel(self.centralwidget)
          font = QtGui.QFont()
          font.setPointSize(20)
          self.label.setFont(font)
          self.label.setObjectName("label")
          self.verticalLayout.addWidget(self.label)
          self.tabWidget = QtWidgets.QTabWidget(self.centralwidget)
          self.tabWidget.setObjectName("tabWidget")
          self.verticalLayout.addWidget(self.tabWidget)
          MainWindow.setCentralWidget(self.centralwidget)
  
          self.retranslateUi(MainWindow)
          QtCore.QMetaObject.connectSlotsByName(MainWindow)
  
      def retranslateUi(self, MainWindow):
          _translate = QtCore.QCoreApplication.translate
          MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
          self.label.setText(_translate("MainWindow", "Main Window"))
  
  
  if __name__ == "__main__":
      import sys
      app = QtWidgets.QApplication(sys.argv)
      MainWindow = QtWidgets.QMainWindow()
      ui = Ui_MainWindow()
      ui.setupUi(MainWindow)
      MainWindow.show()
      sys.exit(app.exec_())
  </code></pre>
  
  <p><strong>student.py (generated from window.ui using pyuic5)</strong></p>
  
  <pre><code>from PyQt5 import QtCore, QtGui, QtWidgets
  
  class Ui_Form(object):
      def setupUi(self, Form):
          Form.setObjectName("Form")
          Form.resize(716, 635)
          self.gridLayout_2 = QtWidgets.QGridLayout(Form)
          self.gridLayout_2.setObjectName("gridLayout_2")
          self.label = QtWidgets.QLabel(Form)
          font = QtGui.QFont()
          font.setPointSize(16)
          self.label.setFont(font)
          self.label.setObjectName("label")
          self.gridLayout_2.addWidget(self.label, 0, 0, 1, 1)
          self.tabWidget = QtWidgets.QTabWidget(Form)
          self.tabWidget.setObjectName("tabWidget")
          self.tab = QtWidgets.QWidget()
          self.tab.setObjectName("tab")
          self.gridLayout = QtWidgets.QGridLayout(self.tab)
          self.gridLayout.setObjectName("gridLayout")
          self.pushButton = QtWidgets.QPushButton(self.tab)
          self.pushButton.setObjectName("pushButton")
          self.gridLayout.addWidget(self.pushButton, 0, 0, 1, 1)
          self.tabWidget.addTab(self.tab, "")
          self.tab_2 = QtWidgets.QWidget()
          self.tab_2.setObjectName("tab_2")
          self.gridLayout_3 = QtWidgets.QGridLayout(self.tab_2)
          self.gridLayout_3.setObjectName("gridLayout_3")
          self.pushButton_2 = QtWidgets.QPushButton(self.tab_2)
          self.pushButton_2.setObjectName("pushButton_2")
          self.gridLayout_3.addWidget(self.pushButton_2, 0, 0, 1, 1)
          self.tabWidget.addTab(self.tab_2, "")
          self.gridLayout_2.addWidget(self.tabWidget, 1, 0, 1, 1)
  
          self.retranslateUi(Form)
          self.tabWidget.setCurrentIndex(0)
          QtCore.QMetaObject.connectSlotsByName(Form)
  
      def retranslateUi(self, Form):
          _translate = QtCore.QCoreApplication.translate
          Form.setWindowTitle(_translate("Form", "Form"))
          self.label.setText(_translate("Form", "Student Page"))
          self.pushButton.setText(_translate("Form", "Test Function"))
          self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("Form", "Regular"))
          self.pushButton_2.setText(_translate("Form", "Test Second Function"))
          self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("Form", "Yearly"))
  
  
  if __name__ == "__main__":
      import sys
      app = QtWidgets.QApplication(sys.argv)
      Form = QtWidgets.QWidget()
      ui = Ui_Form()
      ui.setupUi(Form)
      Form.show()
      sys.exit(app.exec_())
  </code></pre>
  
  <p><strong>mainWindow.py</strong></p>
  
  <pre><code>from PyQt5 import QtCore, QtGui, QtWidgets
  import sys
  from files.main_interfaces.window import Ui_MainWindow
  class MainWindow(QtWidgets.QMainWindow,Ui_MainWindow):
      def __init__(self, parent=None):
          super(MainWindow, self).__init__(parent)
          self.setupUi(self)
  
  if __name__ == "__main__":
      import sys
      app = QtWidgets.QApplication(sys.argv)
      w = MainWindow()
      w.show()
      sys.exit(app.exec_())
  </code></pre>
  
  <p><strong>mainStudent.py</strong></p>
  
  <pre><code>from PyQt5 import QtCore, QtGui, QtWidgets
  import sys
  from files.main_interfaces.student import Ui_Form
  class stdMainWindow(QtWidgets.QWidget,Ui_Form):
      def __init__(self, parent=None):
          super(stdMainWindow, self).__init__(parent)
          self.setupUi(self)
  
          self.pushButton.clicked.connect(self.function1)
  
      def function1(self):
          print("function called")
  
  if __name__ == "__main__":
      import sys
      app = QtWidgets.QApplication(sys.argv)
      w = stdMainWindow()
      w.show()
      sys.exit(app.exec_())
  </code></pre>
  
  <p><strong>app.py</strong></p>
  
  <pre><code>from PyQt5 import QtCore, QtGui, QtWidgets
  from mainWindow import MainWindow
  from mainStudent import stdMainWindow
  
  class studentPage(stdMainWindow):
      def __init__(self, *args, **kwargs):
          super().__init__(*args, **kwargs)
          self.setupUi(self)
  
  
  class MainWindow3(MainWindow):
      def __init__(self):
          super().__init__()
          self.setupUi(self)
  
          # Add tab
          self.studentPage = studentPage()
          self.tabWidget.addTab(self.studentPage, 'Student')
  
  if __name__ == '__main__':
      import sys
      app = QtWidgets.QApplication(sys.argv)
      window = MainWindow3()
      window.show()
      sys.exit(app.exec_())
  </code></pre>