[vtkusers] QT and VTK interactor how to manage the signals

Clinton Stimpson clinton at elemtech.com
Tue Mar 2 09:59:21 EST 2010


On Mar 2, 2010, at 2:46 AM, Giancarlo Amati wrote:

> Hello everybody,
> 
> I've addressed this question to both the QT and VTK group. 
> I'm doing my software and the GUI is with QT while the visualization is with VTK.
> The VTK widget I used is the QVTKWidget produced when I compiled VTK using QT.
> so the problem I have is that having an interactor linked to the VTKWidget somehow it intercepts all the events for the mouse
> and for the keyboard.
> 
> What I would like to do is letting QT managing the same events capture but the vtkWindowInteractor one the interactor has them processed.

Qt is already capturing the events, but it delgates the processing of those events to vtkRenderWindowInteractor, which in turn works with vtkInteractorObservers.

If you want to customize event processing, it is recommended that you make a vtkInteractorStyle class to do that, so that any other vtkInteractorObservers you decide to use will also work.

Otherwise, if you really want to, just overload the normal QWidget functions for capturing events and process them yourself.  Its just like any other QWidget.

Clint

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


More information about the vtkusers mailing list