<div dir="ltr"><div><div><div><div>Hello vtk-users,<br><br></div>I'm playing around with QVTKRenderWindowInteractor and had a question about handling events.  Specifically is it possible to pick who is handling the events between PyQt and VTK?<br><br></div>For instance, say I have the following setup:<br><br></div><div><font face="monospace,monospace">class View(QMainWindow):<br><br></font></div><div><font face="monospace,monospace">  def __init__(self, ...):<br>    ...<br></font></div><div><font face="monospace,monospace">    self.vtkWidget = QVTKRenderWindowInteractor(...)<br>    ...<br><br></font></div><div><font face="monospace,monospace">  def keyPressEvent(self, e):<br>    ...<br><br></font></div><div><br></div>At the start of the application, any key press event will be handled by the keyPressEvent method.  But once I click on the vtkWidget, all events are handled by the vtkWidget's RenderWindowInteractor and there doesn't seem like a convenient way to switch control back to the main window.  At least for me, clicking on other parts of the application window does not return control to Qt.<br><br></div><div>I have noticed that if I press a button, event handling is returned to keyPressEvent, but it seems a little cumbersome to have to set up a dummy button to switch between VTK and Qt.  Is there a smarter way?<br><br></div><div>Also, if it matters, I'm using PyQt 4.11.4, VTK 5.10.0, Python 2.7.11 on a Windows 7 64-bit machine. <br></div><div><br></div><div>Thanks,<br></div><div>Evan Kao<br></div></div>