Hello all!
I am new in QT C++ Programming and I hope to get some help here.
I am trying to make a simple program with QT.

My goal is to save the parameter of objects to a file and then to load these backwards from the file.

The painting and save-function run without problems, but the load (desterilize) shows the following error messages:
QPainter::setBrush: Painter not active
QPainter:: pen: Painter not active
QPainter::setPen: Painter not active
QPainter::drawRects: Painter not active

I have been trying for few days to eliminate these errors but without success.

Here a snippet of my paintevent-funktion:

Here is my whole project-code: bainedyal.de/painter.zip

If you have any idea please contact me.

Thank you!