-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathknob_types.py
37 lines (30 loc) · 1.13 KB
/
knob_types.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
35
36
37
import os
import sys
from PySide2.QtWidgets import *
from PySide2.QtCore import *
from PySide2.QtGui import *
class Knobs(QFrame):
def __init__(self, knob_selected_name):
super(Knobs, self).__init__()
self.layout = QHBoxLayout()
self.label = QLineEdit()
self.knob_name = QLineEdit()
self.knob_type = QLabel()
self.range = QLineEdit()
self.btn_remove = QPushButton('x')
self.label.setMaximumWidth(150)
self.knob_name.setMaximumWidth(150)
self.range.setMaximumWidth(150)
self.knob_type.setMinimumWidth(200)
self.btn_remove.setMinimumSize(24, 24)
self.btn_remove.setMaximumSize(24, 24)
self.knob_type.setText(knob_selected_name)
self.layout.addWidget(self.label)
self.layout.addWidget(self.knob_name)
self.layout.addWidget(self.knob_type)
self.layout.addWidget(self.range)
self.layout.addWidget(self.btn_remove)
self.setMinimumHeight(50)
self.knob_type.setAlignment(Qt.AlignCenter)
self.setStyleSheet('QWidget{background-color: #323232;}')
self.setLayout(self.layout)