remove override of devicePixelRatio()

This commit is contained in:
KIU Shueng Chuan 2021-07-17 18:55:55 +08:00
parent aca627ac8c
commit 5283eeb71b

View File

@ -72,11 +72,11 @@ class GLViewWidget(QtWidgets.QOpenGLWidget):
self._updateScreen(window.screen())
def deviceWidth(self):
dpr = self.devicePixelRatio()
dpr = self.devicePixelRatioF()
return int(self.width() * dpr)
def deviceHeight(self):
dpr = self.devicePixelRatio()
dpr = self.devicePixelRatioF()
return int(self.height() * dpr)
def reset(self):
@ -149,9 +149,6 @@ class GLViewWidget(QtWidgets.QOpenGLWidget):
else:
return vp
def devicePixelRatio(self):
return self.devicePixelRatioF()
def setProjection(self, region=None):
m = self.projectionMatrix(region)
glMatrixMode(GL_PROJECTION)