You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Monday, October 24th 2011, 3:58am

Converting a command line application to GUI-based app

Hi,

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.

Thanks!

2

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.