code: def hideEvent(self, event):
          
          try:
              for plugin in (self.widgetlist + self.thirdparty_plugins):
                  if plugin.isAncestorOf(self.last_focused_widget):
                      plugin.visibility_changed(True)
              QMainWindow.hideEvent(self, event)
          except RuntimeError:
              QMainWindow.hideEvent(self, event)
docs: Reimplement Qt method