Perceptual Color

High DPI support

This library supports High DPI out of the box.

The only thing that requires special attention are icons.

Icon support

This library uses by default a possibly existing icon theme if available in Qt. Windows and Mac do not provide icon themes by default, while Linux usually provides them. SVG is pretty much the standard nowadays and the only reliably way to have crisp icons also on desktop scales like 1.25 or 1.5. If high-DPI icons are available depends finally on your operation system. Only if no icon at all is provided by the operation system, the library falls back to built-in high-DPI SVG icons.

Note that QSvgIconEnginePlugin is a mandatory run-time dependency (see Build instructions and requirements for details).

Qt5 legacy

While Qt6 renders icons always with high-DPI (if available), Qt5 renders icons by default in low resolution. This applies even for SVG icons on high-DPI displays! Application developers have to enable high-DPI icon rendering manually with the following code (which should be put by convention before creating the QCoreApplication object):
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);

This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:20:36 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.