One of the first questions I receive when I'm doing courses about QT Creator is

"Hey, how can I printout debbugging info in QT Creator?"

It seems a silly question, but I replied this question 10 times in the last month. So here you are the answer:

There are two ways to do this job:

  1. Standard C++ way

Insert the following include at the beginning of your source file:

when you want to print your info just insert the following code

don't forget the endl at the end of your statement, otherwise you won't see anything (due to the buffering). This is the most common error…

 

qtcreator

 

  1. QT Way

Insert the following include at the beginning of your source file:

when you want to print your info just insert the following code

 

 

Nothing more…

Gg1