|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
p, li { white-space: pre-wrap; } bool ok;
QVariantMap result = Json::parse(QString(txt), ok).toMap();
if (!ok) {
qFatal("An error occurred during parsing");
exit (1);
}
QVariantMap responseMap = result["response"].toMap();
QVariantMap statusMap = result["response"].toMap();
qDebug() << "success:" << statusMap["success"].toString();
qDebug() << "name:" << statusMap["name"].toString();
qDebug() << "first_name:" << statusMap["first_name"].toString();
qDebug() << "last_name:" << statusMap["last_name"].toString();
qDebug() << "clingle_userid:" << statusMap["clingle_userid"].toString();
|
|
|
Source code |
1 2 |
INCLUDEPATH += ../my/relative/path INCLUDEPATH += D:/my/absolute/path |
In the project file (.pro) for your project, you can specify additional directories in the files system to search for header files using the following...
![]()
Source code
1 2 INCLUDEPATH += ../my/relative/path INCLUDEPATH += D:/my/absolute/path
After making the change make sure you re-run qmake to rebuild the Makefile for your project.
Note the usage of all forward slashes. I think the use of backslashes has been deprecated even on the Windows platform.
Good luck!
--
Chris
|
|
Source code |
1 2 |
INCLUDEPATH += ../my/relative/path INCLUDEPATH += D:/my/absolute/path |
This post has been edited 2 times, last edit by "smartworker" (Sep 28th 2011, 12:28pm)
Step 1: Find the required include files for the JSON stuff. If you cannot find where they are, then you cannot proceed.
Step 2: use the path you found in Step 1 and add that with the INCLUDEPATH.
This post has been edited 1 times, last edit by "smartworker" (Sep 29th 2011, 7:32am)