[PyQt] Closing QMainWindow with a bunch of child dialogs...
dwagen at stonethree.com
Tue Nov 27 11:18:23 GMT 2007
I have this situation:
I have a QMainWindow (parent) with a bunch of children dialogs.
One of the children is a dialog containing a QTabWidget with a bunch of
I now close the main window by clicking on the close button, which
trigger a closeEvent().
In my closeEvent(self, event) method, I do the following:
* call accept() on the dialog containing the tab widget
* call accept() on all open dialogs
* call event.accept() on the close event received by this main window
My question is this:
What is the correct way to close a parent and all its children to ensure
garbage collection happens properly?
I am confused about the use of accept(), close() or destroy() to get rid
Also, the dialog that contains a tab widget - should I close all the tab
and the QTabWidget when closing this dialog?
Dirk Wagener <dwagen at stonethree.com>
(MSc. Electronic Engineering, Stell.)
Stone Three Signal Processing (Pty.) Ltd.
+27 21 851 3123 (phone)
+27 21 851 3127 (fax)
We shall not cease from exploration and the end of all our exploring will
be to arrive where we started... and know the place for the first time.
More information about the PyQt