Obsolete Members for QLabel

以下成员源于类 QLabel 被弃用。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。

公共函数

(弃用) QPicture picture (Qt::ReturnByValueConstant) const
(弃用) QPixmap pixmap (Qt::ReturnByValueConstant) const

成员函数文档编制

[deprecated] QPicture QLabel:: picture ( Qt::ReturnByValueConstant ) const

This function is deprecated. We strongly advise against using it in new code.

Use the overload without argument instead.

返回标签的图片。

先前,Qt 提供版本的 picture() which returned the picture by-pointer. That version is now removed. This overload allowed to explicitly differentiate between the by-pointer function and the by-value.

另请参阅 setPicture ().

[deprecated] QPixmap QLabel:: pixmap ( Qt::ReturnByValueConstant ) const

This function is deprecated. We strongly advise against using it in new code.

Use the overload without argument instead.

Returns the label's pixmap.

先前,Qt 提供版本的 pixmap() which returned the pixmap by-pointer. That version has now been removed. This overload allowed to explicitly differentiate between the by-pointer function and the by-value.

QPixmap pixmapVal = label->pixmap(Qt::ReturnByValue);
					

另请参阅 setPixmap ().