PDA

View Full Version : how to run qt program in root directory(linux)



iswaryasenthilkumar
8th January 2015, 13:57
i have created qtwidget program..
i want to execute this qt program in root directory of linux script.
can any one give me suggesstion for this:confused:
Thanx in advance

Lesiok
8th January 2015, 14:32
Login as root or try command su

anda_skoa
8th January 2015, 14:54
i want to execute this qt program in root directory of linux script.
What does that mean?

You want the root directory to be the program's current work directory?
Just have the script change to the root directory before you execute the program


cd /
/path/to/program

or have the program change its working directory:


QDir::setCurrent(QDir::rootPath());


The question is: why would you need that?
Why would your program rely on that?

Cheers,
_