another easy question:
I need a simple delay/sleep in a loop - how do I do it? without getting into threading.
a very silly example I know ... but using this could save me making 4 timers.Qt Code:
for(int i=0; i<4; ++i) { //do something with data[i] sleep(50);//for example }To copy to clipboard, switch view to plain text mode
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
Bookmarks