I didn't check that one, but I removed this code which I had before the code I posted above:
// printf(reply->readAll());
// mFile->write(reply->readAll());
// mFile->flush();
// mFile->close();
and now the QByteArray I mentioned above seems to be correctly initialized -- strange huh ???
And please also one thing. As I mentioned the reply contains json data. It seems, there is one key
first, say "some key" and it's value could be a QVariant which may contain other nested QVariantMaps etc.
My question is imagine I want to get the value of key which is located inside the nested QVariantMaps. How do I do this??
For example, I have qDebug()<<"forename: "<<results.value("forename").toString(); but it returns an empty string.
But as I said I think this maybe because "forename" is a key in one of the nested QVariantMaps inside the "results"
How to behave in this case? Thank you very much.
Bookmarks