Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |

# Compatibility Members for QTabWidget

The following class members are part of the Qt 3 compatibility layer. They are provided to help you port old code to Qt 4. We strongly advise against using them in new code.

QTabWidget class reference

### Public Functions

- QTabWidget ( QWidget * parent, const char * name, Qt::WFlags f = 0 )
- void changeTab ( QWidget * widget, const QString & label )
- void changeTab ( QWidget * widget, const QIcon & icon, const QString & label )
- QWidget * currentPage () const
- int currentPageIndex () const
- void insertTab ( QWidget * widget, const QString & label, int index = -1 )
- void insertTab ( QWidget * widget, const QIcon & icon, const QString & label, int index = -1 )
- bool isTabEnabled ( QWidget * widget ) const
- QString label ( int index ) const
- int margin () const
- QWidget * page ( int index ) const
- void removeTabToolTip ( QWidget * widget )
- void setMargin ( int margin )
- void setTabEnabled ( QWidget * widget, bool b )
- void setTabIconSet ( QWidget * widget, const QIcon & icon )
- void setTabLabel ( QWidget * widget, const QString & label )
- void setTabToolTip ( QWidget * widget, const QString & tip )
- QIcon tabIconSet ( QWidget * widget ) const
- QString tabLabel ( QWidget * widget ) const
- QString tabToolTip ( QWidget * widget ) const

### Public Slots

- void removePage ( QWidget * widget )
- void setCurrentPage ( int index )
- void showPage ( QWidget * widget )

### Signals

- void currentChanged ( QWidget * widget )

## Member Function Documentation

### QTabWidget::QTabWidget ( QWidget * parent, const char * name, Qt::WFlags f = 0 )

Use one of the constructors that doesn't take the name argument and then use setObjectName() instead.

### void QTabWidget::changeTab ( QWidget * widget, const QString & label )

Use setTabText() instead.

### void QTabWidget::changeTab ( QWidget * widget, const QIcon & icon, const QString & label )

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Use setTabText() and setTabIcon() instead.

### void QTabWidget::currentChanged ( QWidget * widget ) `[signal]`

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Use currentChanged(int) instead.

### QWidget * QTabWidget::currentPage () const

Use currentWidget() instead.

### int QTabWidget::currentPageIndex () const

Use currentIndex() instead.

### void QTabWidget::insertTab ( QWidget * widget, const QString & label, int index = -1 )

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Use insertTab(index, widget, label) instead.

### void QTabWidget::insertTab ( QWidget * widget, const QIcon & icon, const QString & label, int index = -1 )

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Use insertTab(index, widget, icon, label) instead.

### bool QTabWidget::isTabEnabled ( QWidget * widget ) const

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Use isTabEnabled(tabWidget->indexOf(widget)) instead.

### QString QTabWidget::label ( int index ) const

Use tabText() instead.

### int QTabWidget::margin () const

###

### QWidget * QTabWidget::page ( int index ) const

Use widget() instead.

### void QTabWidget::removePage ( QWidget * widget ) `[slot]`

Use removeTab(indexOf(widget)) instead.

### void QTabWidget::removeTabToolTip ( QWidget * widget )

Use setTabToolTip(tabWidget->indexOf(widget), QString()) instead.

### void QTabWidget::setCurrentPage ( int index ) `[slot]`

Use setCurrentIndex() instead.

### void QTabWidget::setMargin ( int margin )

###

### void QTabWidget::setTabEnabled ( QWidget * widget, bool b )

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Use isTabEnabled(tabWidget->indexOf(widget), b) instead.

### void QTabWidget::setTabIconSet ( QWidget * widget, const QIcon & icon )

Use setTabIcon(tabWidget->indexOf(widget), icon) instead.

### void QTabWidget::setTabLabel ( QWidget * widget, const QString & label )

Use setTabText(tabWidget->indexOf(widget), label) instead.

### void QTabWidget::setTabToolTip ( QWidget * widget, const QString & tip )

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Use setTabToolTip(tabWidget->indexOf(widget), tip) instead.

### void QTabWidget::showPage ( QWidget * widget ) `[slot]`

Use setCurrentIndex(indexOf(widget)) instead.

### QIcon QTabWidget::tabIconSet ( QWidget * widget ) const

Use tabIcon(tabWidget->indexOf(widget)) instead.

### QString QTabWidget::tabLabel ( QWidget * widget ) const

Use tabText(tabWidget->indexOf(widget)) instead.

### QString QTabWidget::tabToolTip ( QWidget * widget ) const

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Use tabToolTip(tabWidget->indexOf(widget)) instead.