Set dpr of QImage in QOpenGLWidget grabFramebuffer
The QImage returned from grabFramebuffer should have the dpr of the source. Change-Id: Iafeabc1ab4e032fc28b73307104917ba3e898ad5 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This commit is contained in:
parent
5bd41b850f
commit
a2bcf43eb9
@ -758,6 +758,7 @@ QImage QOpenGLWidgetPrivate::grabFramebuffer()
|
||||
resolveSamples();
|
||||
q->makeCurrent();
|
||||
QImage res = qt_gl_read_framebuffer(q->size() * q->devicePixelRatio(), false, false);
|
||||
res.setDevicePixelRatio(q->devicePixelRatio());
|
||||
|
||||
return res;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user