Important: Please read the Qt Code of Conduct -

Run my app with sudo from QtCreator

  • Hi,

    how can i run my app with sudo from QtCreator ? There is a filed in Projects->Run options called "Alternate executable on device" but i can't use it like "sudo /home/pi/qt/app" from what i checked.
    In arguments field i cant add "sudo", so is there a way to do this ?
    I have tried one thing and it sort of works, my setup looks like this:

    • bash srcipt with "sudo /home/pi/qt/app" called
    • in "Alternate executable on device" i have path to
      and it works but i can't terminate app from QtCreator so it's a bit annoying :)

    any other solution for my problem ?
    thanks for any help :)

Log in to reply