0

The user has spent a lot of time setting up a nice qwt plot (picking curves from the database, configuring line colour and style, scaling them, scrolling and panning to the interesting places, and so on). Now he wants to save this layout, not as a picture, but as a configuration which he can load again later, and refine even more.

What's the most elegant way to make a QwtPlot save itself to a file, so that I can load it again? I'd love to simply write

outf << myQwtPlot;

which obviously isn't possible out of the box. Maybe there is something simpler than making my own QwtPlod-derived class which implements operator<< and operator>> to read and write all "important" attributes.. ?

Batox
  • 574
  • 1
  • 4
  • 16

1 Answers1

0

You could try Qt's new property system, but I think you still end up doing approximately what you have in mind.

http://qt-project.org/doc/qt-4.7/properties.html

Julian
  • 1,522
  • 11
  • 26