Dup Goto 📝

PysideLayouts

PT2/aw/lang/pyside 07-31 13:46:41
To Pop
8 lines, 44 words, 272 chars Monday 2023-07-31 13:46:41

Note that we add layouts to QWidget's, not to QWindow's. The QMainWindow class can be treated as a widget. The QWindow class is for other things. Thus

win = QWidget() # QWidget, not QWindow
hbox = QHBoxLayout(win)
s1 = QSlider()
hbox.addWidget(s1)
win.show()