PDA

View Full Version : ways to exit appl.



whoops.slo
29th January 2007, 19:09
Hi!
I am stuck. I want the program to save certain data and clear some files at exit. I know how to do that using a PushButton (save data, delete files, exit). But I have no idea how to do that if a user presses X button in the top right corner of the window (Windows, but I think other OS have similar GUI).
Can somebody please at least point me in the right direction?

TNX,
Luka

Gopala Krishna
29th January 2007, 19:18
Implement closeEvent() (http://doc.trolltech.com/4.2/qwidget.html#closeEvent) in your main widget. Check out this (http://doc.trolltech.com/4.2/qcloseevent.html#details) too.