-
Qt c++
Does anyone know how to use qt creator to create a c++ app that can call a command line app
eg could have a simple gui and you type in aurl then it is passed to wget like
wget "what ever domain they typed in the gui"
--update--
i have made a gui button and when its clicked it runs popen
seems to work via popen("wget example.com", "w");
i don't suppose this is the proper way to achieve this, does anyone know the proper way?
-
Depends on what you mean by "proper way".
If popen() is good enough for what you want, then it's probably OK. The disadvantage of popen() is you don't get process exit status values (or stuff written to stderr), so you may be missing out on important information.
If you wanted more control, then using pipe(), fork(), exec() etc would be needed.
-
How would i use pipe(), fork(), exec() etc to do a "wget google.com"?
Also i will want to return the stuff that would normally be printed into terminal into a text area in a gui