From 951d49075066cf8f66906c803c32cc2c52fd8e18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Thu, 12 Sep 2019 12:16:43 +0200 Subject: High-DPI: Enable AA_UseHighDpiPixmaps by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The effect of this is that QIcon::pixmap() will/may return a pixmap larger than the requested size (with an appropriate devicePixelRatio set), suitable for high-dpi displays. Many use cases, such as painting the image with QPainter, will be unaffected by this change. User code which e.g. iterate over image pixels may have to be updated. Change-Id: I63e867cc1e3f2a0b5cad92e1ffab4fe4de33ae19 Reviewed-by: Tor Arne Vestbø --- src/corelib/kernel/qcoreapplication.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/corelib/kernel/qcoreapplication.cpp') diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 09d2e194ba..fe3aa454ab 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -361,7 +361,8 @@ QAbstractEventDispatcher *QCoreApplicationPrivate::eventDispatcher = nullptr; QCoreApplication *QCoreApplication::self = nullptr; uint QCoreApplicationPrivate::attribs = (1 << Qt::AA_SynthesizeMouseForUnhandledTouchEvents) | - (1 << Qt::AA_SynthesizeMouseForUnhandledTabletEvents); + (1 << Qt::AA_SynthesizeMouseForUnhandledTabletEvents) | + (1 << Qt::AA_UseHighDpiPixmaps); struct QCoreApplicationData { QCoreApplicationData() noexcept { -- cgit v1.2.3