<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->GetRenderWindow()->GetInteractor()->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 :</span></b> Jothybasu Selvaraj <jothybasu@gmail.com><br><b><span style="font-weight: bold;">À :</span></b> R M <mlokida@yahoo.fr><br><b><span style="font-weight: bold;">Cc :</span></b> "vtkusers@vtk.org" <vtkusers@vtk.org><br><b><span style="font-weight: bold;">Envoyé le :</span></b> Jeudi 10 Novembre 2011 14h33<br><b><span style="font-weight: bold;">Objet :</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 <<a ymailto="mailto:mlokida@yahoo.fr" href="mailto:mlokida@yahoo.fr">mlokida@yahoo.fr</a>> wrote:<br>> Hello,<br>><br>> I have an application with QT widgets and a QVTKWidget.<br>><br>> When I click on the QT widgets (focus one them) and then when I press a<br>> keyboard key in order to make a specific action on my QTVTKWidget, the<br>> pressed key is not detected by vtk.<br>> I have tried the setFocusPolicy with Qt::StrongFocus ont the QVTKWidget<br>> instance but with no success. I have also tried the activateWindow on the<br>> QVTKWidget instance when keyPressEvent is call on the QMainWindow.<br>><br>> What should I do in order to detect the keyboard press event in vtk when I<br>> have no focus on my QVTKWidget ?<br>><br>> Thank you.<br><br><br>--
<br>Jothy<br><br><br></div></div></div></body></html>