-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.11, 5.12
-
None
-
-
d8ab719c0890195cfce0fb6d4c76b3664d6f3a9d (qt/qtbase/5.15)
The test program below prints out
QPixmap(QSize(64, 64),depth=32,devicePixelRatio=4,cacheKey=0x300000003)
while one would have expected a 32x32, dpr=2 pixmap.
#include <QApplication>
#include <QIcon>
#include <QPixmap>
#include <QDebug>
int main(int argc, char *argv[])
{
// Just to control the environment; results are the same
// if the scaling comes from the screen
qunsetenv("QT_AUTO_SCREEN_SCALE_FACTOR");
qunsetenv("QT_SCREEN_SCALE_FACTORS");
QApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true);
qputenv("QT_SCALE_FACTOR", "2");
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true);
QApplication app(argc, argv);
QIcon ic = QIcon::fromTheme("edit-undo"); // A svg icon
QPixmap pm = ic.pixmap(16);
qDebug() << pm;
return 0;
}
- relates to
-
QTBUG-75824 QIcon ignores high DPI setting on pixmaps
-
- Reported
-
-
QTBUG-75039 Too large SVG icon on low-DPI monitor on Retina Mac with QIcon::fromTheme and AA_UseHighDpiPixmaps
-
- Closed
-
- resulted from
-
QTBUG-71169 QPixmap derived from QIcon behaves like QIcon when QT_SCALING_FACTOR is set
-
- Closed
-
| For Gerrit Dashboard: QTBUG-73587 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V |
| 281411,5 | Fix double scaling of SVG icons on high DPI screens | 5.14 | qt/qtbase | Status: MERGED | +2 | 0 |