title: Simple network timeout in Qt(c++)
body: <p>I'm writing a simple network file transfer application in Qt, and I'm struggling to implement a timeout.</p>
  
  <p>Basically, what I want is the following,</p>
  
  <pre><code>while(!AcknowledgeReceived)
  {
   if(timeout)
    {
       break;
    }
  }
  </code></pre>
  
  <p>Currently, timeout is changed by a Qtimer, but once the loop starts execution, it never leaves. (The Slot QTimer emits to doesn't get executed.)
  I gather that this has something to do with threads, but I'm way to new at this to implement it correctly.</p>
  
  <p>So my question to you is, how do I go about ensuring that the method flipping timeout is executed, or how do I get the same results with another method?</p>