[vtkusers] QVTK : pb with Qt designer and python

David Cole david.cole at kitware.com
Thu Jan 12 07:59:35 EST 2006


Will this patch work with all versions of Qt and Python or does it 
require a certain minimum version of either...?

Gaetan Lehmann wrote:

> 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
>
>------------------------------------------------------------------------
>
>_______________________________________________
>This is the private VTK discussion list. 
>Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
>  
>



More information about the vtkusers mailing list