How to get root permission inside qt program?
I run my QT app without sudo permission but during running phase of the app I need to install the .deb so I am running the command dpkg -i mydeb.deb with qprocess in QT or some other commands which needed to sudo permisssion.
I do not need the user interaction to enter the password for the same. So how can I do the same in QT app in ubuntu 14.04 ? Thanks
Re: How to get root permission inside qt program?
You need to use a mechanism to elevate process permissions. Qt has nothing to offer in this regard, look for platform-dependent solutions (e.g. PolicyKit/PolKit)
Re: How to get root permission inside qt program?
You could just use QProcess to run exactly the same sudo command as your user would from the command line.