[vtkusers] VTK, Python, and Qt4

Doug Hackworth doug.hackworth at vanderbilt.edu
Tue Apr 29 14:15:09 EDT 2008


Prabhu Ramachandran wrote:
 >
 > Use vtk.qt4.QVTKRenderWindowInteractor like so:
 >
 > from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor

Thanks, Prabhu.  After retrieving the files from CVS that you directed me to and 
placing them in the VTK/Wrapping/Python/vtk directory, my previous problem with 
QVTKRenderWindowInteractor has gone away -- but it's been replaced by another:

"RuntimeError: the PyQt4.QtCore and qt modules both wrap the QObject class"

Here is what I'm importing:

import sys
import vtk
import qt
from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor

If I don't import the qt module then I won't have the rest of Qt for my 
application (e.g., QApplication is no longer defined).  What should I do?  Any 
thoughts?

-- Doug






More information about the vtkusers mailing list