以下成员源于类 QLabel 被弃用。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。
(deprecated)
QPicture
|
picture (Qt::ReturnByValueConstant) const |
(deprecated)
QPixmap
|
pixmap (Qt::ReturnByValueConstant) const |
[since 5.15]
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.
该函数在 Qt 5.15 引入。
另请参阅 setPicture ().
[since 5.15]
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);
该函数在 Qt 5.15 引入。
另请参阅 setPixmap ().