[PyQt] sip & dynamic_cast

Hazen Babcock hbabcock at mac.com
Mon Jun 29 22:54:20 BST 2009


Hello,

I have a custom C++ QtWidget (the QtExtWidget in PLplot) that I am 
attempting to wrap with sip. I've run into a very puzzling problem where 
in one function in the program dynamic_cast will properly recognize the 
PyQt generated C++ widget and in another function it will not. Also, 
forcing the cast seems to work, so it seems that the C++ widget is as 
expected. Suggestions as to what might be going wrong would be appreciated.

Also, when wrapping an object with sip do I need to specify all of its 
member functions and variables? Or just those that I plan to use? 
Perhaps the problem is that my current sip file doesn't not exactly 
match the corresponding c++ definition?

I'm using sip 4.8.1 and pyqt 4.5.1 on linux.

thanks for any help,
-Hazen



More information about the PyQt mailing list