Thank you for the reply;
Yes, I am calling update() rather than the PaintEvent directly. I tried a similar idea tot he one you suggested without success, but i think Ive just found the real problem with the program: it has a memory leak that only became apparent when the paintevent got called frequently enough.
I have now identified the problem in the code half way through writing this reply: when I remove all the painter.save(); commands there is no longer a memory leak :D
so just to detail what I done in the last half an hour:
1.)
removed all the painter.save(); functions which dont appear to be necessary
This gave continuous "QPainter::restore: Unbalanced save/restore" errors in Qt. (which is why I put the save() functions in to start with)
2.)
remove all the painter.restore(); functions (these were only there because I copied the example, as with .save() I dont truly know what they do)
3.) enjoy a program that functions identically to before but without memory leaks and without warnings in Qt.
For reference It would be nice to know how to stop this problem if it ever happens that you need the save/restore functions.
Cheers,
Woody