Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > ff187cb994c94c614ecc64c5a8528b1b > files > 6684

qt-doc-4.8.5-10.fc18.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qtabwidget.cpp -->
  <title>Qt 4.8: QTabWidget Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtgui.html">QtGui</a></li>
<li>QTabWidget</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QTabWidget Class Reference</h1>
<!-- $$$QTabWidget-brief -->
<p>The QTabWidget class provides a stack of tabbed widgets. <a href="#details">More...</a></p>
<!-- @@@QTabWidget -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QTabWidget&gt;</span></pre><p><b>Inherits: </b><a href="qwidget.html">QWidget</a>.</p>
<ul>
<li><a href="qtabwidget-members.html">List of all members, including inherited members</a></li>
<li><a href="qtabwidget-qt3.html">Qt 3 support members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#TabPosition-enum">TabPosition</a></b> { North, South, West, East }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#TabShape-enum">TabShape</a></b> { Rounded, Triangular }</td></tr>
</table>
<a name="properties"></a>
<h2>Properties</h2>
<table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><b><a href="qtabwidget.html#count-prop">count</a></b> : const int</li>
<li class="fn"><b><a href="qtabwidget.html#currentIndex-prop">currentIndex</a></b> : int</li>
<li class="fn"><b><a href="qtabwidget.html#documentMode-prop">documentMode</a></b> : bool</li>
<li class="fn"><b><a href="qtabwidget.html#elideMode-prop">elideMode</a></b> : Qt::TextElideMode</li>
<li class="fn"><b><a href="qtabwidget.html#iconSize-prop">iconSize</a></b> : QSize</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><b><a href="qtabwidget.html#movable-prop">movable</a></b> : bool</li>
<li class="fn"><b><a href="qtabwidget.html#tabPosition-prop">tabPosition</a></b> : TabPosition</li>
<li class="fn"><b><a href="qtabwidget.html#tabShape-prop">tabShape</a></b> : TabShape</li>
<li class="fn"><b><a href="qtabwidget.html#tabsClosable-prop">tabsClosable</a></b> : bool</li>
<li class="fn"><b><a href="qtabwidget.html#usesScrollButtons-prop">usesScrollButtons</a></b> : bool</li>
</ul>
</td></tr>
</table>
<ul>
<li class="fn">58 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#QTabWidget">QTabWidget</a></b> ( QWidget * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#dtor.QTabWidget">~QTabWidget</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#addTab">addTab</a></b> ( QWidget * <i>page</i>, const QString &amp; <i>label</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#addTab-2">addTab</a></b> ( QWidget * <i>page</i>, const QIcon &amp; <i>icon</i>, const QString &amp; <i>label</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#clear">clear</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWidget * </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#cornerWidget">cornerWidget</a></b> ( Qt::Corner <i>corner</i> = Qt::TopRightCorner ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#count-prop">count</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#currentIndex-prop">currentIndex</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWidget * </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#currentWidget">currentWidget</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#documentMode-prop">documentMode</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::TextElideMode </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#elideMode-prop">elideMode</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSize </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#iconSize-prop">iconSize</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#indexOf">indexOf</a></b> ( QWidget * <i>w</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#insertTab">insertTab</a></b> ( int <i>index</i>, QWidget * <i>page</i>, const QString &amp; <i>label</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#insertTab-4">insertTab</a></b> ( int <i>index</i>, QWidget * <i>page</i>, const QIcon &amp; <i>icon</i>, const QString &amp; <i>label</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#movable-prop">isMovable</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#isTabEnabled">isTabEnabled</a></b> ( int <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#removeTab">removeTab</a></b> ( int <i>index</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#setCornerWidget">setCornerWidget</a></b> ( QWidget * <i>widget</i>, Qt::Corner <i>corner</i> = Qt::TopRightCorner )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#documentMode-prop">setDocumentMode</a></b> ( bool <i>set</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#elideMode-prop">setElideMode</a></b> ( Qt::TextElideMode )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#iconSize-prop">setIconSize</a></b> ( const QSize &amp; <i>size</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#movable-prop">setMovable</a></b> ( bool <i>movable</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#setTabEnabled">setTabEnabled</a></b> ( int <i>index</i>, bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#setTabIcon">setTabIcon</a></b> ( int <i>index</i>, const QIcon &amp; <i>icon</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#tabPosition-prop">setTabPosition</a></b> ( TabPosition )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#tabShape-prop">setTabShape</a></b> ( TabShape <i>s</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#setTabText">setTabText</a></b> ( int <i>index</i>, const QString &amp; <i>label</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#setTabToolTip">setTabToolTip</a></b> ( int <i>index</i>, const QString &amp; <i>tip</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#setTabWhatsThis">setTabWhatsThis</a></b> ( int <i>index</i>, const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#tabsClosable-prop">setTabsClosable</a></b> ( bool <i>closeable</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#usesScrollButtons-prop">setUsesScrollButtons</a></b> ( bool <i>useButtons</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QIcon </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#tabIcon">tabIcon</a></b> ( int <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> TabPosition </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#tabPosition-prop">tabPosition</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> TabShape </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#tabShape-prop">tabShape</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#tabText">tabText</a></b> ( int <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#tabToolTip">tabToolTip</a></b> ( int <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#tabWhatsThis">tabWhatsThis</a></b> ( int <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#tabsClosable-prop">tabsClosable</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#usesScrollButtons-prop">usesScrollButtons</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWidget * </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#widget">widget</a></b> ( int <i>index</i> ) const</td></tr>
</table>
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#heightForWidth">heightForWidth</a></b> ( int <i>width</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSize </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#minimumSizeHint">minimumSizeHint</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSize </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#sizeHint">sizeHint</a></b> () const</td></tr>
</table>
<ul>
<li class="fn">221 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li class="fn">13 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<a name="public-slots"></a>
<h2>Public Slots</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#currentIndex-prop">setCurrentIndex</a></b> ( int <i>index</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#setCurrentWidget">setCurrentWidget</a></b> ( QWidget * <i>widget</i> )</td></tr>
</table>
<ul>
<li class="fn">19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#currentChanged">currentChanged</a></b> ( int <i>index</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#tabCloseRequested">tabCloseRequested</a></b> ( int <i>index</i> )</td></tr>
</table>
<ul>
<li class="fn">1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#initStyleOption">initStyleOption</a></b> ( QStyleOptionTabWidgetFrame * <i>option</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#setTabBar">setTabBar</a></b> ( QTabBar * <i>tb</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTabBar * </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#tabBar">tabBar</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#tabInserted">tabInserted</a></b> ( int <i>index</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#tabRemoved">tabRemoved</a></b> ( int <i>index</i> )</td></tr>
</table>
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#changeEvent">changeEvent</a></b> ( QEvent * <i>ev</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#event">event</a></b> ( QEvent * <i>ev</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#keyPressEvent">keyPressEvent</a></b> ( QKeyEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#paintEvent">paintEvent</a></b> ( QPaintEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#resizeEvent">resizeEvent</a></b> ( QResizeEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtabwidget.html#showEvent">showEvent</a></b> ( QShowEvent * )</td></tr>
</table>
<ul>
<li class="fn">37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li class="fn">1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li class="fn">1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<a name="details"></a>
<!-- $$$QTabWidget-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QTabWidget class provides a stack of tabbed widgets.</p>
<p>A tab widget provides a tab bar (see <a href="qtabbar.html">QTabBar</a>) and a &quot;page area&quot; that is used to display pages related to each tab. By default, the tab bar is shown above the page area, but different configurations are available (see <a href="qtabwidget.html#TabPosition-enum">TabPosition</a>). Each tab is associated with a different widget (called a page). Only the current page is shown in the page area; all the other pages are hidden. The user can show a different page by clicking on its tab or by pressing its Alt+<i>letter</i> shortcut if it has one.</p>
<p>The normal way to use QTabWidget is to do the following:</p>
<ol class="1">
<li>Create a QTabWidget.</li>
<li>Create a <a href="qwidget.html">QWidget</a> for each of the pages in the tab dialog, but do not specify parent widgets for them.</li>
<li>Insert child widgets into the page widget, using layouts to position them as normal.</li>
<li>Call <a href="qtabwidget.html#addTab">addTab</a>() or <a href="qtabwidget.html#insertTab">insertTab</a>() to put the page widgets into the tab widget, giving each tab a suitable label with an optional keyboard shortcut.</li>
</ol>
<p>The position of the tabs is defined by <a href="qtabwidget.html#tabPosition-prop">tabPosition</a>, their shape by <a href="qtabwidget.html#tabShape-prop">tabShape</a>.</p>
<p>The signal <a href="qtabwidget.html#currentChanged">currentChanged</a>() is emitted when the user selects a page.</p>
<p>The current page index is available as <a href="qtabwidget.html#currentIndex-prop">currentIndex</a>(), the current page widget with <a href="qtabwidget.html#currentWidget">currentWidget</a>(). You can retrieve a pointer to a page widget with a given index using <a href="qtabwidget.html#widget">widget</a>(), and can find the index position of a widget with <a href="qtabwidget.html#indexOf">indexOf</a>(). Use <a href="qtabwidget.html#setCurrentWidget">setCurrentWidget</a>() or <a href="qtabwidget.html#currentIndex-prop">setCurrentIndex</a>() to show a particular page.</p>
<p>You can change a tab's text and icon using <a href="qtabwidget.html#setTabText">setTabText</a>() or <a href="qtabwidget.html#setTabIcon">setTabIcon</a>(). A tab and its associated page can be removed with <a href="qtabwidget.html#removeTab">removeTab</a>().</p>
<p>Each tab is either enabled or disabled at any given time (see <a href="qtabwidget.html#setTabEnabled">setTabEnabled</a>()). If a tab is enabled, the tab text is drawn normally and the user can select that tab. If it is disabled, the tab is drawn in a different way and the user cannot select that tab. Note that even if a tab is disabled, the page can still be visible, for example if all of the tabs happen to be disabled.</p>
<p>Tab widgets can be a very good way to split up a complex dialog. An alternative is to use a <a href="qstackedwidget.html">QStackedWidget</a> for which you provide some means of navigating between pages, for example, a <a href="qtoolbar.html">QToolBar</a> or a <a href="qlistwidget.html">QListWidget</a>.</p>
<p>Most of the functionality in QTabWidget is provided by a <a href="qtabbar.html">QTabBar</a> (at the top, providing the tabs) and a <a href="qstackedwidget.html">QStackedWidget</a> (most of the area, organizing the individual pages).</p>
<table class="generic" width="100%">
 <tr valign="top" class="odd"><td ><img src="images/windowsxp-tabwidget.png" alt="Screenshot of a Windows XP style tab widget" /></td><td ><img src="images/macintosh-tabwidget.png" alt="Screenshot of a Macintosh style tab widget" /></td><td ><img src="images/plastique-tabwidget.png" alt="Screenshot of a Plastique style tab widget" /></td></tr>
<tr valign="top" class="even"><td >A Windows XP style tab widget.</td><td >A Macintosh style tab widget.</td><td >A Plastique style tab widget.</td></tr>
</table>
</div>
<p><b>See also </b><a href="qtabbar.html">QTabBar</a>, <a href="qstackedwidget.html">QStackedWidget</a>, <a href="qtoolbox.html">QToolBox</a>, and <a href="dialogs-tabdialog.html">Tab Dialog Example</a>.</p>
<!-- @@@QTabWidget -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$TabPosition$$$North$$$South$$$West$$$East$$$Top$$$Bottom -->
<h3 class="fn"><a name="TabPosition-enum"></a>enum QTabWidget::<span class="name">TabPosition</span></h3>
<p>This enum type defines where <a href="qtabwidget.html">QTabWidget</a> draws the tab row:</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QTabWidget::North</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The tabs are drawn above the pages.</td></tr>
<tr><td class="topAlign"><tt>QTabWidget::South</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The tabs are drawn below the pages.</td></tr>
<tr><td class="topAlign"><tt>QTabWidget::West</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The tabs are drawn to the left of the pages.</td></tr>
<tr><td class="topAlign"><tt>QTabWidget::East</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">The tabs are drawn to the right of the pages.</td></tr>
</table>
<!-- @@@TabPosition -->
<!-- $$$TabShape$$$Rounded$$$Triangular -->
<h3 class="fn"><a name="TabShape-enum"></a>enum QTabWidget::<span class="name">TabShape</span></h3>
<p>This enum type defines the shape of the tabs:</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QTabWidget::Rounded</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The tabs are drawn with a rounded look. This is the default shape.</td></tr>
<tr><td class="topAlign"><tt>QTabWidget::Triangular</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The tabs are drawn with a triangular look.</td></tr>
</table>
<!-- @@@TabShape -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$count-prop$$$count -->
<h3 class="fn"><a name="count-prop"></a><span class="name">count</span> : const <span class="type">int</span></h3>
<p>This property holds the number of tabs in the tab bar.</p>
<p>By default, this property contains a value of 0.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>count</b></span> () const</td></tr>
</table>
<!-- @@@count -->
<!-- $$$currentIndex-prop$$$currentIndex$$$setCurrentIndexint$$$currentChangedint -->
<h3 class="fn"><a name="currentIndex-prop"></a><span class="name">currentIndex</span> : <span class="type">int</span></h3>
<p>This property holds the index position of the current tab page.</p>
<p>The current index is -1 if there is no current widget.</p>
<p>By default, this property contains a value of -1 because there are initially no tabs in the widget.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>currentIndex</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setCurrentIndex</b></span> ( int <i>index</i> )</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qtabwidget.html#currentChanged">currentChanged</a></b></span> ( int <i>index</i> )</td></tr>
</table>
<!-- @@@currentIndex -->
<!-- $$$documentMode-prop$$$documentMode$$$setDocumentModebool -->
<h3 class="fn"><a name="documentMode-prop"></a><span class="name">documentMode</span> : <span class="type">bool</span></h3>
<p>This property holds whether or not the tab widget is rendered in a mode suitable for document pages. This is the same as document mode on Mac OS X.</p>
<p>When this property is set the tab widget frame is not rendered. This mode is useful for showing document-type pages where the page covers most of the tab widget area.</p>
<p>This property was introduced in Qt 4.5.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>documentMode</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setDocumentMode</b></span> ( bool <i>set</i> )</td></tr>
</table>
<p><b>See also </b><a href="qtabwidget.html#elideMode-prop">elideMode</a>, <a href="qtabbar.html#documentMode-prop">QTabBar::documentMode</a>, <a href="qtabbar.html#usesScrollButtons-prop">QTabBar::usesScrollButtons</a>, and <a href="qstyle.html#StyleHint-enum">QStyle::SH_TabBar_PreferNoArrows</a>.</p>
<!-- @@@documentMode -->
<!-- $$$elideMode-prop$$$elideMode$$$setElideModeQt::TextElideMode -->
<h3 class="fn"><a name="elideMode-prop"></a><span class="name">elideMode</span> : <span class="type"><a href="qt.html#TextElideMode-enum">Qt::TextElideMode</a></span></h3>
<p>This property holds how to elide text in the tab bar.</p>
<p>This property controls how items are elided when there is not enough space to show them for a given tab bar size.</p>
<p>By default the value is style dependant.</p>
<p>This property was introduced in Qt 4.2.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> Qt::TextElideMode </td><td class="memItemRight bottomAlign"><span class="name"><b>elideMode</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setElideMode</b></span> ( Qt::TextElideMode )</td></tr>
</table>
<p><b>See also </b><a href="qtabbar.html#elideMode-prop">QTabBar::elideMode</a>, <a href="qtabwidget.html#usesScrollButtons-prop">usesScrollButtons</a>, and <a href="qstyle.html#StyleHint-enum">QStyle::SH_TabBar_ElideMode</a>.</p>
<!-- @@@elideMode -->
<!-- $$$iconSize-prop$$$iconSize$$$setIconSizeconstQSize& -->
<h3 class="fn"><a name="iconSize-prop"></a><span class="name">iconSize</span> : <span class="type"><a href="qsize.html">QSize</a></span></h3>
<p>This property holds the size for icons in the tab bar.</p>
<p>The default value is style-dependent. This is the maximum size that the icons will have. Icons are not scaled up if they are of smaller size.</p>
<p>This property was introduced in Qt 4.2.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QSize </td><td class="memItemRight bottomAlign"><span class="name"><b>iconSize</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setIconSize</b></span> ( const QSize &amp; <i>size</i> )</td></tr>
</table>
<p><b>See also </b><a href="qtabbar.html#iconSize-prop">QTabBar::iconSize</a>.</p>
<!-- @@@iconSize -->
<!-- $$$movable-prop$$$isMovable$$$setMovablebool -->
<h3 class="fn"><a name="movable-prop"></a><span class="name">movable</span> : <span class="type">bool</span></h3>
<p>This property holds this property holds whether the user can move the tabs within the tabbar area.</p>
<p>By default, this property is false;</p>
<p>This property was introduced in Qt 4.5.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isMovable</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setMovable</b></span> ( bool <i>movable</i> )</td></tr>
</table>
<!-- @@@movable -->
<!-- $$$tabPosition-prop$$$tabPosition$$$setTabPositionTabPosition -->
<h3 class="fn"><a name="tabPosition-prop"></a><span class="name">tabPosition</span> : <span class="type"><a href="qtabwidget.html#TabPosition-enum">TabPosition</a></span></h3>
<p>This property holds the position of the tabs in this tab widget.</p>
<p>Possible values for this property are described by the <a href="qtabwidget.html#TabPosition-enum">TabPosition</a> enum.</p>
<p>By default, this property is set to <a href="qtabwidget.html#TabPosition-enum">North</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> TabPosition </td><td class="memItemRight bottomAlign"><span class="name"><b>tabPosition</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setTabPosition</b></span> ( TabPosition )</td></tr>
</table>
<p><b>See also </b><a href="qtabwidget.html#TabPosition-enum">TabPosition</a>.</p>
<!-- @@@tabPosition -->
<!-- $$$tabShape-prop$$$tabShape$$$setTabShapeTabShape -->
<h3 class="fn"><a name="tabShape-prop"></a><span class="name">tabShape</span> : <span class="type"><a href="qtabwidget.html#TabShape-enum">TabShape</a></span></h3>
<p>This property holds the shape of the tabs in this tab widget.</p>
<p>Possible values for this property are <a href="qtabwidget.html#TabShape-enum">QTabWidget::Rounded</a> (default) or <a href="qtabwidget.html#TabShape-enum">QTabWidget::Triangular</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> TabShape </td><td class="memItemRight bottomAlign"><span class="name"><b>tabShape</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setTabShape</b></span> ( TabShape <i>s</i> )</td></tr>
</table>
<p><b>See also </b><a href="qtabwidget.html#TabShape-enum">TabShape</a>.</p>
<!-- @@@tabShape -->
<!-- $$$tabsClosable-prop$$$tabsClosable$$$setTabsClosablebool -->
<h3 class="fn"><a name="tabsClosable-prop"></a><span class="name">tabsClosable</span> : <span class="type">bool</span></h3>
<p>This property holds whether close buttons are automatically added to each tab.</p>
<p>This property was introduced in Qt 4.5.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>tabsClosable</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setTabsClosable</b></span> ( bool <i>closeable</i> )</td></tr>
</table>
<p><b>See also </b><a href="qtabbar.html#tabsClosable-prop">QTabBar::tabsClosable</a>().</p>
<!-- @@@tabsClosable -->
<!-- $$$usesScrollButtons-prop$$$usesScrollButtons$$$setUsesScrollButtonsbool -->
<h3 class="fn"><a name="usesScrollButtons-prop"></a><span class="name">usesScrollButtons</span> : <span class="type">bool</span></h3>
<p>This property holds whether or not a tab bar should use buttons to scroll tabs when it has many tabs.</p>
<p>When there are too many tabs in a tab bar for its size, the tab bar can either choose to expand its size or to add buttons that allow you to scroll through the tabs.</p>
<p>By default the value is style dependant.</p>
<p>This property was introduced in Qt 4.2.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>usesScrollButtons</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setUsesScrollButtons</b></span> ( bool <i>useButtons</i> )</td></tr>
</table>
<p><b>See also </b><a href="qtabwidget.html#elideMode-prop">elideMode</a>, <a href="qtabbar.html#usesScrollButtons-prop">QTabBar::usesScrollButtons</a>, and <a href="qstyle.html#StyleHint-enum">QStyle::SH_TabBar_PreferNoArrows</a>.</p>
<!-- @@@usesScrollButtons -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QTabWidget[overload1]$$$QTabWidgetQWidget* -->
<h3 class="fn"><a name="QTabWidget"></a>QTabWidget::<span class="name">QTabWidget</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs a tabbed widget with parent <i>parent</i>.</p>
<!-- @@@QTabWidget -->
<!-- $$$~QTabWidget[overload1]$$$~QTabWidget -->
<h3 class="fn"><a name="dtor.QTabWidget"></a>QTabWidget::<span class="name">~QTabWidget</span> ()</h3>
<p>Destroys the tabbed widget.</p>
<!-- @@@~QTabWidget -->
<!-- $$$addTab[overload1]$$$addTabQWidget*constQString& -->
<h3 class="fn"><a name="addTab"></a><span class="type">int</span> QTabWidget::<span class="name">addTab</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>page</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label</i> )</h3>
<p>Adds a tab with the given <i>page</i> and <i>label</i> to the tab widget, and returns the index of the tab in the tab bar.</p>
<p>If the tab's <i>label</i> contains an ampersand, the letter following the ampersand is used as a shortcut for the tab, e.g&#x2e; if the label is &quot;Bro&amp;wse&quot; then Alt+W becomes a shortcut which will move the focus to this tab.</p>
<p><b>Note:</b> If you call addTab() after <a href="qwidget.html#show">show</a>(), 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 <a href="qwidget.html#updatesEnabled-prop">QWidget::updatesEnabled</a> 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.</p>
<p><b>See also </b><a href="qtabwidget.html#insertTab">insertTab</a>().</p>
<!-- @@@addTab -->
<!-- $$$addTab$$$addTabQWidget*constQIcon&constQString& -->
<h3 class="fn"><a name="addTab-2"></a><span class="type">int</span> QTabWidget::<span class="name">addTab</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>page</i>, const <span class="type"><a href="qicon.html">QIcon</a></span> &amp; <i>icon</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label</i> )</h3>
<p>This is an overloaded function.</p>
<p>Adds a tab with the given <i>page</i>, <i>icon</i>, and <i>label</i> to the tab widget, and returns the index of the tab in the tab bar.</p>
<p>This function is the same as <a href="qtabwidget.html#addTab">addTab</a>(), but with an additional <i>icon</i>.</p>
<!-- @@@addTab -->
<!-- $$$changeEvent[overload1]$$$changeEventQEvent* -->
<h3 class="fn"><a name="changeEvent"></a><span class="type">void</span> QTabWidget::<span class="name">changeEvent</span> ( <span class="type"><a href="qevent.html">QEvent</a></span> * <i>ev</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#changeEvent">QWidget::changeEvent</a>().</p>
<!-- @@@changeEvent -->
<!-- $$$clear[overload1]$$$clear -->
<h3 class="fn"><a name="clear"></a><span class="type">void</span> QTabWidget::<span class="name">clear</span> ()</h3>
<p>Removes all the pages, but does not delete them. Calling this function is equivalent to calling <a href="qtabwidget.html#removeTab">removeTab</a>() until the tab widget is empty.</p>
<!-- @@@clear -->
<!-- $$$cornerWidget[overload1]$$$cornerWidgetQt::Corner -->
<h3 class="fn"><a name="cornerWidget"></a><span class="type"><a href="qwidget.html">QWidget</a></span> * QTabWidget::<span class="name">cornerWidget</span> ( <span class="type"><a href="qt.html#Corner-enum">Qt::Corner</a></span> <i>corner</i> = Qt::TopRightCorner ) const</h3>
<p>Returns the widget shown in the <i>corner</i> of the tab widget or 0.</p>
<p><b>See also </b><a href="qtabwidget.html#setCornerWidget">setCornerWidget</a>().</p>
<!-- @@@cornerWidget -->
<!-- $$$currentChanged[overload1]$$$currentChangedint -->
<h3 class="fn"><a name="currentChanged"></a><span class="type">void</span> QTabWidget::<span class="name">currentChanged</span> ( <span class="type">int</span> <i>index</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the current page index changes. The parameter is the new current page <i>index</i> position, or -1 if there isn't a new one (for example, if there are no widgets in the <a href="qtabwidget.html">QTabWidget</a>)</p>
<p><b>See also </b><a href="qtabwidget.html#currentWidget">currentWidget</a>() and <a href="qtabwidget.html#currentIndex-prop">currentIndex</a>.</p>
<!-- @@@currentChanged -->
<!-- $$$currentWidget[overload1]$$$currentWidget -->
<h3 class="fn"><a name="currentWidget"></a><span class="type"><a href="qwidget.html">QWidget</a></span> * QTabWidget::<span class="name">currentWidget</span> () const</h3>
<p>Returns a pointer to the page currently being displayed by the tab dialog. The tab dialog does its best to make sure that this value is never 0 (but if you try hard enough, it can be).</p>
<p><b>See also </b><a href="qtabwidget.html#currentIndex-prop">currentIndex</a>() and <a href="qtabwidget.html#setCurrentWidget">setCurrentWidget</a>().</p>
<!-- @@@currentWidget -->
<!-- $$$event[overload1]$$$eventQEvent* -->
<h3 class="fn"><a name="event"></a><span class="type">bool</span> QTabWidget::<span class="name">event</span> ( <span class="type"><a href="qevent.html">QEvent</a></span> * <i>ev</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qobject.html#event">QObject::event</a>().</p>
<!-- @@@event -->
<!-- $$$heightForWidth[overload1]$$$heightForWidthint -->
<h3 class="fn"><a name="heightForWidth"></a><span class="type">int</span> QTabWidget::<span class="name">heightForWidth</span> ( <span class="type">int</span> <i>width</i> ) const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#heightForWidth">QWidget::heightForWidth</a>().</p>
<p>This function was introduced in Qt 4.8.</p>
<!-- @@@heightForWidth -->
<!-- $$$indexOf[overload1]$$$indexOfQWidget* -->
<h3 class="fn"><a name="indexOf"></a><span class="type">int</span> QTabWidget::<span class="name">indexOf</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>w</i> ) const</h3>
<p>Returns the index position of the page occupied by the widget <i>w</i>, or -1 if the widget cannot be found.</p>
<!-- @@@indexOf -->
<!-- $$$initStyleOption[overload1]$$$initStyleOptionQStyleOptionTabWidgetFrame* -->
<h3 class="fn"><a name="initStyleOption"></a><span class="type">void</span> QTabWidget::<span class="name">initStyleOption</span> ( <span class="type"><a href="qstyleoptiontabwidgetframe.html">QStyleOptionTabWidgetFrame</a></span> * <i>option</i> ) const<tt> [protected]</tt></h3>
<p>Initialize <i>option</i> with the values from this <a href="qtabwidget.html">QTabWidget</a>. This method is useful for subclasses when they need a <a href="qstyleoptiontabwidgetframe.html">QStyleOptionTabWidgetFrame</a>, but don't want to fill in all the information themselves.</p>
<p><b>See also </b><a href="qstyleoption.html#initFrom">QStyleOption::initFrom</a>() and <a href="qtabbar.html#initStyleOption">QTabBar::initStyleOption</a>().</p>
<!-- @@@initStyleOption -->
<!-- $$$insertTab[overload1]$$$insertTabintQWidget*constQString& -->
<h3 class="fn"><a name="insertTab"></a><span class="type">int</span> QTabWidget::<span class="name">insertTab</span> ( <span class="type">int</span> <i>index</i>, <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>page</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label</i> )</h3>
<p>Inserts a tab with the given <i>label</i> and <i>page</i> into the tab widget at the specified <i>index</i>, and returns the index of the inserted tab in the tab bar.</p>
<p>The label is displayed in the tab and may vary in appearance depending on the configuration of the tab widget.</p>
<p>If the tab's <i>label</i> contains an ampersand, the letter following the ampersand is used as a shortcut for the tab, e.g&#x2e; if the label is &quot;Bro&amp;wse&quot; then Alt+W becomes a shortcut which will move the focus to this tab.</p>
<p>If <i>index</i> is out of range, the tab is simply appended. Otherwise it is inserted at the specified position.</p>
<p>If the <a href="qtabwidget.html">QTabWidget</a> was empty before this function is called, the new page becomes the current page. Inserting a new tab at an index less than or equal to the current index will increment the current index, but keep the current page.</p>
<p><b>Note:</b> If you call insertTab() after <a href="qwidget.html#show">show</a>(), 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 <a href="qwidget.html#updatesEnabled-prop">QWidget::updatesEnabled</a> 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.</p>
<p><b>See also </b><a href="qtabwidget.html#addTab">addTab</a>().</p>
<!-- @@@insertTab -->
<!-- $$$insertTab$$$insertTabintQWidget*constQIcon&constQString& -->
<h3 class="fn"><a name="insertTab-4"></a><span class="type">int</span> QTabWidget::<span class="name">insertTab</span> ( <span class="type">int</span> <i>index</i>, <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>page</i>, const <span class="type"><a href="qicon.html">QIcon</a></span> &amp; <i>icon</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label</i> )</h3>
<p>This is an overloaded function.</p>
<p>Inserts a tab with the given <i>label</i>, <i>page</i>, and <i>icon</i> into the tab widget at the specified <i>index</i>, and returns the index of the inserted tab in the tab bar.</p>
<p>This function is the same as <a href="qtabwidget.html#insertTab">insertTab</a>(), but with an additional <i>icon</i>.</p>
<!-- @@@insertTab -->
<!-- $$$isTabEnabled[overload1]$$$isTabEnabledint -->
<h3 class="fn"><a name="isTabEnabled"></a><span class="type">bool</span> QTabWidget::<span class="name">isTabEnabled</span> ( <span class="type">int</span> <i>index</i> ) const</h3>
<p>Returns true if the page at position <i>index</i> is enabled; otherwise returns false.</p>
<p><b>See also </b><a href="qtabwidget.html#setTabEnabled">setTabEnabled</a>() and <a href="qwidget.html#enabled-prop">QWidget::isEnabled</a>().</p>
<!-- @@@isTabEnabled -->
<!-- $$$keyPressEvent[overload1]$$$keyPressEventQKeyEvent* -->
<h3 class="fn"><a name="keyPressEvent"></a><span class="type">void</span> QTabWidget::<span class="name">keyPressEvent</span> ( <span class="type"><a href="qkeyevent.html">QKeyEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#keyPressEvent">QWidget::keyPressEvent</a>().</p>
<!-- @@@keyPressEvent -->
<!-- $$$minimumSizeHint[overload1]$$$minimumSizeHint -->
<h3 class="fn"><a name="minimumSizeHint"></a><span class="type"><a href="qsize.html">QSize</a></span> QTabWidget::<span class="name">minimumSizeHint</span> () const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#minimumSizeHint-prop">QWidget::minimumSizeHint</a>().</p>
<p>Returns a suitable minimum size for the tab widget.</p>
<!-- @@@minimumSizeHint -->
<!-- $$$paintEvent[overload1]$$$paintEventQPaintEvent* -->
<h3 class="fn"><a name="paintEvent"></a><span class="type">void</span> QTabWidget::<span class="name">paintEvent</span> ( <span class="type"><a href="qpaintevent.html">QPaintEvent</a></span> * <i>event</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#paintEvent">QWidget::paintEvent</a>().</p>
<p>Paints the tab widget's tab bar in response to the paint <i>event</i>.</p>
<!-- @@@paintEvent -->
<!-- $$$removeTab[overload1]$$$removeTabint -->
<h3 class="fn"><a name="removeTab"></a><span class="type">void</span> QTabWidget::<span class="name">removeTab</span> ( <span class="type">int</span> <i>index</i> )</h3>
<p>Removes the tab at position <i>index</i> from this stack of widgets. The page widget itself is not deleted.</p>
<p><b>See also </b><a href="qtabwidget.html#addTab">addTab</a>() and <a href="qtabwidget.html#insertTab">insertTab</a>().</p>
<!-- @@@removeTab -->
<!-- $$$resizeEvent[overload1]$$$resizeEventQResizeEvent* -->
<h3 class="fn"><a name="resizeEvent"></a><span class="type">void</span> QTabWidget::<span class="name">resizeEvent</span> ( <span class="type"><a href="qresizeevent.html">QResizeEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#resizeEvent">QWidget::resizeEvent</a>().</p>
<!-- @@@resizeEvent -->
<!-- $$$setCornerWidget[overload1]$$$setCornerWidgetQWidget*Qt::Corner -->
<h3 class="fn"><a name="setCornerWidget"></a><span class="type">void</span> QTabWidget::<span class="name">setCornerWidget</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>widget</i>, <span class="type"><a href="qt.html#Corner-enum">Qt::Corner</a></span> <i>corner</i> = Qt::TopRightCorner )</h3>
<p>Sets the given <i>widget</i> to be shown in the specified <i>corner</i> of the tab widget. The geometry of the widget is determined based on the widget's <a href="qtabwidget.html#sizeHint">sizeHint</a>() and the <a href="qwidget.html#style">style</a>().</p>
<p>Only the horizontal element of the <i>corner</i> will be used.</p>
<p>Passing 0 shows no widget in the corner.</p>
<p>Any previously set corner widget is hidden.</p>
<p>All widgets set here will be deleted by the tab widget when it is destroyed unless you separately reparent the widget after setting some other corner widget (or 0).</p>
<p>Note: Corner widgets are designed for <a href="qtabwidget.html#TabPosition-enum">North</a> and <a href="qtabwidget.html#TabPosition-enum">South</a> tab positions; other orientations are known to not work properly.</p>
<p><b>See also </b><a href="qtabwidget.html#cornerWidget">cornerWidget</a>() and <a href="qtabwidget.html#tabPosition-prop">setTabPosition</a>().</p>
<!-- @@@setCornerWidget -->
<!-- $$$setCurrentWidget[overload1]$$$setCurrentWidgetQWidget* -->
<h3 class="fn"><a name="setCurrentWidget"></a><span class="type">void</span> QTabWidget::<span class="name">setCurrentWidget</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>widget</i> )<tt> [slot]</tt></h3>
<p>Makes <i>widget</i> the current widget. The <i>widget</i> used must be a page in this tab widget.</p>
<p><b>See also </b><a href="qtabwidget.html#addTab">addTab</a>(), <a href="qtabwidget.html#currentIndex-prop">setCurrentIndex</a>(), and <a href="qtabwidget.html#currentWidget">currentWidget</a>().</p>
<!-- @@@setCurrentWidget -->
<!-- $$$setTabBar[overload1]$$$setTabBarQTabBar* -->
<h3 class="fn"><a name="setTabBar"></a><span class="type">void</span> QTabWidget::<span class="name">setTabBar</span> ( <span class="type"><a href="qtabbar.html">QTabBar</a></span> * <i>tb</i> )<tt> [protected]</tt></h3>
<p>Replaces the dialog's <a href="qtabbar.html">QTabBar</a> heading with the tab bar <i>tb</i>. Note that this must be called <i>before</i> any tabs have been added, or the behavior is undefined.</p>
<p><b>See also </b><a href="qtabwidget.html#tabBar">tabBar</a>().</p>
<!-- @@@setTabBar -->
<!-- $$$setTabEnabled[overload1]$$$setTabEnabledintbool -->
<h3 class="fn"><a name="setTabEnabled"></a><span class="type">void</span> QTabWidget::<span class="name">setTabEnabled</span> ( <span class="type">int</span> <i>index</i>, <span class="type">bool</span> <i>enable</i> )</h3>
<p>If <i>enable</i> is true, the page at position <i>index</i> is enabled; otherwise the page at position <i>index</i> is disabled. The page's tab is redrawn appropriately.</p>
<p><a href="qtabwidget.html">QTabWidget</a> uses <a href="qwidget.html#enabled-prop">QWidget::setEnabled</a>() internally, rather than keeping a separate flag.</p>
<p>Note that even a disabled tab/page may be visible. If the page is visible already, <a href="qtabwidget.html">QTabWidget</a> will not hide it; if all the pages are disabled, <a href="qtabwidget.html">QTabWidget</a> will show one of them.</p>
<p><b>See also </b><a href="qtabwidget.html#isTabEnabled">isTabEnabled</a>() and <a href="qwidget.html#enabled-prop">QWidget::setEnabled</a>().</p>
<!-- @@@setTabEnabled -->
<!-- $$$setTabIcon[overload1]$$$setTabIconintconstQIcon& -->
<h3 class="fn"><a name="setTabIcon"></a><span class="type">void</span> QTabWidget::<span class="name">setTabIcon</span> ( <span class="type">int</span> <i>index</i>, const <span class="type"><a href="qicon.html">QIcon</a></span> &amp; <i>icon</i> )</h3>
<p>This is an overloaded function.</p>
<p>Sets the <i>icon</i> for the tab at position <i>index</i>.</p>
<p><b>See also </b><a href="qtabwidget.html#tabIcon">tabIcon</a>().</p>
<!-- @@@setTabIcon -->
<!-- $$$setTabText[overload1]$$$setTabTextintconstQString& -->
<h3 class="fn"><a name="setTabText"></a><span class="type">void</span> QTabWidget::<span class="name">setTabText</span> ( <span class="type">int</span> <i>index</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label</i> )</h3>
<p>Defines a new <i>label</i> for the page at position <i>index</i>'s tab.</p>
<p>If the provided text contains an ampersand character ('&amp;'), a shortcut is automatically created for it. The character that follows the '&amp;' will be used as the shortcut key. Any previous shortcut will be overwritten, or cleared if no shortcut is defined by the text. See the <a href="qshortcut.html#mnemonic">QShortcut</a> documentation for details (to display an actual ampersand, use '&amp;&amp;').</p>
<p><b>See also </b><a href="qtabwidget.html#tabText">tabText</a>().</p>
<!-- @@@setTabText -->
<!-- $$$setTabToolTip[overload1]$$$setTabToolTipintconstQString& -->
<h3 class="fn"><a name="setTabToolTip"></a><span class="type">void</span> QTabWidget::<span class="name">setTabToolTip</span> ( <span class="type">int</span> <i>index</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>tip</i> )</h3>
<p>Sets the tab tool tip for the page at position <i>index</i> to <i>tip</i>.</p>
<p><b>See also </b><a href="qtabwidget.html#tabToolTip">tabToolTip</a>().</p>
<!-- @@@setTabToolTip -->
<!-- $$$setTabWhatsThis[overload1]$$$setTabWhatsThisintconstQString& -->
<h3 class="fn"><a name="setTabWhatsThis"></a><span class="type">void</span> QTabWidget::<span class="name">setTabWhatsThis</span> ( <span class="type">int</span> <i>index</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i> )</h3>
<p>Sets the What's This help text for the page at position <i>index</i> to <i>text</i>.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qtabwidget.html#tabWhatsThis">tabWhatsThis</a>().</p>
<!-- @@@setTabWhatsThis -->
<!-- $$$showEvent[overload1]$$$showEventQShowEvent* -->
<h3 class="fn"><a name="showEvent"></a><span class="type">void</span> QTabWidget::<span class="name">showEvent</span> ( <span class="type"><a href="qshowevent.html">QShowEvent</a></span> * )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#showEvent">QWidget::showEvent</a>().</p>
<!-- @@@showEvent -->
<!-- $$$sizeHint[overload1]$$$sizeHint -->
<h3 class="fn"><a name="sizeHint"></a><span class="type"><a href="qsize.html">QSize</a></span> QTabWidget::<span class="name">sizeHint</span> () const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#sizeHint-prop">QWidget::sizeHint</a>().</p>
<!-- @@@sizeHint -->
<!-- $$$tabBar[overload1]$$$tabBar -->
<h3 class="fn"><a name="tabBar"></a><span class="type"><a href="qtabbar.html">QTabBar</a></span> * QTabWidget::<span class="name">tabBar</span> () const<tt> [protected]</tt></h3>
<p>Returns the current <a href="qtabbar.html">QTabBar</a>.</p>
<p><b>See also </b><a href="qtabwidget.html#setTabBar">setTabBar</a>().</p>
<!-- @@@tabBar -->
<!-- $$$tabCloseRequested[overload1]$$$tabCloseRequestedint -->
<h3 class="fn"><a name="tabCloseRequested"></a><span class="type">void</span> QTabWidget::<span class="name">tabCloseRequested</span> ( <span class="type">int</span> <i>index</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the close button on a tab is clicked. The <i>index</i> is the index that should be removed.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also </b><a href="qtabwidget.html#tabsClosable-prop">setTabsClosable</a>().</p>
<!-- @@@tabCloseRequested -->
<!-- $$$tabIcon[overload1]$$$tabIconint -->
<h3 class="fn"><a name="tabIcon"></a><span class="type"><a href="qicon.html">QIcon</a></span> QTabWidget::<span class="name">tabIcon</span> ( <span class="type">int</span> <i>index</i> ) const</h3>
<p>Returns the icon for the tab on the page at position <i>index</i>.</p>
<p><b>See also </b><a href="qtabwidget.html#setTabIcon">setTabIcon</a>().</p>
<!-- @@@tabIcon -->
<!-- $$$tabInserted[overload1]$$$tabInsertedint -->
<h3 class="fn"><a name="tabInserted"></a><span class="type">void</span> QTabWidget::<span class="name">tabInserted</span> ( <span class="type">int</span> <i>index</i> )<tt> [virtual protected]</tt></h3>
<p>This virtual handler is called after a new tab was added or inserted at position <i>index</i>.</p>
<p><b>See also </b><a href="qtabwidget.html#tabRemoved">tabRemoved</a>().</p>
<!-- @@@tabInserted -->
<!-- $$$tabRemoved[overload1]$$$tabRemovedint -->
<h3 class="fn"><a name="tabRemoved"></a><span class="type">void</span> QTabWidget::<span class="name">tabRemoved</span> ( <span class="type">int</span> <i>index</i> )<tt> [virtual protected]</tt></h3>
<p>This virtual handler is called after a tab was removed from position <i>index</i>.</p>
<p><b>See also </b><a href="qtabwidget.html#tabInserted">tabInserted</a>().</p>
<!-- @@@tabRemoved -->
<!-- $$$tabText[overload1]$$$tabTextint -->
<h3 class="fn"><a name="tabText"></a><span class="type"><a href="qstring.html">QString</a></span> QTabWidget::<span class="name">tabText</span> ( <span class="type">int</span> <i>index</i> ) const</h3>
<p>Returns the label text for the tab on the page at position <i>index</i>.</p>
<p><b>See also </b><a href="qtabwidget.html#setTabText">setTabText</a>().</p>
<!-- @@@tabText -->
<!-- $$$tabToolTip[overload1]$$$tabToolTipint -->
<h3 class="fn"><a name="tabToolTip"></a><span class="type"><a href="qstring.html">QString</a></span> QTabWidget::<span class="name">tabToolTip</span> ( <span class="type">int</span> <i>index</i> ) const</h3>
<p>Returns the tab tool tip for the page at position <i>index</i> or an empty string if no tool tip has been set.</p>
<p><b>See also </b><a href="qtabwidget.html#setTabToolTip">setTabToolTip</a>().</p>
<!-- @@@tabToolTip -->
<!-- $$$tabWhatsThis[overload1]$$$tabWhatsThisint -->
<h3 class="fn"><a name="tabWhatsThis"></a><span class="type"><a href="qstring.html">QString</a></span> QTabWidget::<span class="name">tabWhatsThis</span> ( <span class="type">int</span> <i>index</i> ) const</h3>
<p>Returns the What's This help text for the page at position <i>index</i>, or an empty string if no help text has been set.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qtabwidget.html#setTabWhatsThis">setTabWhatsThis</a>().</p>
<!-- @@@tabWhatsThis -->
<!-- $$$widget[overload1]$$$widgetint -->
<h3 class="fn"><a name="widget"></a><span class="type"><a href="qwidget.html">QWidget</a></span> * QTabWidget::<span class="name">widget</span> ( <span class="type">int</span> <i>index</i> ) const</h3>
<p>Returns the tab page at index position <i>index</i> or 0 if the <i>index</i> is out of range.</p>
<!-- @@@widget -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Digia, Qt and their respective logos are trademarks of Digia Plc 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>