summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@digia.com>2013-05-21 18:22:27 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-23 12:49:39 +0200
commit004f25df78160d1caba2375fb2e6511a0c344bc8 (patch)
tree7d2bfd6054e38c5266a1b35f446cbde6e695c582 /examples
parent602bd9873786ccadcb67da3036329f3122555cf8 (diff)
QGLWidget: Support retina framebuffer grabbing
And update the opengl/grabber example. Task-number: QTBUG-31173 Change-Id: If09f1f3634b353d034f51240fc68be6ee7aabb48 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/opengl/grabber/mainwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/opengl/grabber/mainwindow.cpp b/examples/opengl/grabber/mainwindow.cpp
index 9f31733856..9f82ee10ba 100644
--- a/examples/opengl/grabber/mainwindow.cpp
+++ b/examples/opengl/grabber/mainwindow.cpp
@@ -175,7 +175,7 @@ QSlider *MainWindow::createSlider(const char *changedSignal,
void MainWindow::setPixmap(const QPixmap &pixmap)
{
pixmapLabel->setPixmap(pixmap);
- QSize size = pixmap.size();
+ QSize size = pixmap.size() / pixmap.devicePixelRatio();
if (size - QSize(1, 0) == pixmapLabelArea->maximumViewportSize())
size -= QSize(1, 0);
pixmapLabel->resize(size);