[PyQt] Passing a QWidget* wrapped in a PyCObject from a C++ program?

Phil Thompson phil at riverbankcomputing.com
Thu Oct 21 11:16:41 BST 2010


On Thu, 21 Oct 2010 11:45:25 +0200, Elias Bachaalany
<lallousz-pyqt4 at yahoo.com> wrote:
> Hi Phil,
> 
> Using Python 2.6, I could make it work with:
> 
> sip.wrapinstance(sip.voidptr(the_widget).__int__(), QtGui.QWidget)

sip.wrapinstance(int(sip.voidptr(the_widget)), QtGui.QWidget)

...is a bit nicer.

> But only after figuring out that I also had to recompile SIP with 
> SIP_SUPPORT_PYCOBJECT

Whoops - that's a bug.

Phil


More information about the PyQt mailing list