title: PySide2 QThread is freezing the UI
body: <p>I'm trying to run a long, blocking call in the background with Qt. (To be exact, the <code>scan</code> method for <a href="https://github.com/glasgowneuro/AttysComm" rel="nofollow noreferrer"><code>pyattyscomm.AttysScan</code></a>.) I thought I should use <code>QThread</code>, and came up with the following:</p>
  
  <pre class="lang-py prettyprint-override"><code>import pyattyscomm
  from PySide2.QtCore import QThread, Signal
  
  
  class DataCollectionThread(QThread):
      attys_ready = Signal()
  
      def __init__(self, parent=None):
          super().__init__(parent)
          self.scanner = pyattyscomm.AttysScan()
  
      def run(self):
          self.scanner.scan() # this is a long, blocking call
          self.attys_ready.emit()
  </code></pre>
  
  <p>However, when I <code>start</code> the thread (from some logic in a widget), the GUI hangs until the <code>scan</code> method finishes (i.e. a while.)</p>
  
  <p>I replaced the call to <code>scan</code> with <code>time.sleep(10)</code>, which strangely did not freeze the UI. Is there something I need to/can change to avoid <code>scan</code> blocking?</p>