From 5afd71244430b32e5618707c7e124345fb3c1226 Mon Sep 17 00:00:00 2001 From: wyzula-jan Date: Tue, 9 Jun 2026 12:45:44 +0200 Subject: [PATCH] fix(notification-banner): eventFilter guard for QStandartItem --- .../addons/notification_center/notification_banner.py | 4 ++++ 1 file changed, 4 insertions(+) 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)