diff options
Diffstat (limited to 'src/opengl/qgl.cpp')
-rw-r--r-- | src/opengl/qgl.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index eae9a4c228..d84b59efff 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -4357,8 +4357,7 @@ void QGLWidget::resizeOverlayGL(int, int) { } -/*! - Handles the event \a e passed as a parameter. +/*!\reimp */ bool QGLWidget::event(QEvent *e) { @@ -4500,7 +4499,7 @@ QImage QGLWidget::grabFrameBuffer(bool withAlpha) { makeCurrent(); QImage res; - qreal pixelRatio = devicePixelRatio(); + qreal pixelRatio = devicePixelRatioF(); int w = pixelRatio * width(); int h = pixelRatio * height(); if (format().rgba()) @@ -4913,7 +4912,7 @@ void QGLWidget::renderText(double x, double y, double z, const QString &str, con GLdouble win_x = 0, win_y = 0, win_z = 0; qgluProject(x, y, z, &model[0], &proj[0], &view[0], &win_x, &win_y, &win_z); - const int dpr = d->glcx->device()->devicePixelRatio(); + const int dpr = d->glcx->device()->devicePixelRatioF(); win_x /= dpr; win_y /= dpr; win_y = height - win_y; // y is inverted |