diff --git a/bec_widgets/widgets/containers/main_window/addons/notification_center/notification_banner.py b/bec_widgets/widgets/containers/main_window/addons/notification_center/notification_banner.py index bb32393a..5017f97b 100644 --- a/bec_widgets/widgets/containers/main_window/addons/notification_center/notification_banner.py +++ b/bec_widgets/widgets/containers/main_window/addons/notification_center/notification_banner.py @@ -475,6 +475,8 @@ class NotificationToast(QFrame): # Event Filters ######################################## def eventFilter(self, watched, event): + if not isinstance(event, QtCore.QEvent): + return False # timestamp label → toggle absolute time if watched is self.time_lbl: if event.type() == QtCore.QEvent.Enter and not self._showing_absolute: @@ -894,6 +896,8 @@ class NotificationCentre(QScrollArea): self.setFixedHeight(min(content_h, avail)) def eventFilter(self, watched, event): + if not isinstance(event, QtCore.QEvent): + return False if watched is self.parent() and event.type() == QtCore.QEvent.Resize: self._adjust_height() return super().eventFilter(watched, event)