code: def create_tab(self, *widgets):
          
          widget = QWidget()
          layout = QVBoxLayout()
          for widg in widgets:
              layout.addWidget(widg)
          layout.addStretch(1)
          widget.setLayout(layout)
          return widget
docs: Create simple tab widget page: widgets added in a vertical layout