Problems with Open-Source Downloads read and

QCommanlineparser gives allways empty values

  • I will not produce an error if the commandline is wrong. Therefore I cannot use
    QCommandlineParser::process and must use parse(QStringList)

    QStringList Argv;
    for(int i=0; i<argc; ++i)

    I want read this commandline

    QCommandLineOption o("UserDir");
    bool error=Parser.parse(Argv); // true
    bool ok=Parser.isSet(o); // true
    QString ss=Parser.value(o); // ""

    I get alway a empty value!

    PS: With process I get the an empty string, too.

  • Running this on windows? On UNIXes this could work on windows you will never get any output. Tiled, a program which uses Qt has the same problem:

  • @jjan
    I work on Windows.
    The argv ist correct submitted to the app. The problem is the CommandLineParser or a stupid error of me I cant find.
    I had decided to make my own parser - it is a simple task.

Log in to reply