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

成员函数文档编制

[since 5.1] 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.)

该函数在 Qt 5.1 引入。

另请参阅 actualSize (), pixmap (),和 paint ().

[since 5.1] 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.

该函数在 Qt 5.1 引入。

另请参阅 actualSize () 和 paint ().