title: Qt - How to intercept the application's close event (if there's one)
body: <p>I need to do some work right before my application closes (note that I said my application and <strong>not</strong> it's main window). Is there an application close event or any other way to accomplish this? </p>
  
  <p>The reason that I can't rely on the main window's close event is that my application runs on the background leaving a system tray icon.</p>