title: Wait until QWidget closes
body: <p>I'm working on a project in C++ and QT, and I want to open a new QWidget window, have the user interact with it, etc, then have execution return to the method that opened the window. Example (MyClass inherits QWidiget):</p>
  
  <pre><code>void doStuff(){
  
       MyClass newWindow = new Myclass();
       /* 
          I don't want the code down here to 
          execute until newWindow has been closed
        */
  }
  </code></pre>
  
  <p>I feel like there is most likely a really easy way to do this, but for some reason I can't figure it out. How can I do this?</p>