[vtkusers] QVTK : pb with Qt designer and python

Gaetan Lehmann gaetan.lehmann at jouy.inra.fr
Thu Jan 12 04:08:13 EST 2006


On Thu, 12 Jan 2006 09:43:48 +0100, Stephane PLOIX <stephane.ploix at edf.fr>  
wrote:

> Hi,
>
> I am trying to use VTK with Qt Designer and python bindings.
>
> First pb :
> When I create a QVTKWidget in Qt designer, compile the form with pyuic,
> python cannot find the QVTKWidget.
> When looking into the python wrapped files, it should be a
> QVTKRenderWidget.
>
> Second pb :
> I manually modify QVTKWidget into QVTKRenderWidget in the .ui or in the
> .py generated file, and python is happy now, until it tries to actually
> create the widget.
> in the file Wrapping/Python/vtk/qt/QVTKRenderWidget.py, line 106 :
> "apply(QWidget.__init__, (self,parent,name) + args, kw)"
> the apply function is deprecated. replacing it by
> QWidget.__init__.(self,parent,name) works, but this is really dirty...
>
> Is there a solution to use QVTK with Qt Designer without modifying the
> created python files?
>

I just want to add that to be able to use vtk 5.0 with Qt in python, I  
have to apply the attached patch, which also fix some other errors.
I have already applied the patch to the mandriva cooker package, but I  
think it should be included in VTK tree

Gaetan

-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtk-python-qt.patch
Type: application/octet-stream
Size: 2606 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060112/97731b98/attachment.obj>


More information about the vtkusers mailing list