Unsolved error: ‘fromJSON’ is not a member of ‘QJsonDocument’
-
I am facing compilation issue while accessing "fromJSON".
code:
```
QByteArray json_bytes = state.toLocal8Bit();
QJsonParseError error;
QJsonDocument json_doc = QJsonDocument::fromJSON(json_bytes, &error);compilation error: error: ‘fromJSON’ is not a member of ‘QJsonDocument’ need help...
-
I assume you did#include <QJsonDocument>
?seems obvious now that @sierdzio pointed it out...
-
It's fromJson not fromJSON. Use an IDE, it will auto-correct such errors.
-
Thanks,
I start using an IDE