Created
September 9, 2016 18:47
-
-
Save vicatcu/ad2350f3772cdec68660db3f96efc93c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <QCoreApplication> | |
#include <QDebug> | |
#include <QStringList> | |
#include <QJsonObject> | |
#include <QJsonArray> | |
#include <QJsonDocument> | |
#include <QVariant> | |
#include <QJsonValue> | |
#include <QByteArray> | |
#include <QDataStream> | |
QString mapToString(QVariantMap &map){ | |
QString buf; | |
QDebug myDbg(&buf); | |
myDbg << map; | |
return QString(buf); | |
} | |
int main(int argc, char *argv[]) | |
{ | |
QCoreApplication a(argc, argv); | |
QVariantMap map; | |
map.insert("a", QVariant("123")); | |
map.insert("b", QVariant("234")); | |
qDebug() << mapToString(map); | |
return a.exec(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment