def exit(self, status): """Extend QApplication::exit to log the event.""" log.destroy.debug("Now calling QApplication::exit.") if self._args.debug_exit: print("Now logging late shutdown.", file=sys.stderr) debug.trace_lines(True) super().exit(status)