[Qt-interest] remove all elements from a QPainterPath

Stephen Chu stephen at ju-ju.com
Thu Mar 31 15:51:56 CEST 2011


In article 
<OF3CD162E1.6EF3F42A-ONC1257864.0026ABC7-C1257864.00291B34 at sebakmt.com>,
 Markus Franke <Franke.M at sebakmt.com> wrote:

> Dear Alex,
> 
> thanks for your reply. However, this is not really what I want to achieve.
> 
> I would like to inherit from QPainterPath and then clear the path from 
> within a member function of this derived class.
> 
> Best regards,
> Markus Franke

How about this?

class MyPath : public QPainterPath {
   MyPath(const QPainterPath & copy) : QPainterPath(copy) {}
   void clear() {
      *this = QPainterPath();
   }
};

-- 
Stephen Chu



More information about the Qt-interest-old mailing list