Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Window(QWidget):
- def __init__(self):
- super().__init__()
- def init_gui(self):
- self.layout = QVBoxLayout()
- self.setLayout(self.layout)
- self.new1()
- self.new2()
- self.showMaximized()
- def create_scroll_area(self):
- scroll_area = QScrollArea()
- widget = QWidget()
- scroll_area.setWidget(widget)
- layout = QVBoxLayout()
- widget.setLayout(layout)
- button = QPushButton("Ahoj")
- layout.addWidget(button)
- self.layout.addLayout(layout)
- def new1(self):
- self.create_scroll_area()
- def new2(self):
- self.create_scroll_area()
- QLayout::addChildLayout: layout "" already has a parent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement