Peter Kümmel wrote: > At least I'm now 100% sure this is the right > place to look for the bug: > I've tested your shared_ptr solution, and the > resize bug is gone, but I get-as assumed-this > from Qt: :)
> QPaintDevice: Cannot destroy paint device > that is being painted. Be sure to > QPainter::end() painters! One thing that shared_ptr allows you to do is to define a specialized deleter that could invoke QPainter::end()... If this feels like cheating, it is :) You should really address the cause of the problem not the symptom. Angus