mirror of
https://github.com/nqrduck/nqrduck-measurement.git
synced 2024-12-22 15:47:51 +00:00
Made Validation prettier.
This commit is contained in:
parent
2c9c2f82e1
commit
52d0bca29e
1 changed files with 3 additions and 3 deletions
|
@ -232,11 +232,11 @@ class MeasurementView(ModuleView):
|
|||
validator (QValidator): The validator to use for the widget.
|
||||
"""
|
||||
if validator.validate(widget.text(), 0) == QValidator.State.Acceptable:
|
||||
widget.setStyleSheet("QLineEdit { background-color: transparent; }")
|
||||
widget.setStyleSheet("")
|
||||
elif validator.validate(widget.text(), 0) == QValidator.State.Intermediate:
|
||||
widget.setStyleSheet("QLineEdit { background-color: yellow; }")
|
||||
widget.setStyleSheet("QLineEdit { background-color: yellow;}")
|
||||
else:
|
||||
widget.setStyleSheet("QLineEdit { background-color: red; }")
|
||||
widget.setStyleSheet("QLineEdit { background-color: red;}")
|
||||
|
||||
class MeasurementDialog(QDialog):
|
||||
"""This Dialog is shown when the measurement is started and therefore blocks the main window.
|
||||
|
|
Loading…
Reference in a new issue