diff --git a/src/widgets/styles/qstyle_p.h b/src/widgets/styles/qstyle_p.h index ff8a2060522..2df2757c4e7 100644 --- a/src/widgets/styles/qstyle_p.h +++ b/src/widgets/styles/qstyle_p.h @@ -57,7 +57,8 @@ class Q_WIDGETS_EXPORT QCachedPainter } QRect pixmapRect() const { - return QRect(0, 0, m_pixmap.width(), m_pixmap.height()); + const auto sz = m_pixmap.deviceIndependentSize(); + return QRect(0, 0, sz.width(), sz.height()); } QPainter *operator->() {