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

Giancarlo Amati ilferraresebono at hotmail.it
Tue Mar 2 10:19:37 EST 2010


Hi Clinton,
thanks a lot for the answer. I just would like to make an example.
Let's say that if I have a QVTKWidget in my QT interface and I press W on the keyword, that event is
detected by QT (first) which forward it to the QVTKWidget and then the interactor. is that right?

So I wonder, if I make QT managing the press of W first and then I would like QVTKWidget doing whatever is programmed to do,
would it be enough to add the correspondent handler in my QT Class (whatever it is? )

Thanks
Giancarlo

Subject: Re: [vtkusers] QT and VTK interactor how to manage the signals
From: clinton at elemtech.com
Date: Tue, 2 Mar 2010 07:59:21 -0700
CC: vtkusers at vtk.org; qt-interest at trolltech.com
To: ilferraresebono at hotmail.it




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
 		 	   		  
_________________________________________________________________
Proteggi i tuoi segreti con internet Explorer 8
http://www.microsoft.com/italy/windows/internet-explorer/features/stay-safer-online.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100302/f19f49aa/attachment.htm>


More information about the vtkusers mailing list