I strongly think that is the best way i.e. prefer QVTKOpenGLNativeWidget
over QVTKOpenGLWidget
– except when quad buffer stereo is needed. The native widget is better approach since the non-native widget relies on QWidget::createWindowContainer
which has a slew of complications including poor support on macOS and issues with how events from parent QWidget
are forwarded to the internal QWindow
.
A separate but perhaps related issue is that I think the widget naming is woefully confusing. I would expect QVTKOpenGLWidget
to be a subclass of QOpenGLWidget
but it is not. I would recommend we rename the classes as follows:
QVTKOpenGLWidget
– currently calledQVTKOpenGLNativeWidget
, subclass of QOpenGLWidgetQVTKOpenGLWindow
– subclass of QOpenGLWindow; this is same as now.QVTKOpenGLWindowContainerWidget
– this is theQWidget
subclass that usesQWidget::createWindowContainer
to internally manage aQVTKOpenGLWindow
for the actual rendering; currently calledQVTKOpenGLWidget
.