Compatibility Members for QToolBox

以下成员源于类 QToolBox are part of the Qt compatibility layer. We advise against using them in new code.

公共函数

QToolBox (QWidget * parent , const char * name , Qt::WindowFlags f = 0)
QWidget * currentItem () const
QWidget * item (int index ) const
QIcon itemIconSet (int index ) const
QString itemLabel (int index ) const
int margin () const
int removeItem (QWidget * widget )
void setCurrentItem (QWidget * widget )
void setItemIconSet (int index , const QIcon & icon )
void setItemLabel (int index , const QString & text )
void setMargin (int margin )

成员函数文档编制

QToolBox:: QToolBox ( QWidget * parent , const char * name , Qt::WindowFlags f = 0)

Constructs a toolbox called name 采用父级 parent and flags f .

QWidget * QToolBox:: currentItem () const

Use widget( currentIndex ()) instead.

另请参阅 setCurrentItem ().

QWidget * QToolBox:: item ( int index ) const

使用 widget () 代替。

QIcon QToolBox:: itemIconSet ( int index ) const

使用 itemIcon () 代替。

另请参阅 setItemIconSet ().

QString QToolBox:: itemLabel ( int index ) const

使用 itemText () 代替。

另请参阅 setItemLabel ().

int QToolBox:: margin () const

Returns the width of the margin around the contents of the widget.

使用 QWidget::getContentsMargins () 代替。

另请参阅 setMargin () 和 QWidget::getContentsMargins ().

int QToolBox:: removeItem ( QWidget * widget )

Use toolbox-> removeItem (toolbox-> indexOf (widget)) instead.

void QToolBox:: setCurrentItem ( QWidget * widget )

使用 setCurrentIndex ( indexOf (widget)) instead.

另请参阅 currentItem ().

void QToolBox:: setItemIconSet ( int index , const QIcon & icon )

使用 setItemIcon () 代替。

另请参阅 itemIconSet ().

void QToolBox:: setItemLabel ( int index , const QString & text )

使用 setItemText () 代替。

另请参阅 itemLabel ().

void QToolBox:: setMargin ( int margin )

Sets the width of the margin around the contents of the widget to margin .

使用 QWidget::setContentsMargins () 代替。

另请参阅 margin () 和 QWidget::setContentsMargins ().