[vtkusers] Using vtkRenderWindow with QGraphicsView [Qt 4.4.1]

Prashanth Udupa prashanth.udupa at gmail.com
Fri Aug 29 00:52:19 EDT 2008


Hi,


I agree as well.  Its the QGraphicsScene::drawBackground that should do the
> equivalent of QGLWidget::paintGL().



Thats right. Infact QGraphicsScene::drawBackground() is called from within
QGraphicsView::drawBackground(). So if we implement the latter, the former
may never really be used. Either way drawing needs to be done in a
drawBackground() method.


See the source attached.  Where it uses a subclass of QVTKWidget as the
> viewport of the QGraphicsView.  Its not perfect, but its probably a good
> start.  For now, it just paints a QPixmap into the viewport with a VTK
> scene.



Very cool stuff.. A completely new technique this.. never thought of it...
This gives me some food for thought, will get back if I get more results /
hit road blocks.

Thanks and Regards,
Prashanth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080829/d5e7703f/attachment.htm>


More information about the vtkusers mailing list