<div dir="ltr"><div><div><div>Hi Luis,<br><br>do not call Start() on the interactor within your Qt programs as Qt<br></div></div>manages its own event loop.<br><br></div>Dean<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 27, 2016 at 5:48 PM, Luis Vieira <span dir="ltr"><<a href="mailto:luis.vieira@vektore.com" target="_blank">luis.vieira@vektore.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="#0563C1" vlink="#954F72" lang="EN-CA"><div class="m_-5000694926801952377WordSection1"><p class="MsoNormal">Hello vtkusers,<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Anybody knows how to use <span style="font-size:9.5pt;font-family:Consolas;color:#216f85;background:white">vtkOrientationMarkerWidget</span><span style="font-size:9.5pt;font-family:Consolas;color:#216f85"> </span>with QVTKWidget interactor? I have been trying to implement the VTK example (<a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/DisplayCoordinateAxes" target="_blank">http://www.vtk.org/Wiki/VTK/<wbr>Examples/Cxx/Visualization/<wbr>DisplayCoordinateAxes</a>) and it worked smoothly. However, within  my QVTKWidget Camera, and I caught  the following exception:<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">ERROR: In C:\VTK\VTK-7.0.0\GUISupport\<wbr>Qt\QVTKInteractor.cxx, line 147<u></u><u></u></p><p class="MsoNormal">QVTKInteractor (000000F46583D670): QVTKInteractor cannot control the event loop.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Following my <span style="font-size:9.5pt;font-family:Consolas;color:#216f85;background:white">vtkOrientationMarkerWidget</span><span style="font-size:9.5pt;font-family:Consolas;color:#216f85"> </span>snapshot<span style="font-size:9.5pt;font-family:Consolas;color:#216f85">:</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:#216f85;background:white">vtkRenderWindow</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">* </span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">renwin</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> = </span><span style="font-size:9.5pt;font-family:Consolas;color:#216f85;background:white">vtkRenderWindow</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">::</span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white">New</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">();</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">myQVTKWidgetCAmera</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">-></span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white">SetRenderW<wbr>indow</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">(</span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">renwin</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">);</span><u></u><u></u></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">Ren1</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> = </span><span style="font-size:9.5pt;font-family:Consolas;color:#216f85;background:white">vtkRenderer</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">::</span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white">New</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">();<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">myQVTKWidgetCAmera</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">-></span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white">GetRenderW<wbr>indow</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">()-></span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white">AddRenderer</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">(</span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">Ren1</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">);</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:#216f85;background:white">vtkAxesActor</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">* </span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">myAxActor</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> = </span><span style="font-size:9.5pt;font-family:Consolas;color:#216f85;background:white">vtkAxesActor</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">::</span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white">New</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">();</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:#216f85;background:white">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#216f85;background:white">vtkOrientation<wbr>MarkerWidget</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">> </span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">myWidget</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> = </span><span style="font-size:9.5pt;font-family:Consolas;color:#216f85;background:white">vtkSmartPointer</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#216f85;background:white">vtkOrientation<wbr>MarkerWidget</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">>::</span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white">New</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">();<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">              </span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">myWidget</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> -></span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white">SetOrientationMarker</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">(</span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">myAxAct<wbr>or</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">);<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">              </span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">myWidget</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> -></span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white">SetInteractor</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">(</span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">myQVTKWidgetCA<wbr>mera</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">-></span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white">GetRenderWindow</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">()-></span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white">GetIn<wbr>teractor</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">());<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">              </span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">myWidget</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> -></span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white">SetViewport</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">(0.7, 0.0, 1.00, 0.3);<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">              </span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">myWidget</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> -></span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white">SetEnabled</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">(1);<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">              </span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">myWidget</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white"> -></span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white">InteractiveOn</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">();</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black"><u></u> <u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">Ren1</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">-></span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white">ResetCamera</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">();<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">Ren1</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">-></span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white">Render</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">();<u></u><u></u></span></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">              <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white">myQVTKWidgetCAmera</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">-></span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white">GetRenderW<wbr>indow</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">()-></span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white">GetInteractor</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">()-></span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white">Star<wbr>t</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white">();</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black"><u></u> <u></u></span></p><p class="MsoNormal">Thank you very much for any help,<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><b><span style="font-size:12.0pt;font-family:"Times New Roman",serif">Luis Vieira</span></b><span style="font-size:12.0pt;font-family:"Times New Roman",serif">,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">Consultant, Software Engineer<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif" lang="EN-US">Vektore Exploration Consulting Corporation</span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#66696a;border:none windowtext 1.0pt;padding:0cm;background:white"><a href="http://ca.linkedin.com/in/" target="_blank">ca.linkedin.com/in/</a></span><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#333333;border:none windowtext 1.0pt;padding:0cm;background:white">joaoluisvie<wbr>ira</span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><u></u><u></u></span></p><p class="MsoNormal"><span><a href="mailto:luis.vieira@vektore.com" target="_blank"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:blue">luis.vieira@vektore.com</span></a></span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><u></u><u></u></span></p><p class="MsoNormal"><span><a href="http://www.vektore.com/" target="_blank"><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#0563c1" lang="EN-US">www.vektore.com</span></a></span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p></div></div><br>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>