[vtk-developers] VTK Qt Python wrapper unusable under Windows

Félix C. Morency felix.morency at gmail.com
Fri May 4 15:09:45 EDT 2012


Hi,

The toy example in [1] doesn't work under Windows (tested with PySide
v1.1.0, PyQt4 v4.9.1, VTK 6.0.0 commit
6214dd0542d64a66c8a94797e938f1b15da747d2, Python 2.7.3):

The source of the problem is located in QVTKRenderWindowInteractor.py:158

        self._RenderWindow.SetWindowInfo(str(int(self.winId())))

With PySide, the winId() method returns a PyCObject. The bug is known
and has been reported (see [2]). With PyQt4, the winId() method
returns a 'sip.voidptr' that needs to be handled accordingly.

What would be the cleanest way to fix this?

[1]: https://gist.github.com/2596951
[2]: https://bugreports.qt-project.org/browse/PYSIDE-46?focusedCommentId=177492#comment-177492

Regards,
--
Félix C. Morency, M.Sc.
Plateforme d’analyse et de visualisation d’images
Centre Hospitalier Universitaire de Sherbrooke
Centre de recherche clinique Étienne-Le Bel
Local Z5-3031 | 819.346.1110 ext 16634



More information about the vtk-developers mailing list