title: PyQt5 : close QfileDialog after clicking Open and returning file
body: <p>I'm pretty new to PyQt5...
  With that said, I've added a menu with File-&gt;Open.
  I've implemented this using QFileDialog.</p>
  <pre><code>        # Create the Actions for the Menu Bar
          LoadVrfAction = QAction(&quot;&amp;Load New File&quot;, self)
          LoadVrfAction.setShortcut(&quot;Ctrl-N&quot;)
          LoadVrfAction.setStatusTip(&quot;New VRF Data&quot;)
          LoadVrfAction.triggered.connect(self.control.loadVrfFile)
  
          menuBar  = self.menuBar()
          fileMenu = menuBar.addMenu(&quot;&amp;File&quot;)
          fileMenu.addAction(LoadVrfAction)
  </code></pre>
  <pre><code>  def loadVrfFile(self):
      vrfFileName = QFileDialog.getOpenFileName(self.view, &quot;Open File&quot;)
      myFile = vrfFileName[0]
  
      # Load the file
      logging.debug(f&quot;Start: Reading File = {myFile}&quot;)
      self.view.core.readVrfFile(myFile)
      logging.debug(f&quot;End: Reading File = {myFile}&quot;)
  </code></pre>
  <p>My problem is that when I click &quot;Open&quot; on the file I want to load, I want the Menu Dialog box to go hide or go away before I execute the function &quot;readVrfFile&quot;.  Since the file I'm reading into the program is large it takes about 15 seconds and my diaglog box just appears frozen while it's loading.</p>
  <p>Is there an easy way to hide the getOpenFileName box and instead print status to a textbox/status bar while its loading?</p>