I cannot print out a QString in Qt using QDebug.
Below are some attempts (none work):
QDebug(letters.toStdString());
QDebug(letters.toLatin1());
QDebug() << letters.toUtf8();
QDebug() << letters.toWCharArray();
QDebug() << letters.toStdString();
QDebug() << letters;
I have included:
#include <QtDebug>
#include <QDebug>
I am using Qt 5.2. I also added CONFIG += console
to my project file
My error is "no matching function for call to QDebug::QDebug()"
I also got "QDebug(QByteArray) is ambiguous" for QDebug(letters.toLatin1());
qDebug() << letters;
– Polerq
in my comment – Poler