Hello all,

I am tinkering a bit with QProcess on Windows7.  What I would like to be able 
to do is to start a process with a “high” priority.  My application spawns 
multiple processes and I am tinkering with them in order to help ensure they 
get their processor time.

On the command line, I would do this.

start /high myspawn.exe arg1 arg2 arg3

Unfortunately one of the requirements is that a DOS window not open to run it.

If I start the process like this:

QString program = “myspawn.exe";
QStringList arguments;

arguments << “arg1” << “arg2" << “arg3";

QProcess *p = new QProcess(this);
QTimer::singleShot(30000, this, SLOT(deleteLater()));
qDebug() << "starting mysawn process -- " << p->startDetached(program, 
arguments);

It starts just fine, no DOS window, but at Normal priority.

I have tried multiple ways using the “start /high…” command inside of the 
various ways to execute a command with QProcess, but they always flash a DOS 
window.

I even create a .bat file with the command in it and passed arguments in with 
the above code.  While it worked, it flashed the DOS window.

Am I missing something here?

-Jason

//------------------------------//
   Jason R. Kretzer
   Lead Application Developer
   ja...@gocodigo.com<mailto:ja...@gocodigo.com>
//-----------------------------//

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to