title: Only display certain files in QFileDialog
body: <p>Here's an example code I've written:</p>
  
  <pre><code>from PyQt5.QtWidgets import (QApplication, QMainWindow, QFileDialog)
  import sys
  
  
  class Window(QMainWindow):
  
      def __init__(self):
          QMainWindow.__init__(self)
          dialog = QFileDialog()
          dialog.exec()
  
  app = QApplication(sys.argv)
  window = Window()
  window.show()
  app.exec_()
  </code></pre>
  
  <p>When I run it, I get the following:
  <a href="https://i.stack.imgur.com/MvMQo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MvMQo.png" alt="enter image description here"></a></p>
  
  <p>These are all the files in my directory. I would like to filter out files that don't have the word 'spam' in their title, so that when I run the file, the only files that are displayed are 'spam.txt', 'spam_eggs_and_spam.txt', and 'spam_eggs_tomato_and_spam.txt'. </p>