[PyQt] QApplication.notify exception?

Kyle Altendorf sda at fstab.net
Sun May 26 21:52:20 BST 2019


On 2019-05-26 16:37, Matic Kukovec wrote:

> Hi guys,
> 
> I have an application that runs without a problem on Windows, but on 
> Linux it shows this message on exit:
> 
>> Qt has caught an exception thrown from an event handler. Throwing
>> exceptions from an event handler is not supported in Qt.
>> You must not let any exception whatsoever propagate through Qt code.
>> If that is not possible, in Qt 5 you must at least reimplement
>> QCoreApplication::notify() and catch all exceptions there.

I use sys.excepthook to provide a log and dialog for otherwise unhandled 
Python exceptions.  Maybe see if that can at least let you see what 
exception is causing trouble?  But I honestly haven't ever seen a 
reference to this message before...  :|

Cheers,
-kyle


More information about the PyQt mailing list