<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div><span>I do this:</span></div><div><span>p_qvtkWidget-&gt;GetRenderWindow()-&gt;GetInteractor()-&gt;SetInteractorStyle(p_myInteractorStyleRubberBand3D);<br></span></div><div><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><font face="Arial" size="2"><hr size="1"><b><span style="font-weight:bold;">De&nbsp;:</span></b> Jothybasu Selvaraj &lt;jothybasu@gmail.com&gt;<br><b><span style="font-weight: bold;">À&nbsp;:</span></b> R M &lt;mlokida@yahoo.fr&gt;<br><b><span style="font-weight: bold;">Cc&nbsp;:</span></b> "vtkusers@vtk.org" &lt;vtkusers@vtk.org&gt;<br><b><span style="font-weight: bold;">Envoyé le :</span></b> Jeudi 10 Novembre 2011 14h33<br><b><span style="font-weight: bold;">Objet&nbsp;:</span></b> Re: [vtkusers]
 QVTKWidget and keyboard event<br></font><br>Have you set the interactor properly in the QVTKWidget?<br><br>Jothy<br><br>On 11/10/11, R M &lt;<a ymailto="mailto:mlokida@yahoo.fr" href="mailto:mlokida@yahoo.fr">mlokida@yahoo.fr</a>&gt; wrote:<br>&gt; Hello,<br>&gt;<br>&gt; I have an application with QT widgets and a QVTKWidget.<br>&gt;<br>&gt; When I click on the QT widgets (focus one them) and then when I press a<br>&gt; keyboard key in order to make a specific action on my QTVTKWidget, the<br>&gt; pressed key is not detected by vtk.<br>&gt; I have tried the setFocusPolicy with Qt::StrongFocus ont the QVTKWidget<br>&gt; instance but with no success. I have also tried the activateWindow on the<br>&gt; QVTKWidget instance when keyPressEvent is call on the QMainWindow.<br>&gt;<br>&gt; What should I do in order to detect the keyboard press event in vtk when I<br>&gt; have no focus on my QVTKWidget ?<br>&gt;<br>&gt; Thank you.<br><br><br>--
 <br>Jothy<br><br><br></div></div></div></body></html>