High-DPI: Enable AA_UseHighDpiPixmaps by default

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ø <tor.arne.vestbo@qt.io>
This commit is contained in:
Morten Johan Sørvig 2019-09-12 12:16:43 +02:00
parent 17be43c58e
commit 951d490750

View File

@ -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 {