[vtkusers] QVTKWidget Camera vs vtkOrientationMarkerWidget

Dean Inglis inglis.dl at gmail.com
Wed Dec 28 08:35:27 EST 2016


Hi Luis,

do not call Start() on the interactor within your Qt programs as Qt
manages its own event loop.

Dean

On Tue, Dec 27, 2016 at 5:48 PM, Luis Vieira <luis.vieira at vektore.com>
wrote:

> Hello vtkusers,
>
>
>
> Anybody knows how to use vtkOrientationMarkerWidget with QVTKWidget
> interactor? I have been trying to implement the VTK example (
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/
> DisplayCoordinateAxes) and it worked smoothly. However, within  my
> QVTKWidget Camera, and I caught  the following exception:
>
>
>
> ERROR: In C:\VTK\VTK-7.0.0\GUISupport\Qt\QVTKInteractor.cxx, line 147
>
> QVTKInteractor (000000F46583D670): QVTKInteractor cannot control the event
> loop.
>
>
>
> Following my vtkOrientationMarkerWidget snapshot:
>
> vtkRenderWindow* renwin = vtkRenderWindow::New();
>
> myQVTKWidgetCAmera->SetRenderWindow(renwin);
>
> Ren1 = vtkRenderer::New();
>
> myQVTKWidgetCAmera->GetRenderWindow()->AddRenderer(Ren1);
>
>
>
> vtkAxesActor* myAxActor = vtkAxesActor::New();
>
> vtkSmartPointer<vtkOrientationMarkerWidget> myWidget = vtkSmartPointer<
> vtkOrientationMarkerWidget>::New();
>
>               myWidget ->SetOrientationMarker(myAxActor);
>
>               myWidget ->SetInteractor(myQVTKWidgetCAmera->GetRenderWindow
> ()->GetInteractor());
>
>               myWidget ->SetViewport(0.7, 0.0, 1.00, 0.3);
>
>               myWidget ->SetEnabled(1);
>
>               myWidget ->InteractiveOn();
>
>
>
> Ren1->ResetCamera();
>
> Ren1->Render();
>
>
>
> myQVTKWidgetCAmera->GetRenderWindow()->GetInteractor()->Start();
>
>
>
> Thank you very much for any help,
>
>
>
>
>
> *Luis Vieira*,
>
> Consultant, Software Engineer
>
> Vektore Exploration Consulting Corporation
>
> ca.linkedin.com/in/joaoluisvieira
>
> luis.vieira at vektore.com
>
> www.vektore.com
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20161228/be7bd783/attachment.html>


More information about the vtkusers mailing list