Can we set priority of one of Qt Threads
nitin
Printable View
Can we set priority of one of Qt Threads
nitin
You can in 4.1....what are you using
from the docs
Quote:
void QThread::setPriority ( Priority priority )
This function sets the priority for a running thread. If the thread is not running, this function does nothing and returns immediately. Use start() to start a thread with a specific priority.
The priority argument can be any value in the QThread::Priority enum except for InheritPriorty.
This function was introduced in Qt 4.1.
i am currently using qt3.3.4
I had a look, and you can do it in 3.3 as well...you just gotta give the priority when you call start instead, e.g. this.start(QThread::TimeCriticalPriority)....the default is to inherit the same priority as the parent thread....
i think all this means is that you can't change it once you've set it....could be a little prohibitive, depending upon exactly what you want to do with it....