title: How to stop a qThread in QT
body: <p>I would like to know how to properly stop a QThread. I havea infinite loop in a thread, and I would like to stop it when I do a specific action :</p>
  
  <p>I have tried :</p>
  
  <pre><code>if (thread-&gt;isRunning()){
      worker-&gt;stop();
      thread-&gt;terminate();
  }
  </code></pre>
  
  <p>the stop() method set a value to false to go out of my infinite loop.</p>
  
  <p>Furthermore, I don't really understand the difference between quit(), terminate() or wait(). Can someone explain me ?</p>
  
  <p>Thanks.</p>