[vtkusers] QVTKWidget2 and wheel Event

Clinton Stimpson clinton at elemtech.com
Tue Apr 17 14:44:25 EDT 2012


On Tuesday, April 17, 2012 12:27:56 pm Clinton Stimpson wrote:
> On Tuesday, April 17, 2012 12:07:58 pm Doug Hoppes wrote:
> > Hi all,
> > 
> >                 I'm using the example of the VTK inside of a
> >                 QGraphicsView
> > 
> > and can't seem to get the VTK system to respond to the mouse events
> > (specifically, the wheel event).  I tried having the QT widget pass the
> > wheel event to QVTKWidget2, but it's a protected function.  Anybody have
> > any idea what I'm missing?
> 
> The docs for QGraphicsView explain how to "provide your own custom scene
> interaction."  If the QVTKWidget2 is your viewport widget, and you want it
> to get those events, that falls under custom scene interaction.  By
> default the events are passed through the QGraphicsScene and onto the
> QGraphicsItems.

Oh, I see you were trying to pass it but couldn't call 
QVTKWidget2::wheelEvent().

How about just making your own QVTKInteractorAdapter and call ProcessEvent()?

-- 
Clinton Stimpson
Elemental Technologies, Inc
Computational Simulation Software, LLC
www.csimsoft.com



More information about the vtkusers mailing list