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>
bb10
Christian Ehrlicher 2024-05-13 20:12:32 +02:00
parent 71d0de9835
commit 2422f8b18d
1 changed files with 3 additions and 1 deletions

View File

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