from PySide6.QtWidgets import QWidget, QVBoxLayout class VBox(QWidget): def __init__(self, *widgets: QWidget): super(VBox, self).__init__() self.layout = QVBoxLayout(self) for widget in widgets: self.layout.addWidget(widget) def addWidget(self, widget: QWidget): self.layout.addWidget(widget)