title: Multi-Threading in PyQt 5
body: <p>I've been learning about multi-threading, specifically in the context of a PyQt 5 application.</p>
  
  <p>Initially I implemented a version using 'threading', but have since learnt that I should be using 'QThread' to allow use of signals / slots, e.g:</p>
  
  <blockquote>
    <p>workerThread = QThread()<br>
    workerObject = Worker(cmdlist)<br>
    workerObject.moveToThread(workerThread)<br>
    workerThread.started.connect(workerObject.run)<br>
    workerObject.finished.connect(workerThread.quit)    </p>
  </blockquote>
  
  <p>However, is it possible to design a system in which:      </p>
  
  <ul>
  <li>Each class is associated with a thread created at run-time. </li>
  <li>The'main' component of the program can then call functions within those
  classes, which are executed within the separate thread for the given
  class.</li>
  </ul>
  
  <p>An example of the behaviour would be this:    </p>
  
  <blockquote>
  <pre><code>thread = threading.Thread(target=self.run, args=())
  </code></pre>
  </blockquote>
  
  <p>But how would I implement similar behaviour with QThread?<br>
  Or my understanding of threads in Python in-correct?</p>