Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > 8e6051afcdb111a0317a58fb64c2abf5 > files > 3805

qt4-doc-4.6.3-0.2mdv2010.2.i586.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- qcombobox.cpp -->
<head>
  <title>Qt 4.6: QComboBox Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<a name="//apple_ref/cpp/cl//QComboBox"></a>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td></tr></table><h1 class="title">QComboBox Class Reference<br /><span class="small-subtitle">[<a href="qtgui.html">QtGui</a> module]</span>
</h1>
<p>The QComboBox widget is a combined button and popup list. <a href="#details">More...</a></p>
<pre> #include &lt;QComboBox&gt;</pre><p>Inherits <a href="qwidget.html">QWidget</a>.</p>
<p>Inherited by <a href="qfontcombobox.html">QFontComboBox</a>.</p>
<ul>
<li><a href="qcombobox-members.html">List of all members, including inherited members</a></li>
<li><a href="qcombobox-obsolete.html">Obsolete members</a></li>
<li><a href="qcombobox-qt3.html">Qt 3 support members</a></li>
</ul>
<hr />
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#InsertPolicy-enum">InsertPolicy</a></b> { NoInsert, InsertAtTop, InsertAtCurrent, InsertAtBottom, ..., InsertAlphabetically }</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#SizeAdjustPolicy-enum">SizeAdjustPolicy</a></b> { AdjustToContents, AdjustToContentsOnFirstShow, AdjustToMinimumContentsLength, AdjustToMinimumContentsLengthWithIcon }</td></tr>
</table>
<hr />
<a name="properties"></a>
<h2>Properties</h2>
<p><table class="propsummary" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td width="45%" valign="top"><ul>
<li><div class="fn"><b><a href="qcombobox.html#count-prop">count</a></b> : const int</div></li>
<li><div class="fn"><b><a href="qcombobox.html#currentIndex-prop">currentIndex</a></b> : int</div></li>
<li><div class="fn"><b><a href="qcombobox.html#currentText-prop">currentText</a></b> : const QString</div></li>
<li><div class="fn"><b><a href="qcombobox.html#duplicatesEnabled-prop">duplicatesEnabled</a></b> : bool</div></li>
<li><div class="fn"><b><a href="qcombobox.html#editable-prop">editable</a></b> : bool</div></li>
<li><div class="fn"><b><a href="qcombobox.html#frame-prop">frame</a></b> : bool</div></li>
<li><div class="fn"><b><a href="qcombobox.html#iconSize-prop">iconSize</a></b> : QSize</div></li>
</ul></td><td valign="top"><ul>
<li><div class="fn"><b><a href="qcombobox.html#insertPolicy-prop">insertPolicy</a></b> : InsertPolicy</div></li>
<li><div class="fn"><b><a href="qcombobox.html#maxCount-prop">maxCount</a></b> : int</div></li>
<li><div class="fn"><b><a href="qcombobox.html#maxVisibleItems-prop">maxVisibleItems</a></b> : int</div></li>
<li><div class="fn"><b><a href="qcombobox.html#minimumContentsLength-prop">minimumContentsLength</a></b> : int</div></li>
<li><div class="fn"><b><a href="qcombobox.html#modelColumn-prop">modelColumn</a></b> : int</div></li>
<li><div class="fn"><b><a href="qcombobox.html#sizeAdjustPolicy-prop">sizeAdjustPolicy</a></b> : SizeAdjustPolicy</div></li>
</ul>
</td></tr>
</table></p>
<ul>
<li><div bar="2" class="fn"></div>58 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li><div bar="2" class="fn"></div>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<hr />
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#QComboBox">QComboBox</a></b> ( QWidget * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#dtor.QComboBox">~QComboBox</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#addItem">addItem</a></b> ( const QString &amp; <i>text</i>, const QVariant &amp; <i>userData</i> = QVariant() )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#addItem-2">addItem</a></b> ( const QIcon &amp; <i>icon</i>, const QString &amp; <i>text</i>, const QVariant &amp; <i>userData</i> = QVariant() )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#addItems">addItems</a></b> ( const QStringList &amp; <i>texts</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QCompleter * </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#completer">completer</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#count-prop">count</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#currentIndex-prop">currentIndex</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#currentText-prop">currentText</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#duplicatesEnabled-prop">duplicatesEnabled</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#findData">findData</a></b> ( const QVariant &amp; <i>data</i>, int <i>role</i> = Qt::UserRole, Qt::MatchFlags <i>flags</i> = Qt::MatchExactly | Qt::MatchCaseSensitive ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#findText">findText</a></b> ( const QString &amp; <i>text</i>, Qt::MatchFlags <i>flags</i> = Qt::MatchExactly | Qt::MatchCaseSensitive ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#frame-prop">hasFrame</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#hidePopup">hidePopup</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QSize </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#iconSize-prop">iconSize</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#insertItem">insertItem</a></b> ( int <i>index</i>, const QString &amp; <i>text</i>, const QVariant &amp; <i>userData</i> = QVariant() )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#insertItem-2">insertItem</a></b> ( int <i>index</i>, const QIcon &amp; <i>icon</i>, const QString &amp; <i>text</i>, const QVariant &amp; <i>userData</i> = QVariant() )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#insertItems">insertItems</a></b> ( int <i>index</i>, const QStringList &amp; <i>list</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">InsertPolicy </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#insertPolicy-prop">insertPolicy</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#insertSeparator">insertSeparator</a></b> ( int <i>index</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#editable-prop">isEditable</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QVariant </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#itemData">itemData</a></b> ( int <i>index</i>, int <i>role</i> = Qt::UserRole ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QAbstractItemDelegate * </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#itemDelegate">itemDelegate</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QIcon </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#itemIcon">itemIcon</a></b> ( int <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#itemText">itemText</a></b> ( int <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QLineEdit * </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#lineEdit">lineEdit</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#maxCount-prop">maxCount</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#maxVisibleItems-prop">maxVisibleItems</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#minimumContentsLength-prop">minimumContentsLength</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QAbstractItemModel * </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#model">model</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#modelColumn-prop">modelColumn</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#removeItem">removeItem</a></b> ( int <i>index</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QModelIndex </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#rootModelIndex">rootModelIndex</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#setCompleter">setCompleter</a></b> ( QCompleter * <i>completer</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#duplicatesEnabled-prop">setDuplicatesEnabled</a></b> ( bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#editable-prop">setEditable</a></b> ( bool <i>editable</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#frame-prop">setFrame</a></b> ( bool )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#iconSize-prop">setIconSize</a></b> ( const QSize &amp; <i>size</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#insertPolicy-prop">setInsertPolicy</a></b> ( InsertPolicy <i>policy</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#setItemData">setItemData</a></b> ( int <i>index</i>, const QVariant &amp; <i>value</i>, int <i>role</i> = Qt::UserRole )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#setItemDelegate">setItemDelegate</a></b> ( QAbstractItemDelegate * <i>delegate</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#setItemIcon">setItemIcon</a></b> ( int <i>index</i>, const QIcon &amp; <i>icon</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#setItemText">setItemText</a></b> ( int <i>index</i>, const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#setLineEdit">setLineEdit</a></b> ( QLineEdit * <i>edit</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#maxCount-prop">setMaxCount</a></b> ( int <i>max</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#maxVisibleItems-prop">setMaxVisibleItems</a></b> ( int <i>maxItems</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#minimumContentsLength-prop">setMinimumContentsLength</a></b> ( int <i>characters</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#setModel">setModel</a></b> ( QAbstractItemModel * <i>model</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#modelColumn-prop">setModelColumn</a></b> ( int <i>visibleColumn</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#setRootModelIndex">setRootModelIndex</a></b> ( const QModelIndex &amp; <i>index</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#sizeAdjustPolicy-prop">setSizeAdjustPolicy</a></b> ( SizeAdjustPolicy <i>policy</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#setValidator">setValidator</a></b> ( const QValidator * <i>validator</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#setView">setView</a></b> ( QAbstractItemView * <i>itemView</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#showPopup">showPopup</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">SizeAdjustPolicy </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#sizeAdjustPolicy-prop">sizeAdjustPolicy</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const QValidator * </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#validator">validator</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QAbstractItemView * </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#view">view</a></b> () const</td></tr>
</table>
<hr />
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#event">event</a></b> ( QEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QSize </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#minimumSizeHint">minimumSizeHint</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QSize </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#sizeHint">sizeHint</a></b> () const</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>217 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li><div bar="2" class="fn"></div>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li><div bar="2" class="fn"></div>13 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<hr />
<a name="public-slots"></a>
<h2>Public Slots</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#clear">clear</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#clearEditText">clearEditText</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#currentIndex-prop">setCurrentIndex</a></b> ( int <i>index</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#setEditText">setEditText</a></b> ( const QString &amp; <i>text</i> )</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
<li><div bar="2" class="fn"></div>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
</ul>
<hr />
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#activated">activated</a></b> ( int <i>index</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#activated-2">activated</a></b> ( const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#currentIndexChanged">currentIndexChanged</a></b> ( int <i>index</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#currentIndexChanged-2">currentIndexChanged</a></b> ( const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#editTextChanged">editTextChanged</a></b> ( const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#highlighted">highlighted</a></b> ( int <i>index</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#highlighted-2">highlighted</a></b> ( const QString &amp; <i>text</i> )</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li><div bar="2" class="fn"></div>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<hr />
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#initStyleOption">initStyleOption</a></b> ( QStyleOptionComboBox * <i>option</i> ) const</td></tr>
</table>
<hr />
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#changeEvent">changeEvent</a></b> ( QEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#contextMenuEvent">contextMenuEvent</a></b> ( QContextMenuEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#focusInEvent">focusInEvent</a></b> ( QFocusEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#focusOutEvent">focusOutEvent</a></b> ( QFocusEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#hideEvent">hideEvent</a></b> ( QHideEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#inputMethodEvent">inputMethodEvent</a></b> ( QInputMethodEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QVariant </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#inputMethodQuery">inputMethodQuery</a></b> ( Qt::InputMethodQuery <i>query</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#keyPressEvent">keyPressEvent</a></b> ( QKeyEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#keyReleaseEvent">keyReleaseEvent</a></b> ( QKeyEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#mousePressEvent">mousePressEvent</a></b> ( QMouseEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#mouseReleaseEvent">mouseReleaseEvent</a></b> ( QMouseEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#paintEvent">paintEvent</a></b> ( QPaintEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#resizeEvent">resizeEvent</a></b> ( QResizeEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#showEvent">showEvent</a></b> ( QShowEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#wheelEvent">wheelEvent</a></b> ( QWheelEvent * <i>e</i> )</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li><div bar="2" class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li><div bar="2" class="fn"></div>1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li><div class="fn"></div>4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li><div class="fn"></div>5 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li><div class="fn"></div>1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QComboBox widget is a combined button and popup list.</p>
<p>A QComboBox provides a means of presenting a list of options to the user in a way that takes up the minimum amount of screen space.</p>
<p>A combobox is a selection widget that displays the current item, and can pop up a list of selectable items. A combobox may be editable, allowing the user to modify each item in the list.</p>
<p>Comboboxes can contain pixmaps as well as strings; the <a href="qcombobox.html#insertItem">insertItem</a>() and <a href="qcombobox.html#setItemText">setItemText</a>() functions are suitably overloaded. For editable comboboxes, the function <a href="qcombobox.html#clearEditText">clearEditText</a>() is provided, to clear the displayed string without changing the combobox's contents.</p>
<p>There are two signals emitted if the current item of a combobox changes, <a href="qcombobox.html#currentIndexChanged">currentIndexChanged</a>() and <a href="qcombobox.html#activated">activated</a>(). <a href="qcombobox.html#currentIndexChanged">currentIndexChanged</a>() is always emitted regardless if the change was done programmatically or by user interaction, while <a href="qcombobox.html#activated">activated</a>() is only emitted when the change is caused by user interaction. The <a href="qcombobox.html#highlighted">highlighted</a>() signal is emitted when the user highlights an item in the combobox popup list. All three signals exist in two versions, one with a <a href="qstring.html">QString</a> argument and one with an <tt>int</tt> argument. If the user selectes or highlights a pixmap, only the <tt>int</tt> signals are emitted. Whenever the text of an editable combobox is changed the <a href="qcombobox.html#editTextChanged">editTextChanged</a>() signal is emitted.</p>
<p>When the user enters a new string in an editable combobox, the widget may or may not insert it, and it can insert it in several locations. The default policy is is <a href="qcombobox.html#InsertPolicy-enum">AtBottom</a> but you can change this using <a href="qcombobox.html#insertPolicy-prop">setInsertPolicy</a>().</p>
<p>It is possible to constrain the input to an editable combobox using <a href="qvalidator.html">QValidator</a>; see <a href="qcombobox.html#setValidator">setValidator</a>(). By default, any input is accepted.</p>
<p>A combobox can be populated using the insert functions, <a href="qcombobox.html#insertItem">insertItem</a>() and <a href="qcombobox.html#insertItems">insertItems</a>() for example. Items can be changed with <a href="qcombobox.html#setItemText">setItemText</a>(). An item can be removed with <a href="qcombobox.html#removeItem">removeItem</a>() and all items can be removed with <a href="qcombobox.html#clear">clear</a>(). The text of the current item is returned by <a href="qcombobox.html#currentText-prop">currentText</a>(), and the text of a numbered item is returned with <a href="qcombobox-qt3.html#text" class="compat">text</a>(). The current item can be set with <a href="qcombobox.html#currentIndex-prop">setCurrentIndex</a>(). The number of items in the combobox is returned by <a href="qcombobox.html#count-prop">count</a>(); the maximum number of items can be set with <a href="qcombobox.html#maxCount-prop">setMaxCount</a>(). You can allow editing using <a href="qcombobox.html#editable-prop">setEditable</a>(). For editable comboboxes you can set auto-completion using <a href="qcombobox.html#setCompleter">setCompleter</a>() and whether or not the user can add duplicates is set with <a href="qcombobox.html#duplicatesEnabled-prop">setDuplicatesEnabled</a>().</p>
<p>QComboBox uses the <a href="model-view-programming.html">model/view framework</a> for its popup list and to store its items. By default a <a href="qstandarditemmodel.html">QStandardItemModel</a> stores the items and a <a href="qlistview.html">QListView</a> subclass displays the popuplist. You can access the model and view directly (with <a href="qcombobox.html#model">model</a>() and <a href="qcombobox.html#view">view</a>()), but QComboBox also provides functions to set and get item data (e.g&#x2e;, <a href="qcombobox.html#setItemData">setItemData</a>() and <a href="qcombobox.html#itemText">itemText</a>()). You can also set a new model and view (with <a href="qcombobox.html#setModel">setModel</a>() and <a href="qcombobox.html#setView">setView</a>()). For the text and icon in the combobox label, the data in the model that has the <a href="qt.html#ItemDataRole-enum">Qt::DisplayRole</a> and <a href="qt.html#ItemDataRole-enum">Qt::DecorationRole</a> is used.</p>
<p align="center"><img src="images/qstyle-comboboxes.png" alt="Comboboxes in the different built-in styles." /></p><p>See also <a href="qlineedit.html">QLineEdit</a>, <a href="qspinbox.html">QSpinBox</a>, <a href="qradiobutton.html">QRadioButton</a>, <a href="qbuttongroup.html">QButtonGroup</a>, and <a href="guibooks.html#fowler">GUI Design Handbook: Combo Box, Drop-Down List Box</a>.</p>
<hr />
<h2>Member Type Documentation</h2>
<a name="//apple_ref/cpp/tag/QComboBox/InsertPolicy"></a>
<a name="//apple_ref/cpp/econst/QComboBox/NoInsert"></a>
<a name="//apple_ref/cpp/econst/QComboBox/InsertAtTop"></a>
<a name="//apple_ref/cpp/econst/QComboBox/InsertAtCurrent"></a>
<a name="//apple_ref/cpp/econst/QComboBox/InsertAtBottom"></a>
<a name="//apple_ref/cpp/econst/QComboBox/InsertAfterCurrent"></a>
<a name="//apple_ref/cpp/econst/QComboBox/InsertBeforeCurrent"></a>
<a name="//apple_ref/cpp/econst/QComboBox/InsertAlphabetically"></a>
<a name="//apple_ref/cpp/econst/QComboBox/NoInsertion"></a>
<a name="//apple_ref/cpp/econst/QComboBox/AtTop"></a>
<a name="//apple_ref/cpp/econst/QComboBox/AtCurrent"></a>
<a name="//apple_ref/cpp/econst/QComboBox/AtBottom"></a>
<a name="//apple_ref/cpp/econst/QComboBox/AfterCurrent"></a>
<a name="//apple_ref/cpp/econst/QComboBox/BeforeCurrent"></a>
<h3 class="fn"><a name="InsertPolicy-enum"></a>enum QComboBox::InsertPolicy</h3>
<p>This enum specifies what the <a href="qcombobox.html">QComboBox</a> should do when a new string is entered by the user.</p>
<p><table class="valuelist" border="1" cellpadding="2" cellspacing="1" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QComboBox::NoInsert</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The string will not be inserted into the combobox.</td></tr>
<tr><td valign="top"><tt>QComboBox::InsertAtTop</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The string will be inserted as the first item in the combobox.</td></tr>
<tr><td valign="top"><tt>QComboBox::InsertAtCurrent</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">The current item will be <i>replaced</i> by the string.</td></tr>
<tr><td valign="top"><tt>QComboBox::InsertAtBottom</tt></td><td align="center" valign="top"><tt>3</tt></td><td valign="top">The string will be inserted after the last item in the combobox.</td></tr>
<tr><td valign="top"><tt>QComboBox::InsertAfterCurrent</tt></td><td align="center" valign="top"><tt>4</tt></td><td valign="top">The string is inserted after the current item in the combobox.</td></tr>
<tr><td valign="top"><tt>QComboBox::InsertBeforeCurrent</tt></td><td align="center" valign="top"><tt>5</tt></td><td valign="top">The string is inserted before the current item in the combobox.</td></tr>
<tr><td valign="top"><tt>QComboBox::InsertAlphabetically</tt></td><td align="center" valign="top"><tt>6</tt></td><td valign="top">The string is inserted in the alphabetic order in the combobox.</td></tr>
</table></p>
<a name="//apple_ref/cpp/tag/QComboBox/SizeAdjustPolicy"></a>
<a name="//apple_ref/cpp/econst/QComboBox/AdjustToContents"></a>
<a name="//apple_ref/cpp/econst/QComboBox/AdjustToContentsOnFirstShow"></a>
<a name="//apple_ref/cpp/econst/QComboBox/AdjustToMinimumContentsLength"></a>
<a name="//apple_ref/cpp/econst/QComboBox/AdjustToMinimumContentsLengthWithIcon"></a>
<h3 class="fn"><a name="SizeAdjustPolicy-enum"></a>enum QComboBox::SizeAdjustPolicy</h3>
<p>This enum specifies how the size hint of the <a href="qcombobox.html">QComboBox</a> should adjust when new content is added or content changes.</p>
<p><table class="valuelist" border="1" cellpadding="2" cellspacing="1" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QComboBox::AdjustToContents</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The combobox will always adjust to the contents</td></tr>
<tr><td valign="top"><tt>QComboBox::AdjustToContentsOnFirstShow</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The combobox will adjust to its contents the first time it is shown.</td></tr>
<tr><td valign="top"><tt>QComboBox::AdjustToMinimumContentsLength</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">Use AdjustToContents or AdjustToContentsOnFirstShow instead.</td></tr>
<tr><td valign="top"><tt>QComboBox::AdjustToMinimumContentsLengthWithIcon</tt></td><td align="center" valign="top"><tt>3</tt></td><td valign="top">The combobox will adjust to <a href="qcombobox.html#minimumContentsLength-prop">minimumContentsLength</a> plus space for an icon. For performance reasons use this policy on large models.</td></tr>
</table></p>
<hr />
<h2>Property Documentation</h2>
<a name="//apple_ref/cpp/instm/QComboBox/count"></a>
<h3 class="fn"><a name="count-prop"></a>count : const int</h3>
<p>This property holds the number of items in the combobox.</p>
<p>By default, for an empty combo box, this property has a value of 0.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b>count</b> () const</td></tr>
</table>
<a name="//apple_ref/cpp/instm/QComboBox/currentIndex"></a>
<a name="//apple_ref/cpp/instm/QComboBox/setCurrentIndex"></a>
<a name="//apple_ref/cpp/instm/QComboBox/currentIndexChanged"></a>
<h3 class="fn"><a name="currentIndex-prop"></a>currentIndex : int</h3>
<p>This property holds the index of the current item in the combobox.</p>
<p>The current index can change when inserting or removing items.</p>
<p>By default, for an empty combo box or a combo box in which no current item is set, this property has a value of -1.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b>currentIndex</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setCurrentIndex</b> ( int <i>index</i> )</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#currentIndexChanged">currentIndexChanged</a></b> ( int <i>index</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qcombobox.html#currentIndexChanged-2">currentIndexChanged</a></b> ( const QString &amp; <i>text</i> )</td></tr>
</table>
<a name="//apple_ref/cpp/instm/QComboBox/currentText"></a>
<h3 class="fn"><a name="currentText-prop"></a>currentText : const <a href="qstring.html">QString</a></h3>
<p>This property holds the text of the current item.</p>
<p>By default, for an empty combo box or a combo box in which no current item is set, this property contains an empty string.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b>currentText</b> () const</td></tr>
</table>
<a name="//apple_ref/cpp/instm/QComboBox/duplicatesEnabled"></a>
<a name="//apple_ref/cpp/instm/QComboBox/setDuplicatesEnabled"></a>
<h3 class="fn"><a name="duplicatesEnabled-prop"></a>duplicatesEnabled : bool</h3>
<p>This property holds whether the user can enter duplicate items into the combobox.</p>
<p>Note that it is always possible to programmatically insert duplicate items into the combobox.</p>
<p>By default, this property is false (duplicates are not allowed).</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b>duplicatesEnabled</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setDuplicatesEnabled</b> ( bool <i>enable</i> )</td></tr>
</table>
<a name="//apple_ref/cpp/instm/QComboBox/isEditable"></a>
<a name="//apple_ref/cpp/instm/QComboBox/setEditable"></a>
<h3 class="fn"><a name="editable-prop"></a>editable : bool</h3>
<p>This property holds whether the combo box can be edited by the user.</p>
<p>By default, this property is false.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b>isEditable</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setEditable</b> ( bool <i>editable</i> )</td></tr>
</table>
<a name="//apple_ref/cpp/instm/QComboBox/hasFrame"></a>
<a name="//apple_ref/cpp/instm/QComboBox/setFrame"></a>
<h3 class="fn"><a name="frame-prop"></a>frame : bool</h3>
<p>This property holds whether the combo box draws itself with a frame.</p>
<p>If enabled (the default) the combo box draws itself inside a frame, otherwise the combo box draws itself without any frame.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b>hasFrame</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setFrame</b> ( bool )</td></tr>
</table>
<a name="//apple_ref/cpp/instm/QComboBox/iconSize"></a>
<a name="//apple_ref/cpp/instm/QComboBox/setIconSize"></a>
<h3 class="fn"><a name="iconSize-prop"></a>iconSize : <a href="qsize.html">QSize</a></h3>
<p>This property holds the size of the icons shown in the combobox.</p>
<p>Unless explicitly set this returns the default value of the current style. This size is the maximum size that icons can have; icons of smaller size are not scaled up.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QSize </td><td class="memItemRight" valign="bottom"><b>iconSize</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setIconSize</b> ( const QSize &amp; <i>size</i> )</td></tr>
</table>
<a name="//apple_ref/cpp/instm/QComboBox/insertPolicy"></a>
<a name="//apple_ref/cpp/instm/QComboBox/setInsertPolicy"></a>
<h3 class="fn"><a name="insertPolicy-prop"></a>insertPolicy : <a href="qcombobox.html#InsertPolicy-enum">InsertPolicy</a></h3>
<p>This property holds the policy used to determine where user-inserted items should appear in the combobox.</p>
<p>The default value is <a href="qcombobox.html#InsertPolicy-enum">AtBottom</a>, indicating that new items will appear at the bottom of the list of items.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">InsertPolicy </td><td class="memItemRight" valign="bottom"><b>insertPolicy</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setInsertPolicy</b> ( InsertPolicy <i>policy</i> )</td></tr>
</table>
<p>See also <a href="qcombobox.html#InsertPolicy-enum">InsertPolicy</a>.</p>
<a name="//apple_ref/cpp/instm/QComboBox/maxCount"></a>
<a name="//apple_ref/cpp/instm/QComboBox/setMaxCount"></a>
<h3 class="fn"><a name="maxCount-prop"></a>maxCount : int</h3>
<p>This property holds the maximum number of items allowed in the combobox.</p>
<p><b>Note:</b> If you set the maximum number to be less then the current amount of items in the combobox, the extra items will be truncated. This also applies if you have set an external model on the combobox.</p>
<p>By default, this property's value is derived from the highest signed integer available (typically 2147483647).</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b>maxCount</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setMaxCount</b> ( int <i>max</i> )</td></tr>
</table>
<a name="//apple_ref/cpp/instm/QComboBox/maxVisibleItems"></a>
<a name="//apple_ref/cpp/instm/QComboBox/setMaxVisibleItems"></a>
<h3 class="fn"><a name="maxVisibleItems-prop"></a>maxVisibleItems : int</h3>
<p>This property holds the maximum allowed size on screen of the combo box, measured in items.</p>
<p>By default, this property has a value of 10.</p>
<p><b>Note:</b> This property is ignored for non-editable comboboxes in Mac style.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b>maxVisibleItems</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setMaxVisibleItems</b> ( int <i>maxItems</i> )</td></tr>
</table>
<a name="//apple_ref/cpp/instm/QComboBox/minimumContentsLength"></a>
<a name="//apple_ref/cpp/instm/QComboBox/setMinimumContentsLength"></a>
<h3 class="fn"><a name="minimumContentsLength-prop"></a>minimumContentsLength : int</h3>
<p>This property holds the minimum number of characters that should fit into the combobox.</p>
<p>The default value is 0.</p>
<p>If this property is set to a positive value, the <a href="qcombobox.html#minimumSizeHint">minimumSizeHint</a>() and <a href="qcombobox.html#sizeHint">sizeHint</a>() take it into account.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b>minimumContentsLength</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setMinimumContentsLength</b> ( int <i>characters</i> )</td></tr>
</table>
<p>See also <a href="qcombobox.html#sizeAdjustPolicy-prop">sizeAdjustPolicy</a>.</p>
<a name="//apple_ref/cpp/instm/QComboBox/modelColumn"></a>
<a name="//apple_ref/cpp/instm/QComboBox/setModelColumn"></a>
<h3 class="fn"><a name="modelColumn-prop"></a>modelColumn : int</h3>
<p>This property holds the column in the model that is visible.</p>
<p>If set prior to populating the combo box, the pop-up view will not be affected and will show the first column (using this property's default value).</p>
<p>By default, this property has a value of 0.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b>modelColumn</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setModelColumn</b> ( int <i>visibleColumn</i> )</td></tr>
</table>
<a name="//apple_ref/cpp/instm/QComboBox/sizeAdjustPolicy"></a>
<a name="//apple_ref/cpp/instm/QComboBox/setSizeAdjustPolicy"></a>
<h3 class="fn"><a name="sizeAdjustPolicy-prop"></a>sizeAdjustPolicy : <a href="qcombobox.html#SizeAdjustPolicy-enum">SizeAdjustPolicy</a></h3>
<p>This property holds the policy describing how the size of the combobox changes when the content changes.</p>
<p>The default value is <a href="qcombobox.html#SizeAdjustPolicy-enum">AdjustToContentsOnFirstShow</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">SizeAdjustPolicy </td><td class="memItemRight" valign="bottom"><b>sizeAdjustPolicy</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setSizeAdjustPolicy</b> ( SizeAdjustPolicy <i>policy</i> )</td></tr>
</table>
<p>See also <a href="qcombobox.html#SizeAdjustPolicy-enum">SizeAdjustPolicy</a>.</p>
<hr />
<h2>Member Function Documentation</h2>
<a name="//apple_ref/cpp/instm/QComboBox/QComboBox"></a>
<h3 class="fn"><a name="QComboBox"></a>QComboBox::QComboBox ( <a href="qwidget.html">QWidget</a> * <i>parent</i> = 0 )</h3>
<p>Constructs a combobox with the given <i>parent</i>, using the default model <a href="qstandarditemmodel.html">QStandardItemModel</a>.</p>
<a name="//apple_ref/cpp/instm/QComboBox/~QComboBox"></a>
<h3 class="fn"><a name="dtor.QComboBox"></a>QComboBox::~QComboBox ()</h3>
<p>Destroys the combobox.</p>
<a name="//apple_ref/cpp/instm/QComboBox/activated"></a>
<h3 class="fn"><a name="activated"></a>void QComboBox::activated ( int <i>index</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is sent when the user chooses an item in the combobox. The item's <i>index</i> is passed. Note that this signal is sent even when the choice is not changed. If you need to know when the choice actually changes, use signal <a href="qcombobox.html#currentIndexChanged">currentIndexChanged</a>().</p>
<h3 class="fn"><a name="activated-2"></a>void QComboBox::activated ( const <a href="qstring.html">QString</a> &amp; <i>text</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is sent when the user chooses an item in the combobox. The item's <i>text</i> is passed. Note that this signal is sent even when the choice is not changed. If you need to know when the choice actually changes, use signal <a href="qcombobox.html#currentIndexChanged">currentIndexChanged</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/addItem"></a>
<h3 class="fn"><a name="addItem"></a>void QComboBox::addItem ( const <a href="qstring.html">QString</a> &amp; <i>text</i>, const <a href="qvariant.html">QVariant</a> &amp; <i>userData</i> = QVariant() )</h3>
<p>Adds an item to the combobox with the given <i>text</i>, and containing the specified <i>userData</i> (stored in the <a href="qt.html#ItemDataRole-enum">Qt::UserRole</a>). The item is appended to the list of existing items.</p>
<h3 class="fn"><a name="addItem-2"></a>void QComboBox::addItem ( const <a href="qicon.html">QIcon</a> &amp; <i>icon</i>, const <a href="qstring.html">QString</a> &amp; <i>text</i>, const <a href="qvariant.html">QVariant</a> &amp; <i>userData</i> = QVariant() )</h3>
<p>Adds an item to the combobox with the given <i>icon</i> and <i>text</i>, and containing the specified <i>userData</i> (stored in the <a href="qt.html#ItemDataRole-enum">Qt::UserRole</a>). The item is appended to the list of existing items.</p>
<a name="//apple_ref/cpp/instm/QComboBox/addItems"></a>
<h3 class="fn"><a name="addItems"></a>void QComboBox::addItems ( const <a href="qstringlist.html">QStringList</a> &amp; <i>texts</i> )</h3>
<p>Adds each of the strings in the given <i>texts</i> to the combobox. Each item is appended to the list of existing items in turn.</p>
<a name="//apple_ref/cpp/instm/QComboBox/changeEvent"></a>
<h3 class="fn"><a name="changeEvent"></a>void QComboBox::changeEvent ( <a href="qevent.html">QEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#changeEvent">QWidget::changeEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/clear"></a>
<h3 class="fn"><a name="clear"></a>void QComboBox::clear ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Clears the combobox, removing all items.</p>
<p>Note: If you have set an external model on the combobox this model will still be cleared when calling this function.</p>
<a name="//apple_ref/cpp/instm/QComboBox/clearEditText"></a>
<h3 class="fn"><a name="clearEditText"></a>void QComboBox::clearEditText ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Clears the contents of the line edit used for editing in the combobox.</p>
<a name="//apple_ref/cpp/instm/QComboBox/completer"></a>
<h3 class="fn"><a name="completer"></a><a href="qcompleter.html">QCompleter</a> * QComboBox::completer () const</h3>
<p>Returns the completer that is used to auto complete text input for the combobox.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qcombobox.html#setCompleter">setCompleter</a>() and <a href="qcombobox.html#editable-prop">editable</a>.</p>
<a name="//apple_ref/cpp/instm/QComboBox/contextMenuEvent"></a>
<h3 class="fn"><a name="contextMenuEvent"></a>void QComboBox::contextMenuEvent ( <a href="qcontextmenuevent.html">QContextMenuEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#contextMenuEvent">QWidget::contextMenuEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/currentIndexChanged"></a>
<h3 class="fn"><a name="currentIndexChanged"></a>void QComboBox::currentIndexChanged ( int <i>index</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is sent whenever the <a href="qcombobox.html#currentIndex-prop">currentIndex</a> in the combobox changes either through user interaction or programmatically. The item's <i>index</i> is passed or -1 if the combobox becomes empty or the <a href="qcombobox.html#currentIndex-prop">currentIndex</a> was reset.</p>
<p>This function was introduced in Qt 4.1.</p>
<h3 class="fn"><a name="currentIndexChanged-2"></a>void QComboBox::currentIndexChanged ( const <a href="qstring.html">QString</a> &amp; <i>text</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is sent whenever the <a href="qcombobox.html#currentIndex-prop">currentIndex</a> in the combobox changes either through user interaction or programmatically. The item's <i>text</i> is passed.</p>
<p>This function was introduced in Qt 4.1.</p>
<a name="//apple_ref/cpp/instm/QComboBox/editTextChanged"></a>
<h3 class="fn"><a name="editTextChanged"></a>void QComboBox::editTextChanged ( const <a href="qstring.html">QString</a> &amp; <i>text</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the text in the combobox's line edit widget is changed. The new text is specified by <i>text</i>.</p>
<a name="//apple_ref/cpp/instm/QComboBox/event"></a>
<h3 class="fn"><a name="event"></a>bool QComboBox::event ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qobject.html#event">QObject::event</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/findData"></a>
<h3 class="fn"><a name="findData"></a>int QComboBox::findData ( const <a href="qvariant.html">QVariant</a> &amp; <i>data</i>, int <i>role</i> = Qt::UserRole, <a href="qt.html#MatchFlag-enum">Qt::MatchFlags</a> <i>flags</i> = Qt::MatchExactly | Qt::MatchCaseSensitive ) const</h3>
<p>Returns the index of the item containing the given <i>data</i> for the given <i>role</i>; otherwise returns -1.</p>
<p>The <i>flags</i> specify how the items in the combobox are searched.</p>
<a name="//apple_ref/cpp/instm/QComboBox/findText"></a>
<h3 class="fn"><a name="findText"></a>int QComboBox::findText ( const <a href="qstring.html">QString</a> &amp; <i>text</i>, <a href="qt.html#MatchFlag-enum">Qt::MatchFlags</a> <i>flags</i> = Qt::MatchExactly | Qt::MatchCaseSensitive ) const</h3>
<p>Returns the index of the item containing the given <i>text</i>; otherwise returns -1.</p>
<p>The <i>flags</i> specify how the items in the combobox are searched.</p>
<a name="//apple_ref/cpp/instm/QComboBox/focusInEvent"></a>
<h3 class="fn"><a name="focusInEvent"></a>void QComboBox::focusInEvent ( <a href="qfocusevent.html">QFocusEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#focusInEvent">QWidget::focusInEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/focusOutEvent"></a>
<h3 class="fn"><a name="focusOutEvent"></a>void QComboBox::focusOutEvent ( <a href="qfocusevent.html">QFocusEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#focusOutEvent">QWidget::focusOutEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/hideEvent"></a>
<h3 class="fn"><a name="hideEvent"></a>void QComboBox::hideEvent ( <a href="qhideevent.html">QHideEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#hideEvent">QWidget::hideEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/hidePopup"></a>
<h3 class="fn"><a name="hidePopup"></a>void QComboBox::hidePopup ()&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Hides the list of items in the combobox if it is currently visible and resets the internal state, so that if the custom pop-up was shown inside the reimplemented <a href="qcombobox.html#showPopup">showPopup</a>(), then you also need to reimplement the hidePopup() function to hide your custom pop-up and call the base class implementation to reset the internal state whenever your custom pop-up widget is hidden.</p>
<p>See also <a href="qcombobox.html#showPopup">showPopup</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/highlighted"></a>
<h3 class="fn"><a name="highlighted"></a>void QComboBox::highlighted ( int <i>index</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is sent when an item in the combobox popup list is highlighted by the user. The item's <i>index</i> is passed.</p>
<h3 class="fn"><a name="highlighted-2"></a>void QComboBox::highlighted ( const <a href="qstring.html">QString</a> &amp; <i>text</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is sent when an item in the combobox popup list is highlighted by the user. The item's <i>text</i> is passed.</p>
<a name="//apple_ref/cpp/instm/QComboBox/initStyleOption"></a>
<h3 class="fn"><a name="initStyleOption"></a>void QComboBox::initStyleOption ( <a href="qstyleoptioncombobox.html">QStyleOptionComboBox</a> * <i>option</i> ) const&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Initialize <i>option</i> with the values from this <a href="qcombobox.html">QComboBox</a>. This method is useful for subclasses when they need a <a href="qstyleoptioncombobox.html">QStyleOptionComboBox</a>, but don't want to fill in all the information themselves.</p>
<p>See also <a href="qstyleoption.html#initFrom">QStyleOption::initFrom</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/inputMethodEvent"></a>
<h3 class="fn"><a name="inputMethodEvent"></a>void QComboBox::inputMethodEvent ( <a href="qinputmethodevent.html">QInputMethodEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#inputMethodEvent">QWidget::inputMethodEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/inputMethodQuery"></a>
<h3 class="fn"><a name="inputMethodQuery"></a><a href="qvariant.html">QVariant</a> QComboBox::inputMethodQuery ( <a href="qt.html#InputMethodQuery-enum">Qt::InputMethodQuery</a> <i>query</i> ) const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#inputMethodQuery">QWidget::inputMethodQuery</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/insertItem"></a>
<h3 class="fn"><a name="insertItem"></a>void QComboBox::insertItem ( int <i>index</i>, const <a href="qstring.html">QString</a> &amp; <i>text</i>, const <a href="qvariant.html">QVariant</a> &amp; <i>userData</i> = QVariant() )</h3>
<p>Inserts the <i>text</i> and <i>userData</i> (stored in the <a href="qt.html#ItemDataRole-enum">Qt::UserRole</a>) into the combobox at the given <i>index</i>.</p>
<p>If the index is equal to or higher than the total number of items, the new item is appended to the list of existing items. If the index is zero or negative, the new item is prepended to the list of existing items.</p>
<p>See also <a href="qcombobox.html#insertItems">insertItems</a>().</p>
<h3 class="fn"><a name="insertItem-2"></a>void QComboBox::insertItem ( int <i>index</i>, const <a href="qicon.html">QIcon</a> &amp; <i>icon</i>, const <a href="qstring.html">QString</a> &amp; <i>text</i>, const <a href="qvariant.html">QVariant</a> &amp; <i>userData</i> = QVariant() )</h3>
<p>Inserts the <i>icon</i>, <i>text</i> and <i>userData</i> (stored in the <a href="qt.html#ItemDataRole-enum">Qt::UserRole</a>) into the combobox at the given <i>index</i>.</p>
<p>If the index is equal to or higher than the total number of items, the new item is appended to the list of existing items. If the index is zero or negative, the new item is prepended to the list of existing items.</p>
<p>See also <a href="qcombobox.html#insertItems">insertItems</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/insertItems"></a>
<h3 class="fn"><a name="insertItems"></a>void QComboBox::insertItems ( int <i>index</i>, const <a href="qstringlist.html">QStringList</a> &amp; <i>list</i> )</h3>
<p>Inserts the strings from the <i>list</i> into the combobox as separate items, starting at the <i>index</i> specified.</p>
<p>If the index is equal to or higher than the total number of items, the new items are appended to the list of existing items. If the index is zero or negative, the new items are prepended to the list of existing items.</p>
<p>See also <a href="qcombobox.html#insertItem">insertItem</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/insertSeparator"></a>
<h3 class="fn"><a name="insertSeparator"></a>void QComboBox::insertSeparator ( int <i>index</i> )</h3>
<p>Inserts a separator item into the combobox at the given <i>index</i>.</p>
<p>If the index is equal to or higher than the total number of items, the new item is appended to the list of existing items. If the index is zero or negative, the new item is prepended to the list of existing items.</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qcombobox.html#insertItem">insertItem</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/itemData"></a>
<h3 class="fn"><a name="itemData"></a><a href="qvariant.html">QVariant</a> QComboBox::itemData ( int <i>index</i>, int <i>role</i> = Qt::UserRole ) const</h3>
<p>Returns the data for the given <i>role</i> in the given <i>index</i> in the combobox, or <a href="qvariant.html#Type-enum">QVariant::Invalid</a> if there is no data for this role.</p>
<p>See also <a href="qcombobox.html#setItemData">setItemData</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/itemDelegate"></a>
<h3 class="fn"><a name="itemDelegate"></a><a href="qabstractitemdelegate.html">QAbstractItemDelegate</a> * QComboBox::itemDelegate () const</h3>
<p>Returns the item delegate used by the popup list view.</p>
<p>See also <a href="qcombobox.html#setItemDelegate">setItemDelegate</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/itemIcon"></a>
<h3 class="fn"><a name="itemIcon"></a><a href="qicon.html">QIcon</a> QComboBox::itemIcon ( int <i>index</i> ) const</h3>
<p>Returns the icon for the given <i>index</i> in the combobox.</p>
<p>See also <a href="qcombobox.html#setItemIcon">setItemIcon</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/itemText"></a>
<h3 class="fn"><a name="itemText"></a><a href="qstring.html">QString</a> QComboBox::itemText ( int <i>index</i> ) const</h3>
<p>Returns the text for the given <i>index</i> in the combobox.</p>
<p>See also <a href="qcombobox.html#setItemText">setItemText</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/keyPressEvent"></a>
<h3 class="fn"><a name="keyPressEvent"></a>void QComboBox::keyPressEvent ( <a href="qkeyevent.html">QKeyEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#keyPressEvent">QWidget::keyPressEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/keyReleaseEvent"></a>
<h3 class="fn"><a name="keyReleaseEvent"></a>void QComboBox::keyReleaseEvent ( <a href="qkeyevent.html">QKeyEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#keyReleaseEvent">QWidget::keyReleaseEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/lineEdit"></a>
<h3 class="fn"><a name="lineEdit"></a><a href="qlineedit.html">QLineEdit</a> * QComboBox::lineEdit () const</h3>
<p>Returns the line edit used to edit items in the combobox, or 0 if there is no line edit.</p>
<p>Only editable combo boxes have a line edit.</p>
<p>See also <a href="qcombobox.html#setLineEdit">setLineEdit</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/minimumSizeHint"></a>
<h3 class="fn"><a name="minimumSizeHint"></a><a href="qsize.html">QSize</a> QComboBox::minimumSizeHint () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#minimumSizeHint-prop">QWidget::minimumSizeHint</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/model"></a>
<h3 class="fn"><a name="model"></a><a href="qabstractitemmodel.html">QAbstractItemModel</a> * QComboBox::model () const</h3>
<p>Returns the model used by the combobox.</p>
<p>See also <a href="qcombobox.html#setModel">setModel</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/mousePressEvent"></a>
<h3 class="fn"><a name="mousePressEvent"></a>void QComboBox::mousePressEvent ( <a href="qmouseevent.html">QMouseEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#mousePressEvent">QWidget::mousePressEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/mouseReleaseEvent"></a>
<h3 class="fn"><a name="mouseReleaseEvent"></a>void QComboBox::mouseReleaseEvent ( <a href="qmouseevent.html">QMouseEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#mouseReleaseEvent">QWidget::mouseReleaseEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/paintEvent"></a>
<h3 class="fn"><a name="paintEvent"></a>void QComboBox::paintEvent ( <a href="qpaintevent.html">QPaintEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#paintEvent">QWidget::paintEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/removeItem"></a>
<h3 class="fn"><a name="removeItem"></a>void QComboBox::removeItem ( int <i>index</i> )</h3>
<p>Removes the item at the given <i>index</i> from the combobox. This will update the current index if the index is removed.</p>
<p>This function does nothing if <i>index</i> is out of range.</p>
<a name="//apple_ref/cpp/instm/QComboBox/resizeEvent"></a>
<h3 class="fn"><a name="resizeEvent"></a>void QComboBox::resizeEvent ( <a href="qresizeevent.html">QResizeEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#resizeEvent">QWidget::resizeEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/rootModelIndex"></a>
<h3 class="fn"><a name="rootModelIndex"></a><a href="qmodelindex.html">QModelIndex</a> QComboBox::rootModelIndex () const</h3>
<p>Returns the root model item index for the items in the combobox.</p>
<p>See also <a href="qcombobox.html#setRootModelIndex">setRootModelIndex</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/setCompleter"></a>
<h3 class="fn"><a name="setCompleter"></a>void QComboBox::setCompleter ( <a href="qcompleter.html">QCompleter</a> * <i>completer</i> )</h3>
<p>Sets the <i>completer</i> to use instead of the current completer. If <i>completer</i> is 0, auto completion is disabled.</p>
<p>By default, for an editable combo box, a <a href="qcompleter.html">QCompleter</a> that performs case insensitive inline completion is automatically created.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qcombobox.html#completer">completer</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/setEditText"></a>
<h3 class="fn"><a name="setEditText"></a>void QComboBox::setEditText ( const <a href="qstring.html">QString</a> &amp; <i>text</i> )&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Sets the <i>text</i> in the combobox's text edit.</p>
<a name="//apple_ref/cpp/instm/QComboBox/setItemData"></a>
<h3 class="fn"><a name="setItemData"></a>void QComboBox::setItemData ( int <i>index</i>, const <a href="qvariant.html">QVariant</a> &amp; <i>value</i>, int <i>role</i> = Qt::UserRole )</h3>
<p>Sets the data <i>role</i> for the item on the given <i>index</i> in the combobox to the specified <i>value</i>.</p>
<p>See also <a href="qcombobox.html#itemData">itemData</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/setItemDelegate"></a>
<h3 class="fn"><a name="setItemDelegate"></a>void QComboBox::setItemDelegate ( <a href="qabstractitemdelegate.html">QAbstractItemDelegate</a> * <i>delegate</i> )</h3>
<p>Sets the item <i>delegate</i> for the popup list view. The combobox takes ownership of the delegate.</p>
<p><b>Warning:</b> You should not share the same instance of a delegate between comboboxes, widget mappers or views. Doing so can cause incorrect or unintuitive editing behavior since each view connected to a given delegate may receive the <a href="qabstractitemdelegate.html#closeEditor">closeEditor()</a> signal, and attempt to access, modify or close an editor that has already been closed.</p>
<p>See also <a href="qcombobox.html#itemDelegate">itemDelegate</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/setItemIcon"></a>
<h3 class="fn"><a name="setItemIcon"></a>void QComboBox::setItemIcon ( int <i>index</i>, const <a href="qicon.html">QIcon</a> &amp; <i>icon</i> )</h3>
<p>Sets the <i>icon</i> for the item on the given <i>index</i> in the combobox.</p>
<p>See also <a href="qcombobox.html#itemIcon">itemIcon</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/setItemText"></a>
<h3 class="fn"><a name="setItemText"></a>void QComboBox::setItemText ( int <i>index</i>, const <a href="qstring.html">QString</a> &amp; <i>text</i> )</h3>
<p>Sets the <i>text</i> for the item on the given <i>index</i> in the combobox.</p>
<p>See also <a href="qcombobox.html#itemText">itemText</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/setLineEdit"></a>
<h3 class="fn"><a name="setLineEdit"></a>void QComboBox::setLineEdit ( <a href="qlineedit.html">QLineEdit</a> * <i>edit</i> )</h3>
<p>Sets the line <i>edit</i> to use instead of the current line edit widget.</p>
<p>The combo box takes ownership of the line edit.</p>
<p>See also <a href="qcombobox.html#lineEdit">lineEdit</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/setModel"></a>
<h3 class="fn"><a name="setModel"></a>void QComboBox::setModel ( <a href="qabstractitemmodel.html">QAbstractItemModel</a> * <i>model</i> )</h3>
<p>Sets the model to be <i>model</i>. <i>model</i> must not be 0. If you want to clear the contents of a model, call <a href="qcombobox.html#clear">clear</a>().</p>
<p>See also <a href="qcombobox.html#model">model</a>() and <a href="qcombobox.html#clear">clear</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/setRootModelIndex"></a>
<h3 class="fn"><a name="setRootModelIndex"></a>void QComboBox::setRootModelIndex ( const <a href="qmodelindex.html">QModelIndex</a> &amp; <i>index</i> )</h3>
<p>Sets the root model item <i>index</i> for the items in the combobox.</p>
<p>See also <a href="qcombobox.html#rootModelIndex">rootModelIndex</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/setValidator"></a>
<h3 class="fn"><a name="setValidator"></a>void QComboBox::setValidator ( const <a href="qvalidator.html">QValidator</a> * <i>validator</i> )</h3>
<p>Sets the <i>validator</i> to use instead of the current validator.</p>
<p>See also <a href="qcombobox.html#validator">validator</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/setView"></a>
<h3 class="fn"><a name="setView"></a>void QComboBox::setView ( <a href="qabstractitemview.html">QAbstractItemView</a> * <i>itemView</i> )</h3>
<p>Sets the view to be used in the combobox popup to the given <i>itemView</i>. The combobox takes ownership of the view.</p>
<p>Note: If you want to use the convenience views (like <a href="qlistwidget.html">QListWidget</a>, <a href="qtablewidget.html">QTableWidget</a> or <a href="qtreewidget.html">QTreeWidget</a>), make sure to call <a href="qcombobox.html#setModel">setModel</a>() on the combobox with the convenience widgets model before calling this function.</p>
<p>See also <a href="qcombobox.html#view">view</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/showEvent"></a>
<h3 class="fn"><a name="showEvent"></a>void QComboBox::showEvent ( <a href="qshowevent.html">QShowEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#showEvent">QWidget::showEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/showPopup"></a>
<h3 class="fn"><a name="showPopup"></a>void QComboBox::showPopup ()&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Displays the list of items in the combobox. If the list is empty then the no items will be shown.</p>
<p>If you reimplement this function to show a custom pop-up, make sure you call <a href="qcombobox.html#hidePopup">hidePopup</a>() to reset the internal state.</p>
<p>See also <a href="qcombobox.html#hidePopup">hidePopup</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/sizeHint"></a>
<h3 class="fn"><a name="sizeHint"></a><a href="qsize.html">QSize</a> QComboBox::sizeHint () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#sizeHint-prop">QWidget::sizeHint</a>().</p>
<p>This implementation caches the size hint to avoid resizing when the contents change dynamically. To invalidate the cached value change the <a href="qcombobox.html#sizeAdjustPolicy-prop">sizeAdjustPolicy</a>.</p>
<a name="//apple_ref/cpp/instm/QComboBox/validator"></a>
<h3 class="fn"><a name="validator"></a>const <a href="qvalidator.html">QValidator</a> * QComboBox::validator () const</h3>
<p>Returns the validator that is used to constrain text input for the combobox.</p>
<p>See also <a href="qcombobox.html#setValidator">setValidator</a>() and <a href="qcombobox.html#editable-prop">editable</a>.</p>
<a name="//apple_ref/cpp/instm/QComboBox/view"></a>
<h3 class="fn"><a name="view"></a><a href="qabstractitemview.html">QAbstractItemView</a> * QComboBox::view () const</h3>
<p>Returns the list view used for the combobox popup.</p>
<p>See also <a href="qcombobox.html#setView">setView</a>().</p>
<a name="//apple_ref/cpp/instm/QComboBox/wheelEvent"></a>
<h3 class="fn"><a name="wheelEvent"></a>void QComboBox::wheelEvent ( <a href="qwheelevent.html">QWheelEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#wheelEvent">QWidget::wheelEvent</a>().</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="40%" align="left">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="40%" align="right"><div align="right">Qt 4.6.3</div></td>
</tr></table></div></address></body>
</html>