summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2024-05-13 20:12:32 +0200
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2024-05-21 21:47:06 +0200
commit2422f8b18dd325e5ac7d0adff39b2c93a8f75466 (patch)
tree5664b739db3862e8b36207c48fdb2cc275cfbac4 /src/gui
parent71d0de98359decfcc9be01a0ed5823a9595ef5d4 (diff)
QIcon: Adjust documentation of QIcon::pixmap()
The documentation of QIcon::pixmap() taking a devicePixelRatio could be read in the way that a QPixmap of the requested size and devicePixelRatio is generated which is not true. The generation part is only valid for the given mode and state. Pick-to: 6.7 6.5 Change-Id: I5374cd7be17c32cd87d7b35552e60a4c07ebe6b2 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch> Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qicon.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index 3fc29ee10d..82e78409f2 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -864,7 +864,9 @@ QPixmap QIcon::pixmap(const QSize &size, Mode mode, State state) const
\since 6.0
Returns a pixmap with the requested \a size, \a devicePixelRatio, \a mode, and \a
- state, generating one if necessary.
+ state, generating one with the given \a mode and \a state if necessary. The pixmap
+ might be smaller than requested, but never larger, unless the device-pixel ratio
+ of the returned pixmap is larger than 1.
\sa actualSize(), paint()
*/