Qt + VTK RenderWindow ghosting

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.


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.