VTK 9 + PyQt + macOS = no rendering

I did it after show() in my app, where I’m instantiating QVTKRenderWindowInteractor through pyvista, but didn’t work. I’ve tried a couple of things directly inside pyvista without luck, but I’m not very familiar with how the library is structured so I might need to spend a bit more time on that. Is there something that can be done directly inside VTK’s QVTKRenderWindowInteractor.py?

Is pyvista itself calling Initialize() or Start() on the QVTKRenderWindowInteractor before you call show()? If so, then there really isn’t anything you can do in your own code, you would have to modify pyvista.

Since QVTKRenderWindowInteractor.py does not call Start() or Initialize() itself, there’s nothing that can be done there.

Did the second TestPyQtInteractor.py that I posted work on your system? It’s the litmus test of whether the delayed Start() fix can work.

Actually, what you just said lit up the bulb for me. Pyvista is using .Initialize() and .Show() in two files, qt_plotting.py and plotting.py. One of the things I tried was to commenting them out in qt_plotting.py (while adding them after show() in my app) but missed the other one. I’ve commented out both and it now works!
Thanks for your help with the workaround David. This will keep me going until a new wheel of VTK is out. Cheers!

P.S. Only side effect I’ve seen so far is that when using a Picker the viewport turns black while dragging the selection area and goes back to normal as soon as I release

Good to hear that it’s plotting again for you.

I haven’t heard of any VTK 9 regressions related to picking or dragging. If you know the specifics about which VTK classes are involved, you can open a fresh discussion here. If the details are buried within pyvista, it would be best to follow up there.

Cheers!

Thanks David, will do that!