4

My Qt app mounts ntfs shares to local directory.

I am using sudo appname but I want user to enter root password when application prompts.

How can I prompt for password and get root privileges for my Qt App ?

smitrp
  • 1,292
  • 1
  • 12
  • 28
  • 1
    Qt is cross-platform, but concepts around "root" are not. So what platform(s) do you need to support? If Linux is one of them, which distros? – John Zwinck May 08 '11 at 18:28

1 Answers1

2

This is something that's done by system software, not GUI toolkits. You can use PolicyKit

Velkan
  • 7,067
  • 6
  • 43
  • 87
gwohpq9
  • 2,143
  • 2
  • 18
  • 18
  • @smitpatel24: As already been stated, "root" isnt cross-platform. Last time i checked windows isnt that strict, but either way you'll have to write platform specific code so refer to the win32 api. Btw, you should say what platforms you want to support in the question, because when you use terms like sudo, people automatically assumes linux only. – gwohpq9 May 09 '11 at 09:48
  • I am writing code only for linux. It's an app for VMware users to mount host OS NTFS share tomount on local guest OS folders. – smitrp May 10 '11 at 04:26