- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | Properties | Friends

# QTabWidget Class Reference

Search for all occurrences

## Detailed Description

Definition at line 60 of file qtabwidget.h.

`#include <qtabwidget.h>`

Inheritance diagram for QTabWidget:
[legend]

List of all members.

## Public Types
enum | TabPosition { North, South, West, East }
enum | TabShape { Rounded, Triangular }
## Public Slots
void | setCurrentIndex (int index)
void | setCurrentWidget (QWidget *widget)
## Signals
void | currentChanged (int index)
void | tabCloseRequested (int index)
## Public Member Functions
| QTabWidget (QWidget *parent=0)
| ~QTabWidget ()
int | addTab (QWidget *widget, const QString &)
int | addTab (QWidget *widget, const QIcon &icon, const QString &label)
int | insertTab (int index, QWidget *widget, const QString &)
int | insertTab (int index, QWidget *widget, const QIcon &icon, const QString &label)
void | removeTab (int index)
bool | isTabEnabled (int index) const
void | setTabEnabled (int index, bool)
QString | tabText (int index) const
void | setTabText (int index, const QString &)
QIcon | tabIcon (int index) const
void | setTabIcon (int index, const QIcon &icon)
void | setTabToolTip (int index, const QString &tip)
QString | tabToolTip (int index) const
void | setTabWhatsThis (int index, const QString &text)
QString | tabWhatsThis (int index) const
int | currentIndex () const
QWidget * | currentWidget () const
QWidget * | widget (int index) const
int | indexOf (QWidget *widget) const
int | count () const
TabPosition | tabPosition () const
void | setTabPosition (TabPosition)
bool | tabsClosable () const
void | setTabsClosable (bool closeable)
bool | isMovable () const
void | setMovable (bool movable)
TabShape | tabShape () const
void | setTabShape (TabShape s)
QSize | sizeHint () const
QSize | minimumSizeHint () const
void | setCornerWidget (QWidget *w, Qt::Corner corner=Qt::TopRightCorner)
QWidget * | cornerWidget (Qt::Corner corner=Qt::TopRightCorner) const
Qt::TextElideMode | elideMode () const
void | setElideMode (Qt::TextElideMode)
QSize | iconSize () const
void | setIconSize (const QSize &size)
bool | usesScrollButtons () const
void | setUsesScrollButtons (bool useButtons)
bool | documentMode () const
void | setDocumentMode (bool set)
void | clear ()
## Protected Member Functions
virtual void | tabInserted (int index)
virtual void | tabRemoved (int index)
void | showEvent (QShowEvent *)
void | resizeEvent (QResizeEvent *)
void | keyPressEvent (QKeyEvent *)
void | paintEvent (QPaintEvent *)
void | setTabBar (QTabBar *)
QTabBar * | tabBar () const
void | changeEvent (QEvent *)
bool | event (QEvent *)
void | initStyleOption (QStyleOptionTabWidgetFrame *option) const
## Properties
TabPosition | tabPosition
TabShape | tabShape
int | currentIndex
int | count
QSize | iconSize
Qt::TextElideMode | elideMode
bool | usesScrollButtons
bool | documentMode
bool | tabsClosable
bool | movable
## Friends
class | Q3TabDialog

## Member Enumeration Documentation

enum TabPosition

Search for all occurrences

Enumerator:

  North | Search for all occurrences
  South | Search for all occurrences
  West | Search for all occurrences
  East | Search for all occurrences

Definition at line 112 of file qtabwidget.h.

                         { North, South, West, East
    #if defined(QT3_SUPPORT) && !defined(Q_MOC_RUN)
            , Top = North, Bottom = South
    #endif
        };

enum TabShape

Search for all occurrences

Enumerator:

  Rounded | Search for all occurrences
  Triangular | Search for all occurrences

Definition at line 126 of file qtabwidget.h.

    { Rounded, Triangular };

## Constructor & Destructor Documentation

QTabWidget | ( | QWidget * | parent = `0` | ) | `[explicit]`

~QTabWidget | ( |  | ) |

## Member Function Documentation

int addTab | ( | QWidget * | widget,
|  | const QString & |
| ) |  |

Search for all occurrences

int addTab | ( | QWidget * | widget,
|  | const QIcon & | icon,
|  | const QString & | label
| ) |  |

Search for all occurrences

int insertTab | ( | int | index,
|  | QWidget * | widget,
|  | const QString & |
| ) |  |

Search for all occurrences

int insertTab | ( | int | index,
|  | QWidget * | widget,
|  | const QIcon & | icon,
|  | const QString & | label
| ) |  |

Search for all occurrences

void removeTab | ( | int | index | ) |

Search for all occurrences

bool isTabEnabled | ( | int | index | ) | const

Search for all occurrences

void setTabEnabled | ( | int | index,
|  | bool |
| ) |  |

Search for all occurrences

QString tabText | ( | int | index | ) | const

Search for all occurrences

void setTabText | ( | int | index,
|  | const QString & |
| ) |  |

Search for all occurrences

QIcon tabIcon | ( | int | index | ) | const

Search for all occurrences

void setTabIcon | ( | int | index,
|  | const QIcon & | icon
| ) |  |

Search for all occurrences

void setTabToolTip | ( | int | index,
|  | const QString & | tip
| ) |  |

Search for all occurrences

QString tabToolTip | ( | int | index | ) | const

Search for all occurrences

void setTabWhatsThis | ( | int | index,
|  | const QString & | text
| ) |  |

Search for all occurrences

QString tabWhatsThis | ( | int | index | ) | const

Search for all occurrences

int currentIndex | ( |  | ) | const

Search for all occurrences

QWidget* currentWidget | ( |  | ) | const

Search for all occurrences

QWidget* widget | ( | int | index | ) | const

Search for all occurrences

int indexOf | ( | QWidget * | widget | ) | const

Search for all occurrences

int count | ( |  | ) | const

Search for all occurrences

TabPosition tabPosition | ( |  | ) | const

Search for all occurrences

void setTabPosition | ( | TabPosition |  | ) |

Search for all occurrences

bool tabsClosable | ( |  | ) | const

Search for all occurrences

void setTabsClosable | ( | bool | closeable | ) |

Search for all occurrences

bool isMovable | ( |  | ) | const

Search for all occurrences

void setMovable | ( | bool | movable | ) |

Search for all occurrences

TabShape tabShape | ( |  | ) | const

Search for all occurrences

void setTabShape | ( | TabShape | s | ) |

Search for all occurrences

QSize sizeHint | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QWidget.

QSize minimumSizeHint | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QWidget.

void setCornerWidget | ( | QWidget * | w,
|  | Qt::Corner | corner = `Qt::TopRightCorner`
| ) |  |

Search for all occurrences

QWidget* cornerWidget | ( | Qt::Corner | corner = `Qt::TopRightCorner` | ) | const

Search for all occurrences

Qt::TextElideMode elideMode | ( |  | ) | const

Search for all occurrences

void setElideMode | ( | Qt::TextElideMode |  | ) |

Search for all occurrences

QSize iconSize | ( |  | ) | const

Search for all occurrences

void setIconSize | ( | const QSize & | size | ) |

Search for all occurrences

bool usesScrollButtons | ( |  | ) | const

Search for all occurrences

void setUsesScrollButtons | ( | bool | useButtons | ) |

Search for all occurrences

bool documentMode | ( |  | ) | const

Search for all occurrences

void setDocumentMode | ( | bool | set | ) |

Search for all occurrences

void clear | ( |  | ) |

Search for all occurrences

void setCurrentIndex | ( | int | index | ) | `[slot]`

Search for all occurrences

void setCurrentWidget | ( | QWidget * | widget | ) | `[slot]`

Search for all occurrences

void currentChanged | ( | int | index | ) | `[signal]`

Search for all occurrences

void tabCloseRequested | ( | int | index | ) | `[signal]`

Search for all occurrences

virtual void tabInserted | ( | int | index | ) | `[protected, virtual]`

Search for all occurrences

virtual void tabRemoved | ( | int | index | ) | `[protected, virtual]`

Search for all occurrences

void showEvent | ( | QShowEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void resizeEvent | ( | QResizeEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void keyPressEvent | ( | QKeyEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void paintEvent | ( | QPaintEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void setTabBar | ( | QTabBar * |  | ) | `[protected]`

Search for all occurrences

QTabBar* tabBar | ( |  | ) | const `[protected]`

Search for all occurrences

void changeEvent | ( | QEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

bool event | ( | QEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void initStyleOption | ( | QStyleOptionTabWidgetFrame * | option | ) | const `[protected]`

Search for all occurrences

## Friends And Related Function Documentation

friend class Q3TabDialog `[friend]`

Search for all occurrences

Definition at line 243 of file qtabwidget.h.

## Property Documentation

TabPosition tabPosition `[read, write]`

Search for all occurrences

Definition at line 64 of file qtabwidget.h.

TabShape tabShape `[read, write]`

Search for all occurrences

Definition at line 65 of file qtabwidget.h.

int currentIndex `[read, write]`

Search for all occurrences

Definition at line 66 of file qtabwidget.h.

int count `[read]`

Search for all occurrences

Definition at line 67 of file qtabwidget.h.

QSize iconSize `[read, write]`

Search for all occurrences

Definition at line 68 of file qtabwidget.h.

Qt::TextElideMode elideMode `[read, write]`

Search for all occurrences

Definition at line 69 of file qtabwidget.h.

bool usesScrollButtons `[read, write]`

Search for all occurrences

Definition at line 70 of file qtabwidget.h.

bool documentMode `[read, write]`

Search for all occurrences

Definition at line 71 of file qtabwidget.h.

bool tabsClosable `[read, write]`

Search for all occurrences

Definition at line 72 of file qtabwidget.h.

bool movable `[read, write]`

Search for all occurrences

Definition at line 73 of file qtabwidget.h.

The documentation for this class was generated from the following file:

- QtGui/qtabwidget.h

QTabWidget QTabWidget QTabWidget QTabWidget QTabWidget QTabWidget QTabWidget QTabWidget QTabWidget QTabWidget
QTabWidget QTabWidget QTabWidget QTabWidget QTabWidget QTabWidget QTabWidget QTabWidget QTabWidget QTabWidget