Set the priority of a process

  • Hello everyone! I am creating a GUI for a program.
    So what I do is run a command QProcess specially configured.
    I wish I could set the priority of this process that launch, I tried using this:
    but does not work (I'm using linux), also fear that the process launched by QProcess septa already a priority, if it did, I would be able to overwrite.
    thank you very much.

    ps: I would like a command that would work for all operating systems

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    AFAIK, no, however since 5.3 you have
    @qint64 QProcess::processId() const@
    which returns the native process id. You might be able to modify its priority through platform specific code.

    Hope it helps

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.