summaryrefslogtreecommitdiffstats
path: root/examples/gui/openglwindow/openglwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/gui/openglwindow/openglwindow.cpp')
-rw-r--r--examples/gui/openglwindow/openglwindow.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/gui/openglwindow/openglwindow.cpp b/examples/gui/openglwindow/openglwindow.cpp
index 57a996a876..a0c85006bd 100644
--- a/examples/gui/openglwindow/openglwindow.cpp
+++ b/examples/gui/openglwindow/openglwindow.cpp
@@ -88,7 +88,8 @@ void OpenGLWindow::render()
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
- m_device->setSize(size());
+ m_device->setSize(size() * devicePixelRatio());
+ m_device->setDevicePixelRatio(devicePixelRatio());
QPainter painter(m_device);
render(&painter);