Does qt have library to change windows or other os process priority?
-
Hi,
No Qt doesn't provide that. It's out of its scope.
If you want to do such things you'll have to search for native APIs.
-
Windows libs https://msdn.microsoft.com/en-us/library/windows/desktop/ms686277(v=vs.85).aspx
if(low){
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_BELOW_NORMAL);
}else{
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_NORMAL);
} -
Does qt have library to change windows or other os process priority?
Like setting it in task manager to low so that high cpu usage multithreaded program wont slow all other processes.@Q139
You can also try this (windows only):QCoreApplication::thread()->setPriority(QThread::NormalPriority);
But thread priority is very different from process priority.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms686219(v=vs.85).aspx