[PYTHON] [VTK-8.2.0] QVTKRenderWindowInteractor crashes on a Remote Desktop
Running QVTKRenderWindowInteractor on a remote desktop (through RDP) raise a Qt TypeError exception The error is as follow: ![image](/uploads/d56fcae9ae10f162f1b7e1c9c2c08fa4/image.png) A simple fix can be: ```python QApplication.instance().devicePixelRatio() ``` instead of ```python QApplication.devicePixelRatio() ``` In `_getPixelRatio` method of `QVTKRenderWindowInteractor` ```python @staticmethod def _getPixelRatio(): if PyQtImpl in ["PyQt5", "PySide2"]: # Source: https://stackoverflow.com/a/40053864/3388962 pos = QCursor.pos() for screen in QApplication.screens(): rect = screen.geometry() if rect.contains(pos): return screen.devicePixelRatio() # Should never happen, but try to find a good fallback. return QApplication.devicePixelRatio() else: # Qt4 seems not to provide any cross-platform means to get the # pixel ratio. return 1. ```
issue