Obsolete Members for QIcon
The following members of class QIcon are deprecated. They are provided to keep old source code working. We strongly advise against using them in new code.
Public Functions
(deprecated (6.0)) QSize | actualSize(QWindow *window, const QSize &size, QIcon::Mode mode = Normal, QIcon::State state = Off) const |
(deprecated (6.0)) QPixmap | pixmap(QWindow *window, const QSize &size, QIcon::Mode mode = Normal, QIcon::State state = Off) const |
Member Function Documentation
QSize QIcon::actualSize(QWindow *window, const QSize &size, QIcon::Mode mode = Normal, QIcon::State state = Off) const
This function is deprecated since 6.0. We strongly advise against using it in new code.
Use actualSize(size) instead.
Returns the actual size of the icon for the requested window size, mode, and state.
The pixmap can be smaller than the requested size. The returned size is in device-independent pixels (This is relevant for high-dpi pixmaps.)
See also actualSize(), pixmap(), and paint().
QPixmap QIcon::pixmap(QWindow *window, const QSize &size, QIcon::Mode mode = Normal, QIcon::State state = Off) const
This function is deprecated since 6.0. We strongly advise against using it in new code.
Use pixmap(size, devicePixelRatio) instead.
Returns a pixmap with the requested window size, mode, and state, generating one if necessary.
The pixmap can be smaller than the requested size. If window is on a high-dpi display the pixmap can be larger. In that case it will have a devicePixelRatio larger than 1.
See also actualSize() and paint().
© 2023 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.