[vtkusers] Get a VTKRender to draw inside an external QWidget (ver5) (or QOpenGLWidget)
david.gobbi at gmail.com
Sat Sep 15 09:58:39 EDT 2018
QVTKOpenGLWidget is not available in Python, it would have to be
wrapped with sip (or shiboken) rather than with the stock VTK wrappers.
The old QVTKWidget was, at one point, wrapped in Python as shown here:
It's totally feasible to do something similar with QVTKOpenGLWidget, if
someone wants to dedicate the time.
On Sat, Sep 15, 2018 at 6:06 AM Elvis Stansvik <elvis.stansvik at orexplore.com>
> I came across this thread while trying to find a QOpenGLWidget based
> VTK/PyQt5 widget.
> Just want to ask: The QVTKOpenGLWidget suggested here is not available
> from Python right? (since it's not a vtkObject).
> The OP asked about Python, and I'm sort of in the same boat.
> > 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:
> >> Thank you,
> >> Steve
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers