<div dir="ltr"><div><div><div><div><div>Hello!<br><br></div>I have created a PyQt4 application on Windows 10 using Visual Studio 2015.<br><br></div><div>In short, I have compiled SIP 4.17 into a static library so that I can use the api "sip_api_convert_to_void_ptr()". This api returns NULL when passed a PyObject * containing a QRect.<br><br></div><div>Although, I am using PyQt4 binaries from Anaconda2-2.4.1.<br><br></div><div>I have created a Python extension module built with VS 2015. I am passing a QRect to a function in the extension.<br><br></div><div>In the function, I am trying to do this:<br><br></div><div>PyObject *rect;<br><br></div><div>/* call python api to convert args to rect */<br><br></div>void *ptr = sip_api_convert_to_void_ptr( rect );<br></div><div><br></div><div>rect = (QRect *)ptr;<br></div><div><br><br></div><div>The debugger always shows that ptr is NULL. Even though rect is a valid QRect wrapped by PyQt.<br><br></div><div>Any ideas on where I am going wrong here?<br><br></div><div>Thank you!<br></div><div>Tom<br></div><div><br><br></div></div></div></div>