I am having trouble compiling my code with QDebug, but i really need it.
#include
#include
int main(int argc, char
For version 5.15 of Qt following worked for me,
add include file,
#include <QDebug>
and use,
qDebug() << "Your debug message.";
Try this:
qDebug() << "hello";
The problem here is that QDebug does not have a default constructor. QDebug() << "hello";
would work if it did have one.
These are the available constructors:
QDebug(QIODevice* device);
QDebug(QString* string);
QDebug(QtMsgType type);
// and the copy constructor of course.
duDE's answer gives you what you're looking for.