以下成員源於類 QIcon are part of the Qt compatibility layer. We advise against using them in new code.
| enum | Size { Small, Large, Automatic } |
| QPixmap | pixmap (Size size , Mode mode , State state = Off) const |
| QPixmap | pixmap (Size size , bool enabled , State state = Off) const |
| QPixmap | pixmap () const |
| void | reset (const QPixmap & pixmap , Size size ) |
| void | setPixmap (const QPixmap & pixmap , Size size , Mode mode = Normal, State state = Off) |
| void | setPixmap (const QString & fileName , Size size , Mode mode = Normal, State state = Off) |
| QSize | pixmapSize (Size which ) |
| void | setPixmapSize (Size which , const QSize & size ) |
| 常量 | 值 | 描述 |
|---|---|---|
QIcon::Small
|
0
|
使用 QStyle::pixelMetric ( QStyle::PM_SmallIconSize ) 代替。 |
QIcon::Large
|
1
|
使用 QStyle::pixelMetric ( QStyle::PM_LargeIconSize ) 代替。 |
QIcon::Automatic
|
Small
|
N/A. |
Use pixmap( QSize (...), mode , state ), where the first argument is an appropriate QSize 而不是 Size 值。
另請參閱 pixmapSize ().
Use pixmap( QSize (...), mode, state ), where the first argument is an appropriate QSize 而不是 Size value, and the second argument is QIcon::Normal or QIcon::Disabled , depending on the value of enabled .
另請參閱 pixmapSize ().
Use one of the other pixmap () overloads.
[static]
QSize
QIcon::
pixmapSize
(
Size
which
)
使用 QStyle::pixelMetric () 采用 QStyle::PM_SmallIconSize or QStyle::PM_LargeIconSize as the first argument, depending on which .
另請參閱 setPixmapSize ().
Use the constructor that takes a QPixmap and operator=().
使用 addPixmap ( pixmap , mode , state ) instead. The size 參數被忽略。
另請參閱 pixmap ().
使用 addFile ( fileName , mode , state ) instead. The size 參數被忽略。
[static]
void
QIcon::
setPixmapSize
(
Size
which
, const
QSize
&
size
)
The pixmap () function now takes a QSize 而不是 QIcon::Size , so there is no need for this function in new code.
另請參閱 pixmapSize ().