I have created a console program in qt5, it should get arguments from the console before it's running.
This is the part of the code where I use the arguments passed from the console:
void foo::start(){
if(arguments.contains(--help))
show help function
else if (arguments.contains(--ipinfo))
show ip info function
else if (arguments.contains(--time))
show time info function
else
nothing
}
My programs name is initlizer
. When I run my program via console with an argument, I want to get the arguments from the console using qt5. For example:
$initlizer --help >> show help function
$initlizer --time >> show time function