Re: [PyQt] sip: how to make a python instance owned by C++ without using a parent

2012-08-14 Thread Mathias . Born
Thanks for the answer. However, it appears I've not made myself clear enough. I don't want the C++ wrapper to be owned by Python; surely, I can achieve that with "sipTransferTo". But nothing is done about the Python part. When I delete the wrapper in C++, the Python part it wraps stays alive, becau

Re: [PyQt] sip: how to make a python instance owned by C++ without using a parent

2012-08-14 Thread Phil Thompson
On Mon, 13 Aug 2012 23:07:07 +0200, mathias.b...@gmx.de wrote: > Hi, > > I have a C++ class "Project", which I expose to Python > via sip. > In Python, I sub-class: > > class Derived(Project): > ... > > In addition, there is a Python factory function which creates an > instance of "Derived