title: Proper use of PyQt timer/sleep
body: <p>How can I properly use the QtTimer?</p>
  
  <p>I have a button connect to a method which basicly does some math, but I want to iterate over it and see the result one at a time, with a delay of 1 second between them.</p>
  
  <p>In normal scriping i would use</p>
  
  <pre><code>for i in xrange(10):
     domath(i)
     sleep(1)
  </code></pre>
  
  <p>But in GUI it doesn't work because it freezes the GUI and I can't see the result. Only after 10 seconds I see the last iteration.</p>
  
  <p>I tried the QtTimer but it doesn't seems to work.</p>
  
  <pre><code>for i in xrange(10):
      QtCore.QTimer.singleShot(1000,lambd: domath(i))
  </code></pre>
  
  <p>it goes directly to the last iteration. Am I missing something?</p>