3 个解决方案
#1
http://hi.baidu.com/cyclone/blog/item/9c7f8701ef7326c3267fb515.html
题外:在Qt仓库中,QThread中这几个函数目前已经改为public
题外:在Qt仓库中,QThread中这几个函数目前已经改为public
#2
有效率,谢啦,结题最快的一次了~哈哈
#3
顺便评价下这两种?
1.
QMutex m;
QMutexLocker __locker__(&m);
QWaitCondition().wait(&m, WAIT_TIME);
2.
#include <qthread.h>
class I : public QThread
{
public:
static void sleep(unsigned long secs) {
QThread::sleep(secs);
}
static void msleep(unsigned long msecs) {
QThread::msleep(msecs);
}
static void usleep(unsigned long usecs) {
QThread::usleep(usecs);
}
};
#1
http://hi.baidu.com/cyclone/blog/item/9c7f8701ef7326c3267fb515.html
题外:在Qt仓库中,QThread中这几个函数目前已经改为public
题外:在Qt仓库中,QThread中这几个函数目前已经改为public
#2
有效率,谢啦,结题最快的一次了~哈哈
#3
顺便评价下这两种?
1.
QMutex m;
QMutexLocker __locker__(&m);
QWaitCondition().wait(&m, WAIT_TIME);
2.
#include <qthread.h>
class I : public QThread
{
public:
static void sleep(unsigned long secs) {
QThread::sleep(secs);
}
static void msleep(unsigned long msecs) {
QThread::msleep(msecs);
}
static void usleep(unsigned long usecs) {
QThread::usleep(usecs);
}
};