Neosettler - 2013-05-29

Greetings everyone, (this is a duplicate with a more appropriate title)

I'm trying to convert a piece of code form PySide to PythonQt and I'm having a hard time so far figuring this one out, here is the working PySide version:

def setHandle(self, in_widget):
    import ctypes
    ctypes.pythonapi.PyCObject_AsVoidPtr.restype = ctypes.c_void_p
    ctypes.pythonapi.PyCObject_AsVoidPtr.argtypes = [ctypes.py_object]
    self._winid = ctypes.pythonapi.PyCObject_AsVoidPtr(in_widget.winId())

When translated to PythonQt in_widget.winId() becomes in_widget.winId but I'm getting this error:

TypeError: PyCObject_AsVoidPtr with non-C-object

Anyone could help me clear this up?

Thx