another easy question:

I need a simple delay/sleep in a loop - how do I do it? without getting into threading.

Qt Code:
  1. for(int i=0; i<4; ++i)
  2. {
  3. //do something with data[i]
  4. sleep(50);//for example
  5. }
To copy to clipboard, switch view to plain text mode 
a very silly example I know ... but using this could save me making 4 timers.
and yes, generally, it must be a bad idea to put sleep()s into the main thread... but still, it could be handy.

thanks
K