[vtkusers] Re: VTK, Python, and Qt4

Prabhu Ramachandran prabhu at aero.iitb.ac.in
Tue Apr 29 12:35:45 EDT 2008


Doug Hackworth <doug.hackworth at vanderbilt.edu> wrote:
> 
> Greetings, VTK community.  I am attempting to write an application using 
> the combination of VTK, Python, and Qt, and having some trouble.  I am 
> relatively new to both VTK and Qt (though I think I have a reasonably 
> solid grasp of each -- I can write things that function correctly), so I 
[...]
> I am using Ubuntu 7.04 server (amd64).  My VTK is version 5.0.4 with 
> Python bindings and GUI support enabled, and it builds error-free.  VTK 
> works with Python, no problem.  Qt works with Python, no problem. 
> Mixing all three IS a problem.

Use vtk.qt4.QVTKRenderWindowInteractor like so:

from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor

The qt4 directory is in CVS.  I guess you could grab the file from here 
and use it:

  http://public.kitware.com/cgi-bin/viewcvs.cgi/Wrapping/Python/vtk/qt4/

This will be part of the up and coming 5.2 release.

cheers,
prabhu




More information about the vtkusers mailing list