# QVTKOpenGLNativeWidget confusion

**URL:** https://discourse.vtk.org/t/qvtkopenglnativewidget-confusion/2010
**Category:** Support
**Created:** [October 31, 2019, 2:39am UTC](https://discourse.vtk.org/t/qvtkopenglnativewidget-confusion/2010 "2019-10-31T02:39:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![DominionSoftware](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dominionsoftware/32/1064_2.png) [@DominionSoftware](https://discourse.vtk.org/u/DominionSoftware)
#### Post date: [October 31, 2019, 2:39am UTC](https://discourse.vtk.org/t/qvtkopenglnativewidget-confusion/2010/1 "2019-10-31T02:39:56Z")

</div>

I see VTK has changed it’s Qt integration. I’m confused about how to create a multiple widget (e.g. 4 up ) medical imaging windows. Do I have 1 vtkGenericOpenGLRenderWindow shared between multiple QVTKOpenGLNativeWidgets?

I have my own Qt app with two QVTKOpenGLNativeWidgets and a splitter between them. I add a sphere (based on Bill Lorenson’s QVTKOpenGLNativeWidgets example) and nothing draws?

Anyone have a multi viewport example?

Thanks

Rick

---

<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: [October 31, 2019, 12:04pm UTC](https://discourse.vtk.org/t/qvtkopenglnativewidget-confusion/2010/2 "2019-10-31T12:04:21Z")

</div>

You cannot share `vtkGenericOpenGLRenderWindow` instances between two `QVTKOpenGLNativeWidgets`. All rendering objects in VTK cannot be shared in general. You’ll need to create different `vtkGenericOpenGLRenderWindow` instances for each of the `vtkGenericOpenGLRenderWindow` instances. You can use the same vtkSphereSource, but will need different mapper, actor and renderer for each of the `vtkGenericOpenGLRenderWindow`s.

---

<div class="post-metadata">

### Author: ![DominionSoftware](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dominionsoftware/32/1064_2.png) [@DominionSoftware](https://discourse.vtk.org/u/DominionSoftware)
#### Post date: [October 31, 2019, 1:00pm UTC](https://discourse.vtk.org/t/qvtkopenglnativewidget-confusion/2010/3 "2019-10-31T13:00:42Z")

</div>

Thanks for the info!

I was able to get my views to work – I simply had to add -\>show() to the  
`QVTKOpenGLNativeWidgets :\>}```

``

`Thanks```

``

`Rick```
