[PyKDE] KXMLGUIFactory.container()

Gordon Tyler gordon at doxxx.net
Sun Apr 13 22:35:00 BST 2003


On April 13, 2003 04:14 pm, Phil Thompson wrote:
> I can't give an easier example than the ones in PyQt. You are defining a
> table of class names and the corresponding SIP generated data structure
> that represents the Python type. The table must be in alphabetical order of
> the class name as it is searched using bsearch().

Okay, I'll give that a try. Does it matter where in the sip file I define the 
%ConvertToSubClassCode block?

> > What determines whether a function is a factory function?
>
> If it returns a new instance of a class, like a constructor. The tag is
> needed so that SIP knows that Python is responsible for calling the
> instance's destructor.

That's not the case here I think. The function is returning instances managed 
by another class so Python doesn't need to call their destructor.

Ciao,
Gordon




More information about the PyQt mailing list