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.5
Change-Id: I5374cd7be17c32cd87d7b35552e60a4c07ebe6b2
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 2422f8b18dd325e5ac7d0adff39b2c93a8f75466)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Christian Ehrlicher 2024-05-13 20:12:32 +02:00 committed by Qt Cherry-pick Bot
parent 77d44dca3e
commit be509449b6

View File

@ -859,7 +859,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()
*/