aboutsummaryrefslogtreecommitdiff
path: root/gui/widgets/line_edit.py
diff options
context:
space:
mode:
Diffstat (limited to 'gui/widgets/line_edit.py')
-rw-r--r--gui/widgets/line_edit.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/gui/widgets/line_edit.py b/gui/widgets/line_edit.py
new file mode 100644
index 0000000..a87a7b6
--- /dev/null
+++ b/gui/widgets/line_edit.py
@@ -0,0 +1,12 @@
+from PyQt5.QtWidgets import QLineEdit
+
+
+class LineEdit(QLineEdit):
+ def __init__(self):
+ super(QLineEdit, self).__init__()
+
+ def get_value(self, ql_type):
+ return ql_type(self.text())
+
+ def on_change(self, change_event_function):
+ self.textChanged.connect(lambda: change_event_function(self))