[vtkusers] GUISupport python wrappers?

Aashish Chaudhary aashish.chaudhary at kitware.com
Fri Nov 22 14:36:50 EST 2013


Hi Amos,

QVTK* modules are not wrapped in VTK. But you can use pyside and pyqt4 for
a VTK - QT application in python.

- Aashish



On Fri, Nov 22, 2013 at 1:10 PM, Amos Anderson
<amos.anderson at protabit.com>wrote:

> Hello VTK Users --
>
> How to I get GUISupport python wrappers in vtk 6? I can find a lot of
> testing/example python code that uses them (e.g. in
> GUISupport/Qt/Testing/Python) but my vtkpython doesn't have them:
>
>
> > vtkpython
> >>> import vtk
> >>> vtk.QVTKWidget2()
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> AttributeError: 'module' object has no attribute 'QVTKWidget2'
>
>
>
> VTK6.0.0> ls Wrapping/Python/vtk/qt4
> QVTKRenderWindowInteractor.pyc  QVTKRenderWindowInteractor.py
> __init__.pyc                    __init__.py
>
>
>
> Here's how I'm compiling VTK:
>
> $(CMAKE) -DVTK_WRAP_PYTHON:BOOL=ON
> -DPYTHON_EXECUTABLE:FILEPATH=$(PYTHON)/bin/python
> -DPYTHON_INCLUDE_DIR:PATH=$(PYTHON)/include/python2.7
> -DPYTHON_LIBRARY:FILEPATH=$(PYTHON)/lib/libpython2.7.dylib
> -DQT_QMAKE_EXECUTABLE:FILEPATH=$(QMAKE) -DModule_vtkGUISupportQt:BOOL=ON
> -DModule_vtkGUISupportQtOpenGL:BOOL=ON
>
>
> is there an option I'm missing? Or is this something that will be fixed in
> the next version of VTK? (when will that be?)
>
> Thanks!
> Amos.
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



-- 
| Aashish Chaudhary
| R&D Engineer
| Kitware Inc.
| www.kitware.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20131122/7ed1392b/attachment.htm>


More information about the vtkusers mailing list