[wgem] allowing the user to give a custom name for the app

This commit is contained in:
Vinícius Moreira
2019-12-13 12:19:37 -03:00
parent af35b83d47
commit c07c6a0463
4 changed files with 74 additions and 39 deletions

View File

@@ -123,7 +123,7 @@ class TextInputQt(QGroupBox):
self.model = model
self.setLayout(QGridLayout())
self.setStyleSheet('QGridLayout {margin-left: 0} QLabel { font-weight: bold}')
self.layout().addWidget(QLabel(model.label + ' :'), 0, 0)
self.layout().addWidget(QLabel(model.label.capitalize() + ' :' if model.label else ''), 0, 0)
self.text_input = QLineEdit()
@@ -133,6 +133,9 @@ class TextInputQt(QGroupBox):
if model.tooltip:
self.text_input.setToolTip(model.tooltip)
if model.value:
self.text_input.setText(model.value)
self.text_input.textChanged.connect(self._update_model)
self.layout().addWidget(self.text_input, 0, 1)