Why don't you handle them as a QStringList?
You can use QString::split(...) method to split it in tokens (strings, blank space separated), and then it would be trivial to
check wether the first character of each string is a dash (or whatever other check) and remove it(or do any operation you want).
remove first string (namely the path to the executable as you shown)