1、QT的线程优先级分为8级,分别是:
QThread::IdlePriority 0 scheduled only when no other threads are running.
QThread::LowestPriority 1 scheduled less often than LowPriority.
QThread::LowPriority 2 scheduled less often than NormalPriority.
QThread::NormalPriority 3 the default priority of the operating system.
QThread::HighPriority 4 scheduled more often than NormalPriority.
QThread::HighestPriority 5 scheduled more often than HighPriority.
QThread::TimeCriticalPriority 6 scheduled as often as possible.
QThread::InheritPriority 7 use the same priority as the creating thread. This is the default.
2、设置线程优先级
QThread *m_objThread1 = new QThread();
m_objThread1->start(QThread::InheritPriority);
3、别人的资料
getPriority():返回线程对象的优先级。
void setPriority(int newPriority):更改线程的优先级。
这两种函数没使用成功