You are not logged in.


Monday, October 24th 2011, 3:58am

Converting a command line application to GUI-based app


I have a command-line based program, and I want to make it user-friendly by designing a GUI for it. I wanted to know if I can use QProcess class in Qt to link the GUI with the command-line program. The idea was that the GUI will accept the input arguments from the user and send it to the program, without having to manually enter the arguments through the command line.

I am very new to GUI apps, and am not sure if QProcess is the right way to go for this.



Monday, October 24th 2011, 5:13pm

you can do it that way - it is a good solution if the command line tool is not interactive. Does the tool need input from the user after it has started to run? If yes, then you should rearrange your command line tool into a library that can be run from either a console program or a gui one. That will allow any front end to communicate with the library without the need for IPC (inter-process comms).
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.