PDA

View Full Version : capture information to the command line qt4



nikita
5th September 2006, 11:20
hi,
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.

e8johan
5th September 2006, 11: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.

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

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