Код: Выделить всё
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
# Many declarations of attributes
self.line_name = QLabel("Name")
self.input_name = QInput("Example Name")
self.line_email = QLabel("Email")
self.input_email = QInput("[email protected]")
self.radio1 = QRadioButton("Option 1")
self.radio2 = QRadioButton("Option 2")
self.radio3 = QRadioButton("Option 3")
...
# Many calls to "add Layout" for each attribute
self.layout.addWidget(self.line_name)
self.layout.addWidget(self.input_name)
self.layout.addWidget(self.line_email)
self.layout.addWidget(self.input_email)
self.layout.addWidget(self.radio1)
self.layout.addWidget(self.radio2
self.layout.addWidget(self.radio3
...
Подробнее здесь: https://stackoverflow.com/questions/797 ... in-pyside6