Important: Please read the Qt Code of Conduct -

what is meaning of g++ -DQT_QML_DEBUG in Qt compiler log?

  • I would like to know what is meaning of -DQT_QML_DEBUG flag in g++ while compile time. It is attached only in debug mode.

    what is actual text of DQT_QML_DEBUG?
    Is it provide by qt or already in g++ ?

    what is different in between two object file in debug mode?

    Use -DQT_QML_DEBUG flag

    g++ -c -pipe -g -std=gnu++11 -Wall -W -fPIC -DQT_QML_DEBUG -I$PWD  -o $OBJDIR/main.o $PWD/main.cpp

    Not use -DQT_QML_DEBUG flag

    g++ -c -pipe -g -std=gnu++11 -Wall -W -fPIC -I$PWD  -o $OBJDIR/main.o $PWD/main.cpp

  • Lifetime Qt Champion

    @Yash001 See
    "what is actual text of DQT_QML_DEBUG?" - there is no text.
    -DQT_QML_DEBUG sets QT_QML_DEBUG define (such defines can be checked in C/C++ code using #ifdef QT_QML_DEBUG).
    QT_QML_DEBUG activates "QML Debugging Infrastructure".