not able to save form data to json file
Hello friends,
I'm new to QT and i am facing problem with the use of json file in QT.
I want to save the "Form data " on click on pushbutton (such as multiple student information) to json file and again load the respective student data.
Can anybody suggest me how to do that?
Thanks in advance.
Regards,
Shoeb
Re: not able to save form data to json file
What do you have so far?
Did you create a QJsonDocument containing your data?
Cheers,
_
Re: not able to save form data to json file
Hi,
No.. i'm not understanding that how to create QJsonDocument.
I have saved that data in QJsonObject.
-Shoeb
Re: not able to save form data to json file
Re: not able to save form data to json file
Or just construct it from the QJsonObject using QJsonDocument::QJsonDocument()
Code:
QJSonObject object;
// build JSON object
QJsonDocument doc(object);