# How to decide between QVTKOpenGL{Native}Widget?

**URL:** https://discourse.vtk.org/t/how-to-decide-between-qvtkopengl-native-widget/1070
**Category:** Support
**Created:** [June 3, 2019, 2:19pm UTC](https://discourse.vtk.org/t/how-to-decide-between-qvtkopengl-native-widget/1070 "2019-06-03T14:19:23Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![utkarshayachit](https://discourse.vtk.org/user_avatar/discourse.vtk.org/utkarshayachit/32/379_2.png) [@utkarshayachit](https://discourse.vtk.org/u/utkarshayachit)
#### Post date: [June 3, 2019, 3:25pm UTC](https://discourse.vtk.org/t/how-to-decide-between-qvtkopengl-native-widget/1070/4 "2019-06-03T15:25:32Z")

</div>

> [@estan](#):
>
> All in all, I now think our best course of action is to report the remaining issue we have on macOS, and move back to using the native widget in all contexts. I think that’s easier than doing it selectively only on macOS.

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:

1. `QVTKOpenGLWidget` – currently called `QVTKOpenGLNativeWidget`, subclass of QOpenGLWidget
2. `QVTKOpenGLWindow` – subclass of QOpenGLWindow; this is same as now.
3. `QVTKOpenGLWindowContainerWidget` – this is the `QWidget` subclass that uses `QWidget::createWindowContainer` to internally manage a `QVTKOpenGLWindow` for the actual rendering; currently called `QVTKOpenGLWidget`.

---

_[View the full topic](https://discourse.vtk.org/t/how-to-decide-between-qvtkopengl-native-widget/1070)._
