[vtkusers] Re : QVTKWidget and keyboard event

R M mlokida at yahoo.fr
Thu Nov 10 08:53:07 EST 2011


I do this:
p_qvtkWidget->GetRenderWindow()->GetInteractor()->SetInteractorStyle(p_myInteractorStyleRubberBand3D);



________________________________
De : Jothybasu Selvaraj <jothybasu at gmail.com>
À : R M <mlokida at yahoo.fr>
Cc : "vtkusers at vtk.org" <vtkusers at vtk.org>
Envoyé le : Jeudi 10 Novembre 2011 14h33
Objet : Re: [vtkusers] QVTKWidget and keyboard event

Have you set the interactor properly in the QVTKWidget?

Jothy

On 11/10/11, R M <mlokida at yahoo.fr> wrote:
> Hello,
>
> I have an application with QT widgets and a QVTKWidget.
>
> When I click on the QT widgets (focus one them) and then when I press a
> keyboard key in order to make a specific action on my QTVTKWidget, the
> pressed key is not detected by vtk.
> I have tried the setFocusPolicy with Qt::StrongFocus ont the QVTKWidget
> instance but with no success. I have also tried the activateWindow on the
> QVTKWidget instance when keyPressEvent is call on the QMainWindow.
>
> What should I do in order to detect the keyboard press event in vtk when I
> have no focus on my QVTKWidget ?
>
> Thank you.


-- 
Jothy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111110/53c3ead9/attachment.htm>


More information about the vtkusers mailing list