code: def eventFilter(self, obj, event):
          
          event_type = event.type()
          if event_type == QEvent.MouseButtonPress:
              self.tab_pressed(event)
              return False
          return False
docs: Filter mouse press events.
  
          Events that are captured and not propagated return True. Events that
          are not captured and are propagated return False.