Obsolete Members for QIcon

以下成員源於類 QIcon 被棄用。 提供它們是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它們。

公共函數

(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

成員函數文檔編製

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 ().

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 ().