<div dir="ltr">Can anyone confirm QVTKWidget is not intended to be used as a local variable (see code bellow)?<div><br></div><div>I'm getting a runtime error whenever the mouse cursor moves over the QVTKWidget window.</div><div><br></div><div>-Júlio<br><div class="gmail_extra"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><br>
> VTKViewer::VTKViewer(QWidget *parent) : QWidget(parent)<br>
> {<br>
> QVTKWidget *qvtkwidget = new QVTKWidget;<br>
><br>
> auto axes = vtkSmartPointer<vtkAxesActor>::New();<br>
> axes->SetXAxisLabelText("x");<br>
> axes->SetYAxisLabelText("y");<br>
> axes->SetZAxisLabelText("z");<br>
><br>
> auto orientationMarker =<br>
> vtkSmartPointer<vtkOrientationMarkerWidget>::New();<br>
> orientationMarker->SetInteractor(qvtkwidget->GetInteractor());<br>
> orientationMarker->SetOrientationMarker(axes);<br>
> orientationMarker->SetEnabled(1);<br>
><br>
> // sphere<br>
> auto sphereSource = vtkSmartPointer<vtkSphereSource>::New();<br>
> sphereSource->SetCenter(8, 8, 8);<br>
> sphereSource->SetRadius(5.0);<br>
> auto mapper = vtkSmartPointer<vtkPolyDataMapper>::New();<br>
> mapper->SetInputConnection(sphereSource->GetOutputPort());<br>
> auto actor = vtkSmartPointer<vtkActor>::New();<br>
> actor->SetMapper(mapper);<br>
><br>
> auto renderer = vtkSmartPointer<vtkRenderer>::New();<br>
> renderer->AddActor(axes);<br>
> renderer->AddActor(actor);<br>
><br>
> vtkRenderWindow *renderWindow = qvtkwidget->GetRenderWindow();<br>
> renderWindow->AddRenderer(renderer);<br>
> }<span style="color:rgb(34,34,34)"> </span></div></div></blockquote></div></div></div></div></blockquote></div></div></div></div>