-
Notifications
You must be signed in to change notification settings - Fork 2
/
groups.py
34 lines (24 loc) · 850 Bytes
/
groups.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from PySide2 import QtWidgets as qtw
from PySide2 import QtGui as qtg
class Panel(qtw.QWidget):
def __init__(self):
super(Panel, self).__init__()
group_1 = qtw.QGroupBox('checkbox')
group_1_layout = qtw.QHBoxLayout()
group_1.setLayout(group_1_layout)
group_1.setEnabled(False)
for _ in range(5):
group_1_layout.addWidget(qtw.QCheckBox())
group_2 = qtw.QGroupBox('line edit')
group_2_layout = qtw.QHBoxLayout()
group_2.setLayout(group_2_layout)
for _ in range(5):
group_2_layout.addWidget(qtw.QLineEdit())
master_layour = qtw.QVBoxLayout()
master_layour.addWidget(group_1)
master_layour.addWidget(group_2)
self.setLayout(master_layour)
app = qtw.QApplication()
panel = Panel()
panel.show()
app.exec_()