diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-08-26 09:23:43 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-08-26 16:59:36 +0200 |
commit | f85f3acd7878f49f0878644905ca27ceb7bc0775 (patch) | |
tree | cd193a95ea5c9ef35b1570cc7fc163b0cc8d38c5 /src/gui/image/qicon.cpp | |
parent | 4017605d56f5e7769c6aa7954a285563c06646ad (diff) |
Document loading of high resolution versions of images.
Task-number: QTBUG-38858
Change-Id: I87ee18b66e137f5f5c01d77910f1a7f256b85e18
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
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) { |