Obsolete Members for QStyle

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

公共函数

(deprecated) virtual QPixmap standardPixmap (QStyle::StandardPixmap standardPixmap , const QStyleOption * option = nullptr, const QWidget * widget = nullptr) const = 0

成员函数文档编制

[pure virtual] QPixmap QStyle:: standardPixmap ( QStyle::StandardPixmap standardPixmap , const QStyleOption * option = nullptr, const QWidget * widget = nullptr) const

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

Returns a pixmap for the given standardPixmap .

A standard pixmap is a pixmap that can follow some existing GUI style or guideline. The option argument can be used to pass extra information required when defining the appropriate pixmap. The widget argument is optional and can also be used to aid the determination of the pixmap.

Developers calling standardPixmap() should instead call standardIcon () Developers who re-implemented standardPixmap() should instead re-implement standardIcon ().

另请参阅 standardIcon ().