summaryrefslogtreecommitdiffstats
path: root/examples/opengl/grabber/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/opengl/grabber/mainwindow.cpp')
-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);