diff --git a/bec_widgets/utils/bec_widget.py b/bec_widgets/utils/bec_widget.py index 01658960..e5b57a0f 100644 --- a/bec_widgets/utils/bec_widget.py +++ b/bec_widgets/utils/bec_widget.py @@ -1,2 +1,7 @@ class BECWidget: """Base class for all BEC widgets.""" + + def closeEvent(self, event): + if hasattr(self, "cleanup"): + self.cleanup() + event.accept()