Subclass QApplication to catch exceptions in handlers.