Qt creator: howto pass command line arguments to the program you are writing?
-
Hi All,
I am writing a console Qt application that accepts command-line options. Therefore I'm using QCommandLineParser. I write the program in Qt creator, and use the F5 key to start debugging. Now my program is started in the debugger, but this way I'm not able to set any command line options, and I cannot see if my program handles them correctly.
Second option is to build the program in Qt creator, then open cmd.exe, goto the build directory, and then run the program from there. This way I can set command line options for my application, but then I can not debug the program.
Is there a way to tell QtCreator to give my program a set of command line options?
Is there a way to set a breakpoint my program, so I can start it with command line options from cmd.exe, and then attach with the debugger in QtCreator, and then step trough the program?
My versions:
Windows 7 enterprise SP1 64 bit
Qt Creator 3.6.0 Based on Qt 5.5.1 (MSVC 2013, 32 bit)
QT5.5, mingw492_32
Cheers,
Cedric -
Hi and welcome
I think you can use this
-
Just to be sure, my question is for QtCreator 4.2.
This topic "Qt creator: how to pass command line arguments to the program you are writing" is marked as SOLVED, but the solution is not available to view or read.
Can you please re-post the solution?
Thanks,
Jeff