From e158034c078076e61aa1a6712e856a52272a9713 Mon Sep 17 00:00:00 2001 From: KIU Shueng Chuan Date: Sat, 17 Jul 2021 09:49:51 +0800 Subject: [PATCH] remove devicePixelRatio argument. only needed for Qt4 --- pyqtgraph/opengl/GLViewWidget.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pyqtgraph/opengl/GLViewWidget.py b/pyqtgraph/opengl/GLViewWidget.py index 7096b7b4..61ab2f61 100644 --- a/pyqtgraph/opengl/GLViewWidget.py +++ b/pyqtgraph/opengl/GLViewWidget.py @@ -21,10 +21,8 @@ class GLViewWidget(QtWidgets.QOpenGLWidget): ================ ============================================================== **Arguments:** parent (QObject, optional): Parent QObject. Defaults to None. - devicePixelRatio (float, optional): High-DPI displays Qt5 should automatically - detect the correct resolution. For Qt4, specify the - ``devicePixelRatio`` argument when initializing the widget - (usually this value is 1-2). Defaults to None. + devicePixelRatio No longer in use. High-DPI displays should automatically + detect the correct resolution. rotationMethod (str): Mechanimsm to drive the rotation method, options are 'euler' and 'quaternion'. Defaults to 'euler'. ================ ============================================================== @@ -46,7 +44,6 @@ class GLViewWidget(QtWidgets.QOpenGLWidget): 'azimuth': 45, ## camera's azimuthal angle in degrees ## (rotation around z-axis 0 points along x-axis) 'viewport': None, ## glViewport params; None == whole widget - 'devicePixelRatio': devicePixelRatio, 'rotationMethod': rotationMethod } self.reset() @@ -152,10 +149,6 @@ class GLViewWidget(QtWidgets.QOpenGLWidget): return tuple([int(x * dpr) for x in vp]) def devicePixelRatio(self): - dpr = self.opts['devicePixelRatio'] - if dpr is not None: - return dpr - return self.devicePixelRatioF() def resizeGL(self, w, h):