title: QMainWindow freezes upon watchdog.start(), how to make them work simultaneously?
body: <p>I have an application which I wanted to add an 'automode' to.</p>
  
  <pre><code>def start_stop_automode(self):
      self.set_auto()
  
     if not self.auto_mode_btn.isChecked() and self.observer.is_alive():
         self.observer.stop()
         self.observer.join()
         return
     else:
         self.observer.start()
         while True:
            try:
               time.sleep(1)
            except KeyboardInterrupt:
               self.observer.stop()
               self.observer.join()
  </code></pre>
  
  <p>It calls a slot which starts the <code>watchdog</code> <code>FileSystemEventHandler</code> class which in turn executes some functions on the file that triggered the <code>watchdog</code> <code>event</code>.</p>
  
  <pre><code>class Event(FileSystemEventHandler):
  
      def on_created(self, event):   
  
      input_path = event.src_path
      if input_path.endswith('_1.CSV'):
  
          if self.file_creation_finished(input_path):
              file = os.path.split(input_path)[-1].rstrip('.CSV')
              file = file.split('_')[0]
              self.exec_funk(order=file)
  </code></pre>
  
  <p>Through debugg i saw that the code inside the <code>FileSystemEventHandler</code> class is performed correctly, except the missing functionality of the <code>QMainWindow</code> actually being operational while the <code>watchdog</code> is running.
  How do i accomodate them both?</p>