I want to run print command lpr -p
programmatically through root privilege in Qt. Actually I want to print the pdf file using these command. This command is working through terminal but not through programmatically.
Thanks in advance.
I want to run print command lpr -p
programmatically through root privilege in Qt. Actually I want to print the pdf file using these command. This command is working through terminal but not through programmatically.
Thanks in advance.
Copyright © 2021 Jogjafile Inc.
you can run commands that need root privilege by running :
Although it's not a good idea to echo your password in shell but you can do it in Qt via
Qprocess
like :