def __init__(self, param: QajsonParam, parent=None): super().__init__(param, parent=parent) hbox = QtWidgets.QHBoxLayout() hbox.setContentsMargins(0, 0, 0, 0) self.setLayout(hbox) label_name = QtWidgets.QLabel( "Unknown param type: {}".format(self._param.name)) label_name.setMinimumWidth(self.label_min_width) label_name.setStyleSheet(GuiSettings.stylesheet_check_param_name()) hbox.addWidget(label_name)
def __init__(self, param: QajsonParam, parent=None): super().__init__(param, parent=parent) hbox = QtWidgets.QHBoxLayout() hbox.setContentsMargins(0, 0, 0, 0) self.setLayout(hbox) label_name = QtWidgets.QLabel("{}".format(self._param.name)) label_name.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter) label_name.setMinimumWidth(self.label_min_width) label_name.setStyleSheet(GuiSettings.stylesheet_check_param_name()) hbox.addWidget(label_name) self.lineedit_value = QtWidgets.QLineEdit() self.lineedit_value.setText(self._param.value) self.lineedit_value.textEdited.connect(self._on_edited) hbox.addWidget(self.lineedit_value)
def __init__(self, param: QajsonParam, parent=None): super().__init__(param, parent=parent) hbox = QtWidgets.QHBoxLayout() hbox.setContentsMargins(0, 0, 0, 0) hbox.setAlignment(QtCore.Qt.AlignLeft) self.setLayout(hbox) label_name = QtWidgets.QLabel(f"{self._param.name}") label_name.setMinimumWidth(self.label_min_width) label_name.setStyleSheet(GuiSettings.stylesheet_check_param_name()) hbox.addWidget(label_name) self.checkbox = QtWidgets.QCheckBox() self.checkbox.setChecked(self._param.value) self.checkbox.stateChanged.connect(self._on_edited) hbox.addWidget(self.checkbox)