I want to make a GUI application an application that is executed by typing a command in a terminal system such as a command prompt.
For example, as shown below at the command prompt, enter the executable file name, input/output file name, parameters, etc. to run the program on the GUI, select the input/output file using Explorer, enter the parameters in the box, and execute. I want to do this by pressing the button.
go.exe input.txt output.txt 10 20

I heard Qt was good, but I couldn't find anything that could be used in the sample program.
The executable file is made in C or C ++. Similarly, I want to run python source (.py file) with GUI.

I'd be grateful if you could give me advice on how to achieve this.

  • Answer # 1


    The target OS is not written, but Qt is one of the good choices for multi-platform development.
    It is convenient to use QProcess to call CUI tools from Qt.

    Call a Python script from Qt5.9.2 and get standard output and standard error on the Qt side.


    The application that executes the target command only inputs from the command line. I think it's easy if you can do it.
    For example, if it is C language, it is just called by System (). Parameters can be entered by creating an appropriate parameter setting window.
    Other languages ​​often have the ability to run other programs, so I should use it.
    However, what if the app you are trying to run does consort and I/O while running? Create your own window and run it there? If that's the case, I think it's no different from executing it as a command.