<div dir="ltr"><div><div><div><div>Hi all,<br><br></div>I have a question about this chunk of code in QVTKRenderWindowInteractor.__init__:<br><br>        WId = self.winId()<br><br>        # Python2<br>        if type(WId).__name__ == 'PyCObject':<br>            from ctypes import pythonapi, c_void_p, py_object<br><br>            pythonapi.PyCObject_AsVoidPtr.restype  = c_void_p<br>            pythonapi.PyCObject_AsVoidPtr.argtypes = [py_object]<br><br>            WId = pythonapi.PyCObject_AsVoidPtr(WId)<br><br>        # Python3<br>        elif type(WId).__name__ == 'PyCapsule':<br>            from ctypes import pythonapi, c_void_p, py_object, c_char_p<br><br>            pythonapi.PyCapsule_GetName.restype = c_char_p<br>            pythonapi.PyCapsule_GetName.argtypes = [py_object]<br><br>            name = pythonapi.PyCapsule_GetName(WId)<br><br>            pythonapi.PyCapsule_GetPointer.restype  = c_void_p<br>            pythonapi.PyCapsule_GetPointer.argtypes = [py_object, c_char_p]<br><br>            WId = pythonapi.PyCapsule_GetPointer(WId, name)<br><br>        self._RenderWindow.SetWindowInfo(str(int(WId)))<br><br></div>On which platforms will these two code blocks kick in? (i.e., when is winId() a PyCObject or PyCapsule?). It seems on Linux/X11 they do not, since winId() returns a sip.voidptr which can be used directly in the SetWindowInfo call.<br><br></div>Thanks in advance,<br></div>Elvis<br><br></div>