Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

int QTabWidget::addTab ( QWidget page,
const QString label 
) [inherited]

Adds a tab with the given page and label to the tab widget, and returns the index of the tab in the tab bar.

If the tab's label contains an ampersand, the letter following the ampersand is used as a shortcut for the tab, e.g. if the label is "Bro\&wse" then Alt+W becomes a shortcut which will move the focus to this tab.

If you call addTab() after show(), the layout system will try to adjust to the changes in its widgets hierarchy and may cause flicker. To prevent this, you can set the QWidget::updatesEnabled property to false prior to changes; remember to set the property to true when the changes are done, making the widget receive paint events again.
See also:

Definition at line 370 of file qtabwidget.cpp.

References QTabWidget::insertTab().

Referenced by AddressWidget::AddressWidget(), Q3TabDialog::addTab(), MainWindow::createLetter(), AddressWidget::setupTabs(), and TabDialog::TabDialog().

    return insertTab(-1, child, label);

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index