[vtkusers] vtkRenderWindowInteracotr does not return

Muhammad Jawad softplanner at gmail.com
Tue Feb 23 04:16:19 EST 2016


Dear all,

I am using Qt 5.4 with vtk 6.2 on windows. I am facing some problem using
QVtkWidget with vtkRenderWindowInteractor, It never returns once
vtkrenderwindowinteractor->start() call.

When I close the QVtkWidget or main application but it still running in
background.

my code is:


vtkImageViewer2 *imageViewer = vtkImageViewer2::New();


imageViewer->SetInputData(reader->GetOutput());


vtkRenderWindowInteractor *renderWindowInteractor =
vtkRenderWindowInteractor::New();


imageViewer->SetupInteractor(renderWindowInteractor);

QVtkWidget *engine = new QVtkWidget();

engine->SetRenderWindow(imageViewer->GetRenderWindow()); // make the
link between VTK and QT

renderWindowInteractor->SetRenderWindow(imageViewer->GetRenderWindow());

engine->show();

imageViewer->GetRenderWindow()->Render ();


//renderWindowInteractor->Initialize();

engine->GetRenderWindow()->GetInteractor()->Start();

//renderWindowInteractor->Start();


cerr<<"exit";


How I can return from vtkRenderWindowInteractor->Start() function ?



Thanks.



--

Muhammad Jawad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160223/55b28acd/attachment.html>


More information about the vtkusers mailing list