title: How to do cleaning up on exit in Qt
body: <p>I'd like to do some house keeping stuff (like writing to a file etc) in a Qt app before the app exits. How can I get to this function (exit or whatever is called) in Qt?  </p>