title: PyQt: Wait until widget closes
body: <p>I have a window/widget that shows after I press a button, is there a way to make the main window wait until the widget closes out? I am using <code>.show()</code> right now and I have tried using <code>.exec_()</code> already but it gives me this error:</p>
  
  <p><code>AttributeError: 'MainWindow' object has no attribute 'exec_'</code></p>
  
  <p>Any help?</p>