Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-updates > by-pkgid > 768f7d9f703884aa2562bf0a651086df > files > 3616

qtbase5-doc-5.9.4-1.1.mga6.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qtoolbox.cpp -->
  <title>QToolBox Class | Qt Widgets 5.9</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.9</td><td ><a href="qtwidgets-index.html">Qt Widgets</a></td><td ><a href="qtwidgets-module.html">C++ Classes</a></td><td >QToolBox</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.9.4 Reference Documentation</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<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="#reimplemented-protected-functions">Reimplemented Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QToolBox Class</h1>
<!-- $$$QToolBox-brief -->
<p>The <a href="qtoolbox.html">QToolBox</a> class provides a column of tabbed widget items. <a href="#details">More...</a></p>
<!-- @@@QToolBox -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QToolBox&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += widgets</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qframe.html">QFrame</a></td></tr></table></div><ul>
<li><a href="qtoolbox-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn"><b><a href="qtoolbox.html#count-prop">count</a></b> : const int</li>
<li class="fn"><b><a href="qtoolbox.html#currentIndex-prop">currentIndex</a></b> : int</li>
</ul>
<ul>
<li class="fn">6 properties inherited from <a href="qframe.html#properties">QFrame</a></li>
<li class="fn">59 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li class="fn">1 property inherited from <a href="../qtcore/qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtoolbox.html#QToolBox">QToolBox</a></b>(QWidget *<i>parent</i> = Q_NULLPTR, Qt::WindowFlags <i>f</i> = Qt::WindowFlags())</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtoolbox.html#dtor.QToolBox">~QToolBox</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtoolbox.html#addItem">addItem</a></b>(QWidget *<i>widget</i>, const QIcon &amp;<i>iconSet</i>, const QString &amp;<i>text</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtoolbox.html#addItem-1">addItem</a></b>(QWidget *<i>w</i>, const QString &amp;<i>text</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtoolbox.html#count-prop">count</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtoolbox.html#currentIndex-prop">currentIndex</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWidget *</td><td class="memItemRight bottomAlign"><b><a href="qtoolbox.html#currentWidget">currentWidget</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtoolbox.html#indexOf">indexOf</a></b>(QWidget *<i>widget</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtoolbox.html#insertItem">insertItem</a></b>(int <i>index</i>, QWidget *<i>widget</i>, const QIcon &amp;<i>icon</i>, const QString &amp;<i>text</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtoolbox.html#insertItem-1">insertItem</a></b>(int <i>index</i>, QWidget *<i>widget</i>, const QString &amp;<i>text</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtoolbox.html#isItemEnabled">isItemEnabled</a></b>(int <i>index</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QIcon </td><td class="memItemRight bottomAlign"><b><a href="qtoolbox.html#itemIcon">itemIcon</a></b>(int <i>index</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qtoolbox.html#itemText">itemText</a></b>(int <i>index</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qtoolbox.html#itemToolTip">itemToolTip</a></b>(int <i>index</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtoolbox.html#removeItem">removeItem</a></b>(int <i>index</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtoolbox.html#setItemEnabled">setItemEnabled</a></b>(int <i>index</i>, bool <i>enabled</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtoolbox.html#setItemIcon">setItemIcon</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="qtoolbox.html#setItemText">setItemText</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="qtoolbox.html#setItemToolTip">setItemToolTip</a></b>(int <i>index</i>, const QString &amp;<i>toolTip</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWidget *</td><td class="memItemRight bottomAlign"><b><a href="qtoolbox.html#widget">widget</a></b>(int <i>index</i>) const</td></tr>
</table></div>
<ul>
<li class="fn">14 public functions inherited from <a href="qframe.html#public-functions">QFrame</a></li>
<li class="fn">214 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li class="fn">32 public functions inherited from <a href="../qtcore/qobject.html#public-functions">QObject</a></li>
<li class="fn">14 public functions inherited from <a href="../qtgui/qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<a name="public-slots"></a>
<h2 id="public-slots">Public Slots</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtoolbox.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="qtoolbox.html#setCurrentWidget">setCurrentWidget</a></b>(QWidget *<i>widget</i>)</td></tr>
</table></div>
<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="../qtcore/qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtoolbox.html#currentChanged">currentChanged</a></b>(int <i>index</i>)</td></tr>
</table></div>
<ul>
<li class="fn">3 signals inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li class="fn">2 signals inherited from <a href="../qtcore/qobject.html#signals">QObject</a></li>
</ul>
<a name="protected-functions"></a>
<h2 id="protected-functions">Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtoolbox.html#itemInserted">itemInserted</a></b>(int <i>index</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtoolbox.html#itemRemoved">itemRemoved</a></b>(int <i>index</i>)</td></tr>
</table></div>
<a name="reimplemented-protected-functions"></a>
<h2 id="reimplemented-protected-functions">Reimplemented Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtoolbox.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="qtoolbox.html#event">event</a></b>(QEvent *<i>e</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtoolbox.html#showEvent">showEvent</a></b>(QShowEvent *<i>e</i>)</td></tr>
</table></div>
<ul>
<li class="fn">4 protected functions inherited from <a href="qframe.html#protected-functions">QFrame</a></li>
<li class="fn">35 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li class="fn">9 protected functions inherited from <a href="../qtcore/qobject.html#protected-functions">QObject</a></li>
<li class="fn">1 protected function inherited from <a href="../qtgui/qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 public variable inherited from <a href="../qtcore/qobject.html#public-variables">QObject</a></li>
<li class="fn">5 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li class="fn">10 static public members inherited from <a href="../qtcore/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>
<li class="fn">2 protected variables inherited from <a href="../qtcore/qobject.html#protected-variables">QObject</a></li>
<li class="fn">1 protected type inherited from <a href="../qtgui/qpaintdevice.html#protected-variables">QPaintDevice</a></li>
</ul>
<a name="details"></a>
<!-- $$$QToolBox-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qtoolbox.html">QToolBox</a> class provides a column of tabbed widget items.</p>
<p>A toolbox is a widget that displays a column of tabs one above the other, with the current item displayed below the current tab. Every tab has an index position within the column of tabs. A tab's item is a <a href="qwidget.html">QWidget</a>.</p>
<p>Each item has an <a href="qtoolbox.html#itemText">itemText</a>(), an optional <a href="qtoolbox.html#itemIcon">itemIcon</a>(), an optional <a href="qtoolbox.html#itemToolTip">itemToolTip</a>(), and a <a href="qtoolbox.html#widget">widget</a>(). The item's attributes can be changed with <a href="qtoolbox.html#setItemText">setItemText</a>(), <a href="qtoolbox.html#setItemIcon">setItemIcon</a>(), and <a href="qtoolbox.html#setItemToolTip">setItemToolTip</a>(). Each item can be enabled or disabled individually with <a href="qtoolbox.html#setItemEnabled">setItemEnabled</a>().</p>
<p>Items are added using <a href="qtoolbox.html#addItem">addItem</a>(), or inserted at particular positions using <a href="qtoolbox.html#insertItem">insertItem</a>(). The total number of items is given by <a href="qtoolbox.html#count-prop">count</a>(). Items can be deleted with delete, or removed from the toolbox with <a href="qtoolbox.html#removeItem">removeItem</a>(). Combining <a href="qtoolbox.html#removeItem">removeItem</a>() and <a href="qtoolbox.html#insertItem">insertItem</a>() allows you to move items to different positions.</p>
<p>The index of the current item widget is returned by <a href="qtoolbox.html#currentIndex-prop">currentIndex</a>(), and set with <a href="qtoolbox.html#currentIndex-prop">setCurrentIndex</a>(). The index of a particular item can be found using <a href="qtoolbox.html#indexOf">indexOf</a>(), and the item at a given index is returned by item().</p>
<p>The <a href="qtoolbox.html#currentChanged">currentChanged</a>() signal is emitted when the current item is changed.</p>
</div>
<p><b>See also </b><a href="qtabwidget.html">QTabWidget</a>.</p>
<!-- @@@QToolBox -->
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$count-prop$$$count -->
<h3 class="fn" id="count-prop"><a name="count-prop"></a><span class="name">count</span> : const <span class="type">int</span></h3>
<p>This property holds the number of items contained in the toolbox.</p>
<p>By default, this property has a value of 0.</p>
<p><b>Access functions:</b></p>
<div class="table"><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></div>
<!-- @@@count -->
<!-- $$$currentIndex-prop$$$currentIndex$$$setCurrentIndexint$$$currentChangedint -->
<h3 class="fn" id="currentIndex-prop"><a name="currentIndex-prop"></a><span class="name">currentIndex</span> : <span class="type">int</span></h3>
<p>This property holds the index of the current item</p>
<p>By default, for an empty toolbox, this property has a value of -1.</p>
<p><b>Access functions:</b></p>
<div class="table"><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></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qtoolbox.html#currentChanged">currentChanged</a></b></span>(int <i>index</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qtoolbox.html#indexOf">indexOf</a>() and <a href="qtoolbox.html#widget">widget</a>().</p>
<!-- @@@currentIndex -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QToolBox[overload1]$$$QToolBoxQWidget*Qt::WindowFlags -->
<h3 class="fn" id="QToolBox"><a name="QToolBox"></a>QToolBox::<span class="name">QToolBox</span>(<span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<i>parent</i> = Q_NULLPTR, <span class="type"><a href="../qtcore/qt.html#WindowType-enum">Qt::WindowFlags</a></span> <i>f</i> = Qt::WindowFlags())</h3>
<p>Constructs a new toolbox with the given <i>parent</i> and the flags, <i>f</i>.</p>
<!-- @@@QToolBox -->
<!-- $$$~QToolBox[overload1]$$$~QToolBox -->
<h3 class="fn" id="dtor.QToolBox"><a name="dtor.QToolBox"></a>QToolBox::<span class="name">~QToolBox</span>()</h3>
<p>Destroys the toolbox.</p>
<!-- @@@~QToolBox -->
<!-- $$$addItem[overload1]$$$addItemQWidget*constQIcon&constQString& -->
<h3 class="fn" id="addItem"><a name="addItem"></a><span class="type">int</span> QToolBox::<span class="name">addItem</span>(<span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<i>widget</i>, const <span class="type"><a href="../qtgui/qicon.html">QIcon</a></span> &amp;<i>iconSet</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>text</i>)</h3>
<p>Adds the <i>widget</i> in a new tab at bottom of the toolbox. The new tab's text is set to <i>text</i>, and the <i>iconSet</i> is displayed to the left of the <i>text</i>. Returns the new tab's index.</p>
<!-- @@@addItem -->
<!-- $$$addItem$$$addItemQWidget*constQString& -->
<h3 class="fn" id="addItem-1"><a name="addItem-1"></a><span class="type">int</span> QToolBox::<span class="name">addItem</span>(<span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<i>w</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>text</i>)</h3>
<p>This is an overloaded function.</p>
<p>Adds the widget <i>w</i> in a new tab at bottom of the toolbox. The new tab's text is set to <i>text</i>. Returns the new tab's index.</p>
<!-- @@@addItem -->
<!-- $$$changeEvent[overload1]$$$changeEventQEvent* -->
<h3 class="fn" id="changeEvent"><a name="changeEvent"></a><code>[virtual protected] </code><span class="type">void</span> QToolBox::<span class="name">changeEvent</span>(<span class="type"><a href="../qtcore/qevent.html">QEvent</a></span> *<i>ev</i>)</h3>
<p>Reimplemented from <a href="qwidget.html#changeEvent">QWidget::changeEvent</a>().</p>
<!-- @@@changeEvent -->
<!-- $$$currentChanged -->
<h3 class="fn" id="currentChanged"><a name="currentChanged"></a><code>[signal] </code><span class="type">void</span> QToolBox::<span class="name">currentChanged</span>(<span class="type">int</span> <i>index</i>)</h3>
<p>This signal is emitted when the current item is changed. The new current item's index is passed in <i>index</i>, or -1 if there is no current item.</p>
<p><b>Note:</b> Notifier signal for property <a href="qtoolbox.html#currentIndex-prop">currentIndex</a>. </p><!-- @@@currentChanged -->
<!-- $$$currentWidget[overload1]$$$currentWidget -->
<h3 class="fn" id="currentWidget"><a name="currentWidget"></a><span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *QToolBox::<span class="name">currentWidget</span>() const</h3>
<p>Returns a pointer to the current widget, or 0 if there is no such item.</p>
<p><b>See also </b><a href="qtoolbox.html#currentIndex-prop">currentIndex</a>() and <a href="qtoolbox.html#setCurrentWidget">setCurrentWidget</a>().</p>
<!-- @@@currentWidget -->
<!-- $$$event[overload1]$$$eventQEvent* -->
<h3 class="fn" id="event"><a name="event"></a><code>[virtual protected] </code><span class="type">bool</span> QToolBox::<span class="name">event</span>(<span class="type"><a href="../qtcore/qevent.html">QEvent</a></span> *<i>e</i>)</h3>
<p>Reimplemented from <a href="../qtcore/qobject.html#event">QObject::event</a>().</p>
<!-- @@@event -->
<!-- $$$indexOf[overload1]$$$indexOfQWidget* -->
<h3 class="fn" id="indexOf"><a name="indexOf"></a><span class="type">int</span> QToolBox::<span class="name">indexOf</span>(<span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<i>widget</i>) const</h3>
<p>Returns the index of <i>widget</i>, or -1 if the item does not exist.</p>
<!-- @@@indexOf -->
<!-- $$$insertItem[overload1]$$$insertItemintQWidget*constQIcon&constQString& -->
<h3 class="fn" id="insertItem"><a name="insertItem"></a><span class="type">int</span> QToolBox::<span class="name">insertItem</span>(<span class="type">int</span> <i>index</i>, <span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<i>widget</i>, const <span class="type"><a href="../qtgui/qicon.html">QIcon</a></span> &amp;<i>icon</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>text</i>)</h3>
<p>Inserts the <i>widget</i> at position <i>index</i>, or at the bottom of the toolbox if <i>index</i> is out of range. The new item's text is set to <i>text</i>, and the <i>icon</i> is displayed to the left of the <i>text</i>. Returns the new item's index.</p>
<!-- @@@insertItem -->
<!-- $$$insertItem$$$insertItemintQWidget*constQString& -->
<h3 class="fn" id="insertItem-1"><a name="insertItem-1"></a><span class="type">int</span> QToolBox::<span class="name">insertItem</span>(<span class="type">int</span> <i>index</i>, <span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<i>widget</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>text</i>)</h3>
<p>This is an overloaded function.</p>
<p>Inserts the <i>widget</i> at position <i>index</i>, or at the bottom of the toolbox if <i>index</i> is out of range. The new item's text is set to <i>text</i>. Returns the new item's index.</p>
<!-- @@@insertItem -->
<!-- $$$isItemEnabled[overload1]$$$isItemEnabledint -->
<h3 class="fn" id="isItemEnabled"><a name="isItemEnabled"></a><span class="type">bool</span> QToolBox::<span class="name">isItemEnabled</span>(<span class="type">int</span> <i>index</i>) const</h3>
<p>Returns <code>true</code> if the item at position <i>index</i> is enabled; otherwise returns <code>false</code>.</p>
<!-- @@@isItemEnabled -->
<!-- $$$itemIcon[overload1]$$$itemIconint -->
<h3 class="fn" id="itemIcon"><a name="itemIcon"></a><span class="type"><a href="../qtgui/qicon.html">QIcon</a></span> QToolBox::<span class="name">itemIcon</span>(<span class="type">int</span> <i>index</i>) const</h3>
<p>Returns the icon of the item at position <i>index</i>, or a null icon if <i>index</i> is out of range.</p>
<p><b>See also </b><a href="qtoolbox.html#setItemIcon">setItemIcon</a>().</p>
<!-- @@@itemIcon -->
<!-- $$$itemInserted[overload1]$$$itemInsertedint -->
<h3 class="fn" id="itemInserted"><a name="itemInserted"></a><code>[virtual protected] </code><span class="type">void</span> QToolBox::<span class="name">itemInserted</span>(<span class="type">int</span> <i>index</i>)</h3>
<p>This virtual handler is called after a new item was added or inserted at position <i>index</i>.</p>
<p><b>See also </b><a href="qtoolbox.html#itemRemoved">itemRemoved</a>().</p>
<!-- @@@itemInserted -->
<!-- $$$itemRemoved[overload1]$$$itemRemovedint -->
<h3 class="fn" id="itemRemoved"><a name="itemRemoved"></a><code>[virtual protected] </code><span class="type">void</span> QToolBox::<span class="name">itemRemoved</span>(<span class="type">int</span> <i>index</i>)</h3>
<p>This virtual handler is called after an item was removed from position <i>index</i>.</p>
<p><b>See also </b><a href="qtoolbox.html#itemInserted">itemInserted</a>().</p>
<!-- @@@itemRemoved -->
<!-- $$$itemText[overload1]$$$itemTextint -->
<h3 class="fn" id="itemText"><a name="itemText"></a><span class="type"><a href="../qtcore/qstring.html">QString</a></span> QToolBox::<span class="name">itemText</span>(<span class="type">int</span> <i>index</i>) const</h3>
<p>Returns the text of the item at position <i>index</i>, or an empty string if <i>index</i> is out of range.</p>
<p><b>See also </b><a href="qtoolbox.html#setItemText">setItemText</a>().</p>
<!-- @@@itemText -->
<!-- $$$itemToolTip[overload1]$$$itemToolTipint -->
<h3 class="fn" id="itemToolTip"><a name="itemToolTip"></a><span class="type"><a href="../qtcore/qstring.html">QString</a></span> QToolBox::<span class="name">itemToolTip</span>(<span class="type">int</span> <i>index</i>) const</h3>
<p>Returns the tooltip of the item at position <i>index</i>, or an empty string if <i>index</i> is out of range.</p>
<p><b>See also </b><a href="qtoolbox.html#setItemToolTip">setItemToolTip</a>().</p>
<!-- @@@itemToolTip -->
<!-- $$$removeItem[overload1]$$$removeItemint -->
<h3 class="fn" id="removeItem"><a name="removeItem"></a><span class="type">void</span> QToolBox::<span class="name">removeItem</span>(<span class="type">int</span> <i>index</i>)</h3>
<p>Removes the item at position <i>index</i> from the toolbox. Note that the widget is <i>not</i> deleted.</p>
<!-- @@@removeItem -->
<!-- $$$setCurrentWidget[overload1]$$$setCurrentWidgetQWidget* -->
<h3 class="fn" id="setCurrentWidget"><a name="setCurrentWidget"></a><code>[slot] </code><span class="type">void</span> QToolBox::<span class="name">setCurrentWidget</span>(<span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<i>widget</i>)</h3>
<p>Makes<i>widget</i> the current widget. The <i>widget</i> must be an item in this tool box.</p>
<p><b>See also </b><a href="qtoolbox.html#addItem">addItem</a>(), <a href="qtoolbox.html#currentIndex-prop">setCurrentIndex</a>(), and <a href="qtoolbox.html#currentWidget">currentWidget</a>().</p>
<!-- @@@setCurrentWidget -->
<!-- $$$setItemEnabled[overload1]$$$setItemEnabledintbool -->
<h3 class="fn" id="setItemEnabled"><a name="setItemEnabled"></a><span class="type">void</span> QToolBox::<span class="name">setItemEnabled</span>(<span class="type">int</span> <i>index</i>, <span class="type">bool</span> <i>enabled</i>)</h3>
<p>If <i>enabled</i> is true then the item at position <i>index</i> is enabled; otherwise the item at position <i>index</i> is disabled.</p>
<p><b>See also </b><a href="qtoolbox.html#isItemEnabled">isItemEnabled</a>().</p>
<!-- @@@setItemEnabled -->
<!-- $$$setItemIcon[overload1]$$$setItemIconintconstQIcon& -->
<h3 class="fn" id="setItemIcon"><a name="setItemIcon"></a><span class="type">void</span> QToolBox::<span class="name">setItemIcon</span>(<span class="type">int</span> <i>index</i>, const <span class="type"><a href="../qtgui/qicon.html">QIcon</a></span> &amp;<i>icon</i>)</h3>
<p>Sets the icon of the item at position <i>index</i> to <i>icon</i>.</p>
<p><b>See also </b><a href="qtoolbox.html#itemIcon">itemIcon</a>().</p>
<!-- @@@setItemIcon -->
<!-- $$$setItemText[overload1]$$$setItemTextintconstQString& -->
<h3 class="fn" id="setItemText"><a name="setItemText"></a><span class="type">void</span> QToolBox::<span class="name">setItemText</span>(<span class="type">int</span> <i>index</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>text</i>)</h3>
<p>Sets the text of the item at position <i>index</i> to <i>text</i>.</p>
<p>If the provided text contains an ampersand character ('&amp;'), a mnemonic is automatically created for it. The character that follows the '&amp;' will be used as the shortcut key. Any previous mnemonic will be overwritten, or cleared if no mnemonic 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="qtoolbox.html#itemText">itemText</a>().</p>
<!-- @@@setItemText -->
<!-- $$$setItemToolTip[overload1]$$$setItemToolTipintconstQString& -->
<h3 class="fn" id="setItemToolTip"><a name="setItemToolTip"></a><span class="type">void</span> QToolBox::<span class="name">setItemToolTip</span>(<span class="type">int</span> <i>index</i>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>toolTip</i>)</h3>
<p>Sets the tooltip of the item at position <i>index</i> to <i>toolTip</i>.</p>
<p><b>See also </b><a href="qtoolbox.html#itemToolTip">itemToolTip</a>().</p>
<!-- @@@setItemToolTip -->
<!-- $$$showEvent[overload1]$$$showEventQShowEvent* -->
<h3 class="fn" id="showEvent"><a name="showEvent"></a><code>[virtual protected] </code><span class="type">void</span> QToolBox::<span class="name">showEvent</span>(<span class="type"><a href="../qtgui/qshowevent.html">QShowEvent</a></span> *<i>e</i>)</h3>
<p>Reimplemented from <a href="qwidget.html#showEvent">QWidget::showEvent</a>().</p>
<!-- @@@showEvent -->
<!-- $$$widget[overload1]$$$widgetint -->
<h3 class="fn" id="widget"><a name="widget"></a><span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *QToolBox::<span class="name">widget</span>(<span class="type">int</span> <i>index</i>) const</h3>
<p>Returns the widget at position <i>index</i>, or 0 if there is no such item.</p>
<!-- @@@widget -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2017 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    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.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>