Call interactor-&gt;ExitCallback() instead. That will exit immediately.<br><br>(This assumes that you have previously called interactor-&gt;Start() and that VTK is providing the message loop for you...)<br><br>See VTK/Rendering/Testing/Cxx/TestInteractorTimers.cxx for an example.<br>
<br><br>HTH,<br>David<br><br><br><div class="gmail_quote">On Fri, Jan 30, 2009 at 5:11 AM, Larcher Aurélie <span dir="ltr">&lt;<a href="mailto:aurelie.larcher@imag.fr">aurelie.larcher@imag.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">









<div link="blue" vlink="purple" lang="FR">

<div>

<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">Hi all,</span></font></p>

<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">How can I force the exit of the interactor </span></font><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-GB">vtkRenderWindowInteractor.</span></font></p>


<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">I know that if I press the 'e' key or the
'q' key, the interactor closes.</span></font></p>

<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">But I would like to use a Qt push button and not the
keyboard.</span></font></p>

<p><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial;" lang="EN-GB">I try </span></font><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;" lang="EN-GB">&nbsp;&nbsp; </span></font><font size="2" face="Courier New"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">interactor-&gt;SetKeyCode(<font color="#a31515"><span style="color: rgb(163, 21, 21);">&#39;e&#39;</span></font>);</span></font></p>


<p><font size="3" face="Times New Roman"><span style="font-size: 12pt;" lang="EN-GB">But it doesn't work.</span></font></p>

<p><font size="3" face="Times New Roman"><span style="font-size: 12pt;" lang="EN-GB">Is anybody know how to do ?</span></font></p>

<p><font size="3" face="Times New Roman"><span style="font-size: 12pt;" lang="EN-GB">Thanks,</span></font></p>

<p><font size="3" face="Times New Roman"><span style="font-size: 12pt;" lang="EN-GB">Aurélie</span></font></p>

<p><font size="3" face="Times New Roman"><span style="font-size: 12pt;" lang="EN-GB">&nbsp;</span></font></p>

</div>

</div>


<br>_______________________________________________<br>
This is the private VTK discussion list.<br>
Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br>