def install(self, host):
        """Setup common to all Qt-based hosts"""
        print("Installing..")
        if self._state["installed"]:
            return

        if self.is_headless():
            log.info("Headless host")
            return

        print("aboutToQuit..")
        self.app.aboutToQuit.connect(self._on_application_quit)

        if host == "Maya":
            print("Maya host..")
            window = {
                widget.objectName(): widget
                for widget in self.app.topLevelWidgets()
            }["MayaWindow"]

        else:
            window = self.find_window()

        # Install event filter
        print("event filter..")
        event_filter = self.EventFilter(window)
        window.installEventFilter(event_filter)

        for signal in SIGNALS_TO_REMOVE_EVENT_FILTER:
            pyblish.api.register_callback(signal, self.uninstall)

        log.info("Installed event filter")

        self.window = window
        self._state["installed"] = True
        self._state["eventFilter"] = event_filter
Setup common to all Qt-based hosts