PDA

View Full Version : Execute command without terminal window



RolandHughes
10th June 2015, 01:00
This used to be simple, but now it seems to have changed.

Ubuntu 12.4.5 Qt 5.4 from the _run file

Attempting to launch an unzip command with QProcess. No matter what I do it brings up a terminal window, even when I say startDetached(). Do I have to drop out of Qt and use the C system() call to achieve what I want?

I don't want to see the terminal or have the terminal prompt me to hit enter for it to go away. I just want unzip to run and communicate via stdout/err to my program.

I don't remember this happening with earlier versions of Qt. I remember a way to execute without seeing anything.

Thanks,
Roland

anda_skoa
12th June 2015, 14:52
This is strange, QProcess should not involve any terminal at all.

Have you checked if the program you are launching is maybe a script that invokes a terminal?

Cheers,
_

qinception
17th June 2015, 10:38
Other way of doing it without QProcess is use system() API call. Ex: system("chmod 777 abcd.bin");