PDA

View Full Version : using windows cmd in programs



ramin.lich
27th December 2014, 10:09
hi,
let say i need cmd commands in my program i mean when user click on the ping the program go to cmd type ping google.com and show result not only for ping command for any command in cmd like cd dir.........
is there any class in standard c++ or c++11 or Qt do this???
Note: i dont want to show the result in cmd i mean my program must copy the result from cmd and show in text field or text browser or any thing else.
any guidance will be grateful.

jakr13
27th December 2014, 11:47
http://qt-project.org/doc/qt-4.8/qprocess.html

look at this documentation about QProcess, I hope this will help you out!!! You can run your system commands through QProcess!!!

cheers!!!