diff options
| author | Bicker <bickerkards@tuta.io> | 2019-05-22 17:45:37 +0200 |
|---|---|---|
| committer | Bicker <bickerkards@tuta.io> | 2019-05-22 17:45:37 +0200 |
| commit | 25314fd2aed81aa5281bc3d93dbcc7919368ebe1 (patch) | |
| tree | 1995521ee652e419926de5fced0f2e3b655e70fb /gui/widgets/checkbox.py | |
Diffstat (limited to 'gui/widgets/checkbox.py')
| -rw-r--r-- | gui/widgets/checkbox.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gui/widgets/checkbox.py b/gui/widgets/checkbox.py new file mode 100644 index 0000000..d8e32f1 --- /dev/null +++ b/gui/widgets/checkbox.py @@ -0,0 +1,12 @@ +from PyQt5.QtWidgets import QCheckBox + + +class CheckBox(QCheckBox): + def __init__(self): + super(QCheckBox, self).__init__() + + def get_value(self, ql_type): + return ql_type(self.isChecked()) + + def on_change(self, change_event_function): + self.stateChanged.connect(lambda: change_event_function(self)) |