How to put a vtkContextView into a QVTKOpenGLWidget

This is my first try using VTK in Qt, I almost copied the codes of VTKExamples/site/Cxx)/Plotting/LinePlot to my Qt program. but got an error “QVTKOpenGLNativeWidget requires a vtkGenericOpenGLRenderWindow. vtkWin32OpenGLRenderWindow is not supported” after click run. I recognized the reason is QVTKOpenGLWidget->SetRenderWindow need vtkGenericOpenGLRenderWindow type but vtkContextView->GetRenderWindow() return a vtkWin32OpenGLRenderWindow.
Anybody can help me about this? I feel a little disappointed that I can’t find out the solution after going through google search…

Best,
Carle

oooooh, I find out the solution, just to create a vtkGenericOpenGLRenderWindow for them.

1 Like