Qt Application to do Linux Command
-
Bismillhirrahmanirrahim,
I use QtCreator on Ubuntu. I wanna make an application that replace some Linux command. In example, if I click a button, it is same with bash command: cp /home/master/Downloads/app.exe /home. How to do that? At least, is there an example (or two) in this case? Or, is there suitable tutorial for this? This is my deep curiosity since I know Java and Qt few years ago, but I still newbie.
Please tell me if I do repost and thank you so much.
-
You can run other programs (including bash commands) using "QProcess":http://qt-project.org/doc/qt-4.8/qprocess.html. In this specific case, you can also use "QFile":http://qt-project.org/doc/qt-4.8/qfile.html#copy-2 to copy the files.
-
[quote author="sierdzio" date="1370003614"]You can run other programs (including bash commands) using "QProcess":http://qt-project.org/doc/qt-4.8/qprocess.html. In this specific case, you can also use "QFile":http://qt-project.org/doc/qt-4.8/qfile.html#copy-2 to copy the files.[/quote]
Wow, amazing. So quick you answer my question! Thank you for this big clues. I got two swords: QProcess and QFile. But it is surely I want to use bash command only, I want to make my own GUI for CLI application.
Is there any further tutorial or example programs? In this case, surely. Thank you.
-
The documentation is pretty well written. I'm not that fluent in Qt tutorials, I mostly learn myself ;) But you can search or wait for some other bloke to reply.
In any case, feel free to use my "QEasyShell":https://github.com/sierdzio/qeasyshell as reference or backend. It's probably too complex for a newcomer, though.
-
Um, thank you so much. Even you created an application in this case. But I am completely new comer, in programming, more and more new in Qt. Thank you for your answers.