The sphere scales and translates to account for the new window size, but the actual rendering frame doesn’t update.
In a slightly more complex case I’ve tried capturing the resize event of the QVTKRenderWindowInteractor and injecting all kinds of update/render calls but to no avail.
Any ideas? I’m happy to provide more information a la vtk.vtkRenderWindow.ReportCapabilities or something similar.
Indeed I am. My main monitor is 4K with a scale factor of 150%.
I changed the scale to 100% but still have the same issue.
And the issue also persists on my secondary monitor that is always at 100%.
I know there are various QT environment variables to handle scaling and hi-dpi displays, perhaps I should investigate them anyway.
Can you try a more recent version of VTK? Try vtk 9.3.0. The X logo makes me think you’re running it throug WSL? VTK doesn’t really support such configurations, maybe WSL-gui thinks your display resolution is something else.
I’ve discovered that the issue is actually independent of QT.
So using PyQt5 actually solves the issue.
Maybe the question is: What is PyQt5 doing differently from PySide2? Which I understand is not necessarily for this forum then.
This pure-VTK example has the exact same troublesome behavior:
After some experimenting I’ve found that in my actual project with a proper PySide2.QtWidgets.QMainWindow, if I override the resizeEvent method like this then the issue is resolved.
Hmm that’s strange. The pick method eventually triggers a framebuffer capture to read pixels. I guess this had an effect of resizing the framebuffer to the actual size? It could be a bug in pyside2 that occurs in remote X sessions.