Thanks. That did the trick :-)<br><br><div class="gmail_quote">On Thu, Feb 10, 2011 at 11:46 AM, Clinton Stimpson <span dir="ltr">&lt;<a href="mailto:clinton@elemtech.com">clinton@elemtech.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On Thursday, February 10, 2011 07:17:24 am imran khan wrote:<br>
&gt; Hmmm.... that is weird as I can get mouse moves. Please see code below.<br>
&gt;<br>
&gt; vtkEventQtSlotConnect *  connections = vtkEventQtSlotConnect::New();<br>
&gt;<br>
&gt; ..  connections-&gt;Connect(interactorROI,<br>
&gt;                        vtkCommand::MouseMoveEvent,<br>
&gt;                        this,<br>
&gt;                        SLOT(handleMouseMove()));<br>
&gt;<br>
&gt; ..<br>
&gt;<br>
&gt; // The slot<br>
&gt; void myScene::handleMouseMove()<br>
&gt; {<br>
&gt;   // get event position<br>
&gt;   int event_pos[2];<br>
&gt;   interactorROI-&gt;GetEventPosition(event_pos);<br>
&gt;   qDebug(&quot;Move: x=%d : y=%d\n&quot;, event_pos[0], event_pos[1]);<br>
&gt; }<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Unfortunately the mouse release of any button is still dysfunctional, which<br>
&gt; is a travesty as this<br>
&gt; is otherwise a very useful class. I wish someone would fix this.<br>
<br>
<br>
</div>vtkEventQtSlotConnect is functional.<br>
<br>
Your problem is the vtkInteractorStyle also processes the mouse and keyboard<br>
events along with your Qt slots that you have added.<br>
<br>
When vtkInteractorStyle processes mouse down, it grabs focus of mouse and key<br>
events, so you cannot get any mouse or key events until it releases focus.<br>
<br>
For example, vtkInteractorStyleTrackballCamera::OnRightButtonDown calls<br>
this-&gt;GrabFocus(this-&gt;EventCallbackCommand)<br>
which then calls<br>
this-&gt;Interactor-&gt;GrabFocus(mouseEvents,keypressEvents)<br>
so only it can get the mouse/key events until it releases focus.<br>
<br>
If you instead do this:<br>
 connections-&gt;Connect(interactorROI-&gt;GetInteractorStyle(), ... );<br>
then you won&#39;t have this problem.  That prevents vtkInteractorStyle from<br>
processing any VTK events that you are observing.<br>
<font color="#888888"><br>
--<br>
Clinton Stimpson<br>
Elemental Technologies, Inc<br>
Computational Simulation Software, LLC<br>
<a href="http://www.csimsoft.com" target="_blank">www.csimsoft.com</a><br>
</font></blockquote></div><br>