Skip to content

Qt widgets refactor

Cleanups the QT/VTK rendering classes as follows:

  1. Consolidates rendering logic between QVTKOpenGLWindow and QVTKOpenGLNativeWidget to avoid duplication. The crux of the VTK-Qt OpenGL rendering code now sits in a new class QVTKRenderWindowAdapter. QVTKOpenGLWindow and QVTKOpenGLNativeWidget simply calls methods on QVTKRenderWindowAdapter at appropriate points in painting and resizing.

  2. QVTKRenderWindowAdapter is designed to exist together with a valid QOpenGLContext. QVTKOpenGLWindow and QVTKOpenGLNativeWidget create and destroy instances of QVTKRenderWindowAdapter every time new context is created/destroyed. This keeps code in QVTKRenderWindowAdapter simpler since it doesn't need to handle cases where context is invalid.

  3. QVTKRenderWindowAdapter uses an internal FBO to do all the rendering. This avoids issues like paraview/paraview#18513 (closed), paraview/paraview#18446 (closed).

  4. API on QVTKOpenGLWindow, QVTKOpenGLNativeWidget and QVTKOpenGLWidget has been updated to follow Qt-style for naming public methods since these classes are QObject subclasses. All non-confirming public methods have been marked as deprecated.

  5. Tests have been updated to tests all three variants i.e. QVTKOpenGLWindow, QVTKOpenGLNativeWidget and QVTKOpenGLWidget without duplicating the test code. This should make it easier to more tests that continue to consistently tests these 3 variants.

  6. Changes minimum recommended Qt version to 5.6 (Qt 5.5 is supported with limited functionality)

Edited by Utkarsh Ayachit

Merge request reports