PDA

View Full Version : Reimplementing QApplication::notify( )



Rayven
15th May 2008, 17:04
How do I (sucessfully) reimplement QApplication::notify()? In my MainWindow I have

bool notify( QObject *receiver, QEvent *e ) reimplemented but it never gets called by when the unhandled exception was throw from a signal. I have looked at the post from a year ago (Reimplementing QApplication::notify( ) (http://www.qtcentre.org/forum/f-qt-programming-2/t-reimplementing-qapplicationnotify-7472.html)) but it still never gets called.

Thanks!

jpn
15th May 2008, 17:22
You should subclass QApplication and reimplement the function in the QApplication subclass. It's not a reimplementation if you write the function to some other class, say any widget class.



class MyApplication : public QApplication
{
[...]
};