If you are using Python, then you do not have to enable Qt when you build VTK. You can use the plain vanilla VTK wheel. The “VTK_GROUP_ENABLE_Qt” setting is only needed if you want to use VTK’s C++ GUI classes, and it is irrelevant to the QVTKRenderWindowInteractor.py module that is used from Python.
Please try the following example and let me know if it works for you: TestPyQtInteractor.py (2.4 KB)
I run this example and it will display a multi-faces cone. But when I scale the GUI with mouse, the GUI fails to response and freezes there. As a result, the system stops to response for all keyboard’s commands and I must reset my computer.
Does this usage of vtk has high requirements for graphics cards or other computer resources?
This is from the wheel that you build yourself? If so, did you build it from VTK 9.0.0, or did get it from one of the git branches (either ‘master’ or ‘release’)?
On my system, with the VTK release branch (will be 9.0.1), I notice that the resizing of the VTK render window is a little bit delayed compared to the resizing of the Qt window for QVTKRenderWindowInteractor.py. I can imagine that this might cause instabilities, depending on the graphics driver (it has nothing to do with VTK’s GL requirements, it implies a bug either in QVTKRenderWindowInteractor.py or in VTK itself). I’m using the amdgpu driver.
Let me try again with the VTK master to see if it also has resizing issues with QVTKRenderWindowInteractor.py.
The VTK build automatically links to the libOpenGL that exists on your system, and as far as I understand, libOpenGL automatically uses the GPU drivers that are installed. So, no, I did not do any GPU-specific configuration when I built VTK. It just uses my GPU automatically, via libOpenGL.
In any case, when I update to the VTK master branch (specifically, commit 06c1830867) I can reproduce the freeze. I have to resize the window a lot before the freeze occurs (around 30 seconds or so of continuous resizing), but I can definitely reproduce it. I didn’t see this in the release branch, but maybe I didn’t try hard enough.
I’ll look into this a bit deeper and get back to you (might take a while).