On Wednesday 22 October 2008 09:31:18 Jeremy Sanders wrote: > Hi - this may be an FAQ, but I haven't seen it. > > Is it possible to receive notification just before a QWidget is destroyed > in Python by subclassing? I'd like to call some cleanup routines for a > custom widget when it is removed from the screen. > > Thanks > > Jeremy
If you subclass you can override QWidget.closeEvent, QWidget.hideEvent, or the destructor. If you want to moniter it without subclassing, you can use an event filter or connect to the QObject.destroyed signal. Matt _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
