[PyQt] Catching Qt exceptions in PyQt
dwagen at stonethree.com
Fri Sep 7 14:11:19 BST 2007
I have a piece of code that produces this error:
"Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt.
You must reimplement QApplication::notify() and catch all exceptions
I implemented my own app class as follows:
class Application (QtGui.QApplication):
def __init__(self, argv):
def notify(self, obj, evt):
# Call base class notify.
return QtGui.QApplication.notify(self, obj, evt)
print "Unexpected error:",
My code still produces exactly the same error, so it seems that the
exception is still not caught!
What am I doing wrong here?
More information about the PyQt