diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-09-01 11:35:12 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-09-01 11:35:53 +0200 |
commit | 2dfc786c26663a2d555a8c8152c5ff95a3b0672e (patch) | |
tree | fbf4d41dc1836ffa607e70e2348102066a83855c /src/gui/image/qicon.cpp | |
parent | d444bbf110e83c72d0657203896ad3c8a4cb5107 (diff) | |
parent | 1812bb968c49d50745ab2b10787320205c54f946 (diff) |
Merge remote-tracking branch 'origin/5.4' into dev
Change-Id: I2811ff0b9d4097f0be60ff16e9664a5060cff23e
Diffstat (limited to 'src/gui/image/qicon.cpp')
-rw-r--r-- | src/gui/image/qicon.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp index ac95222c99..1e4a9ebe8c 100644 --- a/src/gui/image/qicon.cpp +++ b/src/gui/image/qicon.cpp @@ -989,10 +989,16 @@ void QIcon::addPixmap(const QPixmap &pixmap, Mode mode, State state) QImageWriter::supportedImageFormats() functions to retrieve a complete list of the supported file formats. - Note: When you add a non-empty filename to a QIcon, the icon becomes + If a high resolution version of the image exists (identified by + the suffix \c @2x on the base name), it is automatically loaded + and added with the \e{device pixel ratio} set to a value of 2. + This can be disabled by setting the environment variable + \c QT_HIGHDPI_DISABLE_2X_IMAGE_LOADING (see QImageReader). + + \note When you add a non-empty filename to a QIcon, the icon becomes non-null, even if the file doesn't exist or points to a corrupt file. - \sa addPixmap() + \sa addPixmap(), QPixmap::devicePixelRatio() */ void QIcon::addFile(const QString &fileName, const QSize &size, Mode mode, State state) { |