I am developing a C++ application (in QT) that should run only when logged in as root. If the current user is not the super user I should pop up a dialog box to let the user enter the super user password and from that point onwards the application should run as the root user (like the one that would appear when we try to open 'StartMenu->SystemTools->Hardware Browser' as a non-root user). I am pretty new to Linux and I could not get much information about this in the internet. Can anybody help me with this or point me to the right direction where I can get help in this?
Thanks in advance