Yes but sleep IS per thread.
And makes no sense to make a GUI thread (the main thread) sleep.
I don't know however what happens if you want to use sleep in a console application with Qt4...
But this thread might prove interesting for you:
http://lists.trolltech.com/qt-intere...ad00380-0.html
from that thread:
Qt Code:
  1. #include <qthread.h>
  2.  
  3. class I : public QThread
  4. {
  5. public:
  6. static void sleep(unsigned long secs) {
  7. QThread::sleep(secs);
  8. }
  9. static void msleep(unsigned long msecs) {
  10. QThread::msleep(msecs);
  11. }
  12. static void usleep(unsigned long usecs) {
  13. QThread::usleep(usecs);
  14. }
  15. };
To copy to clipboard, switch view to plain text mode