[vtkusers] QVTKWidget2 and wheel Event

Doug Hoppes dhoppes at mbfbioscience.com
Tue Apr 17 14:50:30 EDT 2012


Thanks... I'll take a look at the QVTKInteractorAdapter.  I'm just surprised that I can't just do pass-through of the event.  I'm assuming that this will be true with the mouse-click events.  For those events, I was going to check to make sure that I didn't have a QGraphicsItem under my mouse and, if there wasn't any, send the message to the VTK window.

Doug

-----Original Message-----
From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf Of Clinton Stimpson
Sent: Tuesday, April 17, 2012 2:44 PM
To: vtkusers at vtk.org
Subject: Re: [vtkusers] QVTKWidget2 and wheel Event

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
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers



More information about the vtkusers mailing list