[PyQt] Changing the wrapped object
Jens Thoms Toerring
jt at toerring.de
Fri May 4 13:33:10 BST 2012
Hi,
I have a C++ class SIP-wrapped with the '/Abstract/'
annotation, Thus Pyton just has a pointer to instances of
this class (and ownership is with C++). Now, at a certaind
point I would like to make the Python wrapper object point
to a different instance (of the same class). Finding the add-
ress of the Python object is simple using sipGetPyObject().
But is there some way make that Python object refer to a dif-
ferent of my C++-objects? I guess that there's some pointer
to my C++ object in that Python object that just need to be
modified to point to the new instance of the C++ class. I've
been going through all of the dicumentation several times but
haven't found anything that looks as if would do something
like that. And, of course, I wouldn't like to mess with un-
documented features of the SIP-wrapper, resulting in every-
thing breaking with the next SIP release;-)
Thanks and best regards, Jens
--
\ Jens Thoms Toerring ________ jt at toerring.de
\_______________________________ http://toerring.de
More information about the PyQt
mailing list