def closeEvent(self, event): """ Handles the user requesting the window to close. """ # If the 'Handler' allowed the window to close, then pass the request # along to the standard Qt event handler, which will close the window: if getattr(self, "_closed", False): QDialog.closeEvent(self, event)
def closeEvent(self, event): self._clear() QDialog.closeEvent(self, event)