View Full Version : capture information to the command line qt4

5th September 2006, 10:20
i tried std::cout/std::cerr, no luck. so, is there a qt class that allows messages to be echoed to the command line at runtime. i'm trying to catch events that effect some decision chains i'm using. thanks.

5th September 2006, 10:55
You should use qDebug if it is for debugging. Simply include QtDebug and do something like this:
qDebug() << "test";.

If you are using the Windows version of Qt you might want to add a line to the pro-file of you project.

CONFIG += console

Without this one, you will not see anything.

5th September 2006, 11:15
thanks again, i also found a workaround with cerr, but i needed qDebug for what i'm doing. take care.

5th September 2006, 16:03
cout/cerr works too. Just make sure there is something to output to (CONFIG+=console).