renderWindowInteractor in vtkWidget

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

renderWindowInteractor in vtkWidget

cesarrmamlaver
Hi all, I'm a new user in VTK, i need put a renderWindowInteractor in the QVTKWidget of QTCreator. I have this:


vtkSmartPointer<vtkRenderer> renderer = vtkSmartPointer<vtkRenderer>::New();
 vtkSmartPointer<vtkRenderWindow> renderWindow = vtkSmartPointer<vtkRenderWindow>::New();
 renderWindow->AddRenderer(renderer);
     
vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor =        vtkSmartPointer<vtkRenderWindowInteractor>::New();
     
renderWindowInteractor->SetRenderWindow(renderWindow);

 renderer->AddActor(actor);
 renderWindow->Render();
 renderWindowInteractor->Initialize();
 
but how I can put RenderWindowInteractor in QVTKWidget?? I tried this but don't worked.

this->qvtkWidget->GetRenderWindow()->AddRenderer(renderer);    

Sorry for my English, I from Colombia.