title: PyQt: QtGui.QFileDialog.getSaveFileName won't close after selection
body: <p>In my PyQt4 application, there is a functionality that allows users to save a <strong>avi</strong> file.
  To this aim, a <strong>saveMovie</strong> method has been implemented in the main window:</p>
  
  <pre><code>def saveMovie(self):
      """ Let the user make a movie out of the current experiment. """
      filename = QtGui.QFileDialog.getSaveFileName(self, "Export Movie", "",
                                                   'AVI Movie File (*.avi)')
  
      if filename != "":
          dialog = QtGui.QProgressDialog('',
                                         QtCore.QString(),
                                         0, 100,
                                         self,
                                         QtCore.Qt.Dialog |
                                         QtCore.Qt.WindowTitleHint)
  
          dialog.setWindowModality(QtCore.Qt.WindowModal)
          dialog.setWindowTitle('Exporting Movie')
          dialog.setLabelText('Resampling...')
  
          dialog.show()
  
          make_movie(self.appStatus, filename, dialog)
  
          dialog.close()
  </code></pre>
  
  <p>My idea is to use a <strong>QProgressDialog</strong> to show how the video encoding work is proceeding.<br>
  Nevertheless, after the selection of the filename, the <strong>QFileDialog</strong> won't disappear and the entire application stays unresponsive until the <strong>make_movie</strong> function has completed.  </p>
  
  <p>What should I do to avoid this?</p>