[PyKDE] [RFC] [PATCH] Adding support for templated container types to sip

Bryan O'Sullivan bos at serpentine.com
Thu Mar 3 06:22:54 GMT 2005


On Wed, 2005-03-02 at 22:05 -0800, Jim Bublitz wrote:

> > For non-simple value types (the things inside the containers), you must
> > tell sip how to handle the value type, or it will produce an error
> > message.  No surprise there.
> 
> Could you expand on this a little more? Will it automatically pick up the 
> sip*Convert[To,From]_* functions that sip creates (either from binding or 
> other %MappedType code)?

Exactly.  It uses the existing sip mechanisms in all cases, so for
example Python ints use PyInt_FromLong and PyInt_AsLong, while classes
known to sip via either class, struct or mapped type declarations all
work as you'd expect.

This works recursively, too, so a std::list<std::vector<QWidget> >
should be handled OK.

	<b

-- 
Bryan O'Sullivan <bos at serpentine.com>




More information about the PyQt mailing list