# Qt + VTK RenderWindow ghosting

**URL:** https://discourse.vtk.org/t/qt-vtk-renderwindow-ghosting/10250
**Category:** Support
**Tags:** python, code
**Created:** [December 19, 2022, 1:29pm UTC](https://discourse.vtk.org/t/qt-vtk-renderwindow-ghosting/10250 "2022-12-19T13:29:43Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Justin\_Weber](https://discourse.vtk.org/user_avatar/discourse.vtk.org/justin_weber/32/5473_2.png) [@Justin\_Weber](https://discourse.vtk.org/u/Justin_Weber)
#### Post date: [December 19, 2022, 1:29pm UTC](https://discourse.vtk.org/t/qt-vtk-renderwindow-ghosting/10250/1 "2022-12-19T13:29:43Z")

</div>

We are having issues with ghosting when another widget is visible on top of the render window. Specifically, we have `QVTKRenderWindowInteractor` widgets in tabs. When you go to a different tab, then back to a tab with the `QVTKRenderWindowInteractor`, the previous tab’s widgets are still visible (but not interactable) on top of the `QVTKRenderWindowInteractor`. At the same time, we can show/hide a popup with another `QVTKRenderWindowInteractor` just fine.

The issue specifically happens with:  
Qt: 5.15.6  
VTK: 9.2.2  
OS: Ubunutu  
Source: conda-forge

Downgrading Qt to 5.15.4 works as expected. It also works fine on Windows/OSX, seems specific to Linux.

 ![image](https://discourse.vtk.org/uploads/default/original/2X/a/a406e0c0764799c1500128238cbc2d0f58970f96.jpeg)

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [December 20, 2022, 11:28am UTC](https://discourse.vtk.org/t/qt-vtk-renderwindow-ghosting/10250/2 "2022-12-20T11:28:01Z")

</div>

Hello,

My two cents: do a re-render of the VTK scene upon activating the tab corresponding to the render window. Supposing your tab widget is a `QTabWidget`, just connect a slot to its `currentChanged(int index)` signal. I suppose the tab of the render window has zero index. In your slot, just call `Render()` of your `vtkRenderWindow`(s) if `index == 0`.

cheers,

Paulo
