QThreads , QObject and sleep function

前端 未结 4 1091
醉梦人生
醉梦人生 2020-12-16 04:18

The problem I encountered is that I decided to implement QThreads the way they are supposed to, based on numerous articles:
http://blog.qt.digia.com/blog/20

4条回答
  •  自闭症患者
    2020-12-16 04:44

    For Qt 4.8.0 (the version I'm using), QThread::sleep, QThread::msleep and QThread::usleep have been made public so you can just call them directly. In earlier Qt versions, they were static protected.

    e.g. QThread::sleep(5); // sleep for 5 seconds

提交回复
热议问题