以下成員源於類 QIcon 被棄用。 提供它們是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它們。
(deprecated in 6.0)
QSize
|
actualSize (QWindow * window , const QSize & size , QIcon::Mode mode = Normal, QIcon::State state = Off) const |
(deprecated in 6.0)
QPixmap
|
pixmap (QWindow * window , const QSize & size , QIcon::Mode mode = Normal, QIcon::State state = Off) const |
[deprecated in 6.0]
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 ,和 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.)
另請參閱 actualSize (), pixmap (),和 paint ().
[deprecated in 6.0]
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 ,和 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.
另請參閱 actualSize () 和 paint ().