title: QMainWindow close() signal not emitted
body: <p>To warn before closing a window that inherits from QMainWindow, I reimplemented its <code>closeEvent</code>, which works fine when I emit <code>close()</code> manually. However, clicking the "x" button does not trigger this; it just exits.</p>
  
  <p>It does emit <code>aboutToQuit()</code> for the application, which I can use to "recover" the window after it already closes. But I want to the warning to precede the initial closing.</p>
  
  <p>I'm not sure where the issue is. The window is top-level and there are no running threads. Have I misunderstood what signal is actually connected to the button click...? It <em>is</em> <code>close()</code>, right?</p>