title: Qt how do I wait/know when a QMainWindow is closed?
body: <p>How do I know when a QMainWindow is closed ? So I can update a list in another window...</p>
  
  <p>It would be perfect to be able to wait until it closes.</p>
  
  <p>account.h:</p>
  
  <pre><code>class account : public QMainWindow
  {
  //...
  </code></pre>
  
  <p>accounts.h</p>
  
  <pre><code>class accounts : public QMainWindow
  {
  //...
  public:
     account accWin;
  //...
  </code></pre>
  
  <p>accounts.cpp</p>
  
  <pre><code>//...
  void accounts::on_myAction()
  {
     accWin.show();
     //how do I wait/know here for accWin to be closed ? (accWin is modal)
  }
  </code></pre>