QVTKRenderWindowInteractor bug (PyQt)
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
VTK crashes if you use the QVTKRenderWindowInteractor class to embed VTK in a QWidget. The error message / problem was described by Stou. S : http://www.siafoo.net/snippet/315 a long time ago.
The bug seems to be there since 2009 (VTK 5.2 had it). I do get the error on Red Hat 6.4, PyQT 4.10, Python 2.7, VTK 5.10.1, but not on OS X with the same packages. I didn't test it on Windows.
Some packages (like CompuCell3D) have corrected the bug by using their own QVTKRenderWindowInteractor : https://github.iu.edu/Biocomplexity/CompuCell3D/blob/master/lab/3.7.0/player/Utilities/QVTKRenderWindowInteractor.py
The solution is easy, just change QtGui.QWidget to QtOpenGL.QGLWidget . (and add the QtOpenGL import statement).
So I am wondering if it would be possible to patch QVTKRenderWindowInteractor to be able to embed VTK in a PyQT app (and not to use it as a stand-alone PyQT window) ? Or perhaps there is a reason why a QGLWidget can't be used ?