Qt Creater _Debug Constant
I want to use the _Debug Constant in Qt Creater. But don't get any output. Seems like Qt开发者_StackOverflow Creater don't set the _Debug Constant on debugging.
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
#ifdef _debug
qDebug("Test");
qDebug() << "Test";
argv* = new char[2]{ "c:\injection.dll", "5" };
#endif>
}
I'm not sure if Qt defines this by default, but in any case, you can add it yourself to your .pro
file:
debug:DEFINES += _debug
精彩评论