[vtkusers] Trouble using VTK Widget with QVTK
andyjk
andrewkeeling at hotmail.com
Thu Jul 5 06:13:20 EDT 2018
Thanks Mathieu
That was a big help.
I added the line:
QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFormat());
in main.cpp (plus a couple of includes).
then in my derived QMainWindow class I have done:
vtkNew<vtkGenericOpenGLRenderWindow> renderWindow;
/* Set up the contour stuff as before with a new interactor */
then:
renderWindow->Render();
interactor->Initialize();
contourWidget->EnabledOn();
this->ui->qvtkWidget->SetRenderWindow(renderWindow);
renderer_->ResetCamera();
This works for other widgets, but still does not work for contour widget.
The window renders and I can move the camera around etc, but left click does
nothing.
Do you think this means it is not possible to use the
PolygonalSurfaceContourLineInterpolator with a QVTKOpenGL widget either ?
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
More information about the vtkusers
mailing list