[vtkusers] How to put Qt widgets on top of a VTK OpenGL scene

Elvis Dowson elvis.dowson at mac.com
Wed Oct 15 06:30:30 EDT 2008


Hi,
          Here's what I've found out so far. It appears to be  
feasible, I think. (fingers crossed!!) :-)

Extract from Qt 4.4.3: QGraphicsView Class Reference

By default, QGraphicsView provides a regular QWidget for the viewport  
widget. You can access this widget by calling viewport(), or you can  
replace it by calling setViewport(). To render using OpenGL, simply  
call setViewport(new QGLWidget). QGraphicsView takes ownership of the  
viewport widget.

Now QVTKWidget inherits from QWidget, so I'm thinking a test could be  
to use QVTKWidget to render a VTK actor and then get a Qt widget to  
appear next to the actor and display some actor properties when you  
double click on the actor.

Best regards,

Elvis Dowson


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081015/c9c06881/attachment.htm>


More information about the vtkusers mailing list