1

I want my application to save the contents of my scene which contains graphics items in it and later be able to retrieve all those items(not as a QPixmap, but as actual individual items). I have tried using Qsettings but get a QVariant error. My code is:

QSettings settings("AdvProgLab","ERapp");
settings.beginGroup("MainWindow");
settings.setValue("saved_scene",scene);      //Here, scene is a QGraphicsScene
settings.endGroup();

And the error which I am getting is:

qvariant.h:471: error: ‘QVariant::QVariant(void*)’ is private inline QVariant(void *) Q_DECL_EQ_DELETE; ^

error: use of deleted function ‘QVariant::QVariant(void*)’

Can anybody please explain me where I am going wrong ? Or is there any other way by which I can achieve this .

Thank You.

pr22
  • 179
  • 1
  • 2
  • 9

0 Answers0