How to convert a QJsonObject to a QString
General and Desktop
4
Posts
3
Posters
15.4k
Views
1
Watching
-
You need to get a QJsonValue, which has a .toString() method. That or you need to use QJsonDocument to turn a whole object into a string.
@QString jsonToString(QJsonObject json)
{QJsonDocument Doc(json); QByteArray ba = Doc.toJson(); return QString(ba);
}@