diff options
Diffstat (limited to 'src/widgets/kernel/qwidget_qpa.cpp')
-rw-r--r-- | src/widgets/kernel/qwidget_qpa.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp index 1374d25cef..8c31d4ad26 100644 --- a/src/widgets/kernel/qwidget_qpa.cpp +++ b/src/widgets/kernel/qwidget_qpa.cpp @@ -836,6 +836,8 @@ int QWidget::metric(PaintDeviceMetric m) const return qRound(screen->physicalDotsPerInchX()); } else if (m == PdmPhysicalDpiY) { return qRound(screen->physicalDotsPerInchY()); + } else if (m == PdmDevicePixelRatio) { + return screen->devicePixelRatio(); } else { val = QPaintDevice::metric(m);// XXX } |