[vtkusers] Get a VTKRender to draw inside an external QWidget (ver5) (or QOpenGLWidget)

Martijn Koopman koopman.mk at gmail.com
Thu Feb 22 15:42:25 EST 2018


Hi Steve,

I believe what you're looking for is  QVTKOpenGLWidget.

It is a subclass of QOpenGLWidget.

See https://www.vtk.org/doc/nightly/html/classQVTKOpenGLWidget.html

Regards,
Martijn





Op 22 feb. 2018 21:10 schreef "Steve Petruzza" <spetruzza at sci.utah.edu>:

> Hi,
>
> I have a QOpenGLWidget that draws using gl calls. I would like to use a
> VTK render to draw inside the same canvas.
>
> I tried to use a QVTKRenderWindowInteractor passing the canvas as parent,
> but the canvas starts flickering and I cannot see any rendering.
> The same VTK render (using the same QVTKRenderWindowInteractor) works
> correctly in a separate vtkrenderwindow.
>
> Is there any simple way to just get the VTKRender to draw directly into
> the glRender loop of the canvas using the existing rendering window?
> Or any other suggestions.
>
> I am using VTK 8.1.0 and Qt 5.10 and this QVTKRenderWindowInteractor: ht
> tps://gitlab.kitware.com/alextsui05/vtk/blob/
> e9e9ffcfbbad68343a0782a1d9024735b7649a46/Wrapping/Python/vtk/qt5/
> QVTKRenderWindowInteractor.py
>
> Thank you,
> Steve
>
>
>
>
>
>
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> https://vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180222/60c8be52/attachment.html>


More information about the vtkusers mailing list