I need for project to convert a QSqlDatabase obejct which is db that I work on project to the QDataStream so I could save it as a db dump file which I can later import again to the project to work on as there are parts where we need to remove the db and its contents.
Was reading documentation but can't find proper way to do this. I need it for sort of export and save as dialog and also for import dialog. Dialogs are implemented but I'm not sure how to do this.
QDataStream out(&file);
out.setVersion(QDataStream::Qt_DefaultCompiledVersion);
QSqlDatabase db = Storage::database();
out « db;
Storage::database() function return current db in the QSqlDatabase format and I need it converted.
Aucun commentaire:
Enregistrer un commentaire