[vtkusers] Using vtkRenderWindow with QGraphicsView [Qt 4.4.1]

Prashanth Udupa prashanth.udupa at gmail.com
Thu Aug 28 03:13:46 EDT 2008


Hi All,

This months Qt Quarterly magazine had an interesting article titled
"Accelerate your Widgets with OpenGL". The article explains a way for
developers to use OpenGL viewports in QGraphicsView and layer widgets (any
QWidget) as items (instances of QGraphicsProxyWidget) on top of 3D areas.

[1]
http://labs.trolltech.com/blogs/2008/06/27/accelerate-your-widgets-with-opengl/
[2]
http://labs.trolltech.com/blogs/wp-content/uploads/2008/06/openglwidgets2.png

Anyways, I was playing around with QVTKWidget, vtkQtRenderWindow and
QGraphicsView. I thought it should be possible for us to create a subclass
of QGraphicsView that would help render VTK scenes from within the
drawBackground() method of QGraphicsView. I did give it a shot and I got
some results, but its not exactly what I want. I am able to get 3D output on
the viewport, but the items in the scene are not visible.

Could anyone please help me with this?

[3] Download the code I have so far from here:
http://www.vcreatelogic.com/oss/VTKGraphicsView.zip
     * Note, I have only tested the code on Windows so far.

Thanks and Warm Regards,
Prashanth N Udupa

prashanth.udupa at gmail.com
http://www.prashanthudupa.com
http://prashanthudupa.livejournal.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080828/1b3b00d6/attachment.htm>


More information about the vtkusers mailing list