def mousePressEvent(self, event: QMouseEvent): if event.button() == Qt.LeftButton: self.fadeOut() # noinspection PyTypeChecker