Solved How to qDebug() << enum
-
QJsonParseError json_error; QJsonDocument parse_doucment = QJsonDocument::fromJson(codeContent.toLatin1(), &json_error); qDebug() << json_error;
-
@sonichy You either cast the enum value to int or implement operator<< operator for that enum. See http://doc.qt.io/qt-5/qdebug.html
-
Hi
Is QJsonParseError not a class and what you actually want is
qDebug() << json_error.errorString();
or
qDebug() << json_error.error ? -
@mrjj said in How to qDebug() << enum:
qDebug() << json_error.errorString();
qDebug() << json_error.errorString(); is good for QJsonParseError.