1
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2026-03-05 00:12:49 +01:00

feat(StrFormItem): set placeholder text from spec description

This commit is contained in:
2026-01-10 23:19:43 +01:00
committed by Klaus Wakonig
parent bea68a6b91
commit e6876b42f2

View File

@@ -231,6 +231,8 @@ class StrFormItem(DynamicFormItem):
def __init__(self, parent: QWidget | None = None, *, spec: FormItemSpec) -> None:
super().__init__(parent=parent, spec=spec)
self._main_widget.textChanged.connect(self._value_changed)
if spec.info.description:
self._main_widget.setPlaceholderText(spec.info.description)
def _add_main_widget(self) -> None:
self._main_widget = QLineEdit()