The advantage of sending message in string format to the terminal is no need GUI to show it and let's you monitor how your program flows. Thus, you can use command to sending a message to terminal. And you can see your message by starting your application you've made from terminal.
This is very easy and simple thing in Qt programming.
qDebug :
qDebug("Your message");
or you can use a QString variable like this :
QString s; s="Your message"; qDebug(s);
qWarning :
qWarning("Your message");
or you can use a QString variable like this :
QString s; s="Your message"; qWarning(s);See also Qt Tutorial about :
- The difference between qWarning and qDebug
- Creating project and compile it successfully
Search newest article here :