[vtkusers] Using vtkRenderWindow with QGraphicsView [Qt 4.4.1]
Wagner Sales
wsales at gmail.com
Thu Aug 28 14:58:50 EDT 2008
Hi Clinton,
If you send the code to Prashant, and you can send to the list too, I think
will be useful. At least to me.
Thks,
Wagner Sales
2008/8/28 <clinton at elemtech.com>
>
> I would recommend implementing a QPaintEngine for the QVTKWidget, instead
> of
> what you're trying to do. Then it should simply be a matter of setting a
> QVTKWidget as the viewport of the QGraphicsView.
>
> I've done some experimenting with a QPaintEngine for QVTKWidget before, but
> I
> haven't done enough to get something to commit into the repository. Do you
> want some of that code to play with too?
>
> Clint
>
> > 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-ope
> >ngl/ [2]
> >
> http://labs.trolltech.com/blogs/wp-content/uploads/2008/06/openglwidgets2.p
> >ng
> >
> > 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
>
>
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080828/76abf05e/attachment.htm>
More information about the vtkusers
mailing list