[PyKDE] destructor not getting called?
kibab at icehouse.net
Fri Nov 8 07:43:01 GMT 2002
On Thursday 07 November 2002 10:14 pm, Boudewijn Rempt wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> It might be my Java heritage, but I've never trusted destructors...
> Couldn't you just connect the LastWindowClosed signal to the save method?
> Why I personally to is to write the settings whenever a main window is
> closed, from the closeEvent.
For efficiency reasons, QSettings caches all changes that are made using
write[Num]Entry(...). The only time that it gets written to disk is when the
destructor is called (which calls sync(), the method they have defined for
writing to disk). The destructor is the only publicly accessible function
for writing to disk.
More information about the PyQt