[PyKDE] ANN: PyQt v3.14, SIP v4.2, QScintilla v1.5 Released

Paul F. Kunz Paul_Kunz at slac.stanford.edu
Fri Mar 11 18:08:37 GMT 2005


   I ahve the following Python class defined...

class Linear ( FunctionBase ) :
    def __init__ ( self, other = None ) :
        if other :
            FunctionBase.__init__( self, other )
            print "copy"
            self.initialize ()
        else:
            FunctionBase.__init__( self )
            print "default"
            self.initialize ()

    def clone ( self ) :
        print "clone"
        return Linear ( self )
    

with some member functions not shown.  The class FunctionBase is a C++
abstract base class interfaced via FunctionBase.sip It appears that
after clone() calls the copy constructor (speaking in C++ terms), the
C++ object is deleted.   How do I prevent that?   Or am I trying to
clone the function in an in correct way (I know C++ better than
Python)?





More information about the PyQt mailing list