def event(self, event): if event.type() == QtCore.QEvent.Close: if QtWidgets.QSystemTrayIcon.isSystemTrayAvailable(): self.hide() return True return QQuickView.event(self, event)
def event(self, e): if e.type() == QEvent.Close: return self.close() return QQuickView.event(self, e)