Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-updates > by-pkgid > d5e62c01ae8d1e579463c6a871dd44bf > files > 3699

qtbase5-doc-5.12.6-2.mga7.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" />
<!-- qcombobox.cpp -->
  <title>QComboBox Class | Qt Widgets 5.12.6</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.12</td><td ><a href="qtwidgets-index.html">Qt Widgets</a></td><td ><a href="qtwidgets-module.html">C++ Classes</a></td><td >QComboBox</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtwidgets-index.html">Qt 5.12.6 Reference Documentation</a></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="#public-types">Public Types</a></li>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#reimplemented-public-functions">Reimplemented 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="#static-public-members">Static Public Members</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">QComboBox Class</h1>
<!-- $$$QComboBox-brief -->
<p>The <a href="qcombobox.html">QComboBox</a> widget is a combined button and popup list. <a href="#details">More...</a></p>
<!-- @@@QComboBox -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QComboBox&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="qwidget.html">QWidget</a></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qfontcombobox.html">QFontComboBox</a></p>
</td></tr></table></div><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>
</ul>
<a name="public-types"></a>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#InsertPolicy-enum">InsertPolicy</a></b> { NoInsert, InsertAtTop, InsertAtCurrent, InsertAtBottom, ..., InsertAlphabetically }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#SizeAdjustPolicy-enum">SizeAdjustPolicy</a></b> { AdjustToContents, AdjustToContentsOnFirstShow, AdjustToMinimumContentsLength, AdjustToMinimumContentsLengthWithIcon }</td></tr>
</table></div>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<div class="table"><table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><b><a href="qcombobox.html#count-prop">count</a></b> : const int</li>
<li class="fn"><b><a href="qcombobox.html#currentData-prop">currentData</a></b> : const QVariant</li>
<li class="fn"><b><a href="qcombobox.html#currentIndex-prop">currentIndex</a></b> : int</li>
<li class="fn"><b><a href="qcombobox.html#currentText-prop">currentText</a></b> : QString</li>
<li class="fn"><b><a href="qcombobox.html#duplicatesEnabled-prop">duplicatesEnabled</a></b> : bool</li>
<li class="fn"><b><a href="qcombobox.html#editable-prop">editable</a></b> : bool</li>
<li class="fn"><b><a href="qcombobox.html#frame-prop">frame</a></b> : bool</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><b><a href="qcombobox.html#iconSize-prop">iconSize</a></b> : QSize</li>
<li class="fn"><b><a href="qcombobox.html#insertPolicy-prop">insertPolicy</a></b> : InsertPolicy</li>
<li class="fn"><b><a href="qcombobox.html#maxCount-prop">maxCount</a></b> : int</li>
<li class="fn"><b><a href="qcombobox.html#maxVisibleItems-prop">maxVisibleItems</a></b> : int</li>
<li class="fn"><b><a href="qcombobox.html#minimumContentsLength-prop">minimumContentsLength</a></b> : int</li>
<li class="fn"><b><a href="qcombobox.html#modelColumn-prop">modelColumn</a></b> : int</li>
<li class="fn"><b><a href="qcombobox.html#sizeAdjustPolicy-prop">sizeAdjustPolicy</a></b> : SizeAdjustPolicy</li>
</ul>
</td></tr>
</table></div>
<ul>
<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="qcombobox.html#QComboBox">QComboBox</a></b>(QWidget *<i>parent</i> = nullptr)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#dtor.QComboBox">~QComboBox</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><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 rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#addItem-1">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 rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#addItems">addItems</a></b>(const QStringList &amp;<i>texts</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QCompleter *</td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#completer">completer</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#count-prop">count</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVariant </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#currentData-prop">currentData</a></b>(int <i>role</i> = Qt::UserRole) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#currentIndex-prop">currentIndex</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#currentText-prop">currentText</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#duplicatesEnabled-prop">duplicatesEnabled</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><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> = static_cast&lt;Qt::MatchFlags&gt;(Qt::MatchExactly|Qt::MatchCaseSensitive)) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#findText">findText</a></b>(const QString &amp;<i>text</i>, Qt::MatchFlags <i>flags</i> = ...) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#frame-prop">hasFrame</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#hidePopup">hidePopup</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSize </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#iconSize-prop">iconSize</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><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 rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#insertItem-1">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 rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><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 rightAlign topAlign"> QComboBox::InsertPolicy </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#insertPolicy-prop">insertPolicy</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#insertSeparator">insertSeparator</a></b>(int <i>index</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#editable-prop">isEditable</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVariant </td><td class="memItemRight bottomAlign"><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 rightAlign topAlign"> QAbstractItemDelegate *</td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#itemDelegate">itemDelegate</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QIcon </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.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="qcombobox.html#itemText">itemText</a></b>(int <i>index</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QLineEdit *</td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#lineEdit">lineEdit</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#maxCount-prop">maxCount</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#maxVisibleItems-prop">maxVisibleItems</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#minimumContentsLength-prop">minimumContentsLength</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAbstractItemModel *</td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#model">model</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#modelColumn-prop">modelColumn</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#removeItem">removeItem</a></b>(int <i>index</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QModelIndex </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#rootModelIndex">rootModelIndex</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#setCompleter">setCompleter</a></b>(QCompleter *<i>completer</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#duplicatesEnabled-prop">setDuplicatesEnabled</a></b>(bool <i>enable</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#editable-prop">setEditable</a></b>(bool <i>editable</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#frame-prop">setFrame</a></b>(<i>bool</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#iconSize-prop">setIconSize</a></b>(const QSize &amp;<i>size</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#insertPolicy-prop">setInsertPolicy</a></b>(QComboBox::InsertPolicy <i>policy</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><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 rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#setItemDelegate">setItemDelegate</a></b>(QAbstractItemDelegate *<i>delegate</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><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 rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><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 rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#setLineEdit">setLineEdit</a></b>(QLineEdit *<i>edit</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#maxCount-prop">setMaxCount</a></b>(int <i>max</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#maxVisibleItems-prop">setMaxVisibleItems</a></b>(int <i>maxItems</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#minimumContentsLength-prop">setMinimumContentsLength</a></b>(int <i>characters</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#setModel">setModel</a></b>(QAbstractItemModel *<i>model</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#modelColumn-prop">setModelColumn</a></b>(int <i>visibleColumn</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#setRootModelIndex">setRootModelIndex</a></b>(const QModelIndex &amp;<i>index</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#sizeAdjustPolicy-prop">setSizeAdjustPolicy</a></b>(QComboBox::SizeAdjustPolicy <i>policy</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#setValidator">setValidator</a></b>(const QValidator *<i>validator</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#setView">setView</a></b>(QAbstractItemView *<i>itemView</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#showPopup">showPopup</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QComboBox::SizeAdjustPolicy </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#sizeAdjustPolicy-prop">sizeAdjustPolicy</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QValidator *</td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#validator">validator</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAbstractItemView *</td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#view">view</a></b>() const</td></tr>
</table></div>
<a name="reimplemented-public-functions"></a>
<h2 id="reimplemented-public-functions">Reimplemented Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#event">event</a></b>(QEvent *<i>event</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QVariant </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#inputMethodQuery">inputMethodQuery</a></b>(Qt::InputMethodQuery <i>query</i>) const override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSize </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#minimumSizeHint">minimumSizeHint</a></b>() const override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSize </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#sizeHint">sizeHint</a></b>() const override</td></tr>
</table></div>
<ul>
<li class="fn">214 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li class="fn">31 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="qcombobox.html#clear">clear</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#clearEditText">clearEditText</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.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="qcombobox.html#currentText-prop">setCurrentText</a></b>(const QString &amp;<i>text</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#setEditText">setEditText</a></b>(const QString &amp;<i>text</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="qcombobox.html#activated">activated</a></b>(int <i>index</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#activated-1">activated</a></b>(const QString &amp;<i>text</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#currentIndexChanged">currentIndexChanged</a></b>(int <i>index</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#currentIndexChanged-1">currentIndexChanged</a></b>(const QString &amp;<i>text</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#currentTextChanged">currentTextChanged</a></b>(const QString &amp;<i>text</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#editTextChanged">editTextChanged</a></b>(const QString &amp;<i>text</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#highlighted">highlighted</a></b>(int <i>index</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#highlighted-1">highlighted</a></b>(const QString &amp;<i>text</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="static-public-members"></a>
<h2 id="static-public-members">Static Public Members</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> const QMetaObject </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#staticMetaObject-var">staticMetaObject</a></b></td></tr>
</table></div>
<ul>
<li class="fn">5 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li class="fn">9 static public members inherited from <a href="../qtcore/qobject.html#static-public-members">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"> void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#initStyleOption">initStyleOption</a></b>(QStyleOptionComboBox *<i>option</i>) const</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="qcombobox.html#changeEvent">changeEvent</a></b>(QEvent *<i>e</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#contextMenuEvent">contextMenuEvent</a></b>(QContextMenuEvent *<i>e</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#focusInEvent">focusInEvent</a></b>(QFocusEvent *<i>e</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#focusOutEvent">focusOutEvent</a></b>(QFocusEvent *<i>e</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#hideEvent">hideEvent</a></b>(QHideEvent *<i>e</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#inputMethodEvent">inputMethodEvent</a></b>(QInputMethodEvent *<i>e</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#keyPressEvent">keyPressEvent</a></b>(QKeyEvent *<i>e</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#keyReleaseEvent">keyReleaseEvent</a></b>(QKeyEvent *<i>e</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#mousePressEvent">mousePressEvent</a></b>(QMouseEvent *<i>e</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#mouseReleaseEvent">mouseReleaseEvent</a></b>(QMouseEvent *<i>e</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#paintEvent">paintEvent</a></b>(QPaintEvent *<i>e</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#resizeEvent">resizeEvent</a></b>(QResizeEvent *<i>e</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#showEvent">showEvent</a></b>(QShowEvent *<i>e</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qcombobox.html#wheelEvent">wheelEvent</a></b>(QWheelEvent *<i>e</i>) override</td></tr>
</table></div>
<ul>
<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 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<a name="details"></a>
<!-- $$$QComboBox-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qcombobox.html">QComboBox</a> widget is a combined button and popup list.</p>
<p class="centerAlign"><img src="images/windows-combobox.png" alt="" /></p><p>A <a href="qcombobox.html">QComboBox</a> 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="../qtcore/qstring.html">QString</a> argument and one with an <code>int</code> argument. If the user selects or highlights a pixmap, only the <code>int</code> 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 <a href="qcombobox.html#InsertPolicy-enum">InsertAtBottom</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="../qtgui/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 text(). 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><a href="qcombobox.html">QComboBox</a> 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="../qtgui/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 <a href="qcombobox.html">QComboBox</a> 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="../qtcore/qt.html#ItemDataRole-enum">Qt::DisplayRole</a> and <a href="../qtcore/qt.html#ItemDataRole-enum">Qt::DecorationRole</a> is used. Note that you cannot alter the <a href="qabstractitemview.html#SelectionMode-enum">SelectionMode</a> of the <a href="qcombobox.html#view">view</a>(), e.g&#x2e;, by using <a href="qabstractitemview.html#selectionMode-prop">setSelectionMode()</a>.</p>
</div>
<p><b>See also </b><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>
<!-- @@@QComboBox -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$InsertPolicy$$$NoInsert$$$InsertAtTop$$$InsertAtCurrent$$$InsertAtBottom$$$InsertAfterCurrent$$$InsertBeforeCurrent$$$InsertAlphabetically -->
<h3 class="fn" id="InsertPolicy-enum"><a name="InsertPolicy-enum"></a>enum QComboBox::<span class="name">InsertPolicy</span></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>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QComboBox::NoInsert</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">The string will not be inserted into the combobox.</td></tr>
<tr><td class="topAlign"><code>QComboBox::InsertAtTop</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">The string will be inserted as the first item in the combobox.</td></tr>
<tr><td class="topAlign"><code>QComboBox::InsertAtCurrent</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">The current item will be <i>replaced</i> by the string.</td></tr>
<tr><td class="topAlign"><code>QComboBox::InsertAtBottom</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">The string will be inserted after the last item in the combobox.</td></tr>
<tr><td class="topAlign"><code>QComboBox::InsertAfterCurrent</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">The string is inserted after the current item in the combobox.</td></tr>
<tr><td class="topAlign"><code>QComboBox::InsertBeforeCurrent</code></td><td class="topAlign tblval"><code>5</code></td><td class="topAlign">The string is inserted before the current item in the combobox.</td></tr>
<tr><td class="topAlign"><code>QComboBox::InsertAlphabetically</code></td><td class="topAlign tblval"><code>6</code></td><td class="topAlign">The string is inserted in the alphabetic order in the combobox.</td></tr>
</table></div>
<!-- @@@InsertPolicy -->
<!-- $$$SizeAdjustPolicy$$$AdjustToContents$$$AdjustToContentsOnFirstShow$$$AdjustToMinimumContentsLength$$$AdjustToMinimumContentsLengthWithIcon -->
<h3 class="fn" id="SizeAdjustPolicy-enum"><a name="SizeAdjustPolicy-enum"></a>enum QComboBox::<span class="name">SizeAdjustPolicy</span></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>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code>QComboBox::AdjustToContents</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">The combobox will always adjust to the contents</td></tr>
<tr><td class="topAlign"><code>QComboBox::AdjustToContentsOnFirstShow</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">The combobox will adjust to its contents the first time it is shown.</td></tr>
<tr><td class="topAlign"><code>QComboBox::AdjustToMinimumContentsLength</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">Use AdjustToContents or AdjustToContentsOnFirstShow instead.</td></tr>
<tr><td class="topAlign"><code>QComboBox::AdjustToMinimumContentsLengthWithIcon</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">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></div>
<!-- @@@SizeAdjustPolicy -->
</div>
<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 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>
<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 -->
<!-- $$$currentData-prop$$$currentDataint -->
<h3 class="fn" id="currentData-prop"><a name="currentData-prop"></a><span class="name">currentData</span> : const <span class="type"><a href="../qtcore/qvariant.html">QVariant</a></span></h3>
<p>This property holds the data for 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 invalid <a href="../qtcore/qvariant.html">QVariant</a>.</p>
<p>This property was introduced in  Qt 5.2.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QVariant </td><td class="memItemRight bottomAlign"><span class="name"><b>currentData</b></span>(int <i>role</i> = Qt::UserRole) const</td></tr>
</table></div>
<!-- @@@currentData -->
<!-- $$$currentIndex-prop$$$currentIndex$$$setCurrentIndexint$$$currentIndexChangedint$$$currentIndexChangedconstQString& -->
<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 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>
<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="qcombobox.html#currentIndexChanged">currentIndexChanged</a></b></span>(int <i>index</i>)</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qcombobox.html#currentIndexChanged-1">currentIndexChanged</a></b></span>(const QString &amp;<i>text</i>)</td></tr>
</table></div>
<!-- @@@currentIndex -->
<!-- $$$currentText-prop$$$currentText$$$setCurrentTextconstQString&$$$currentTextChangedconstQString& -->
<h3 class="fn" id="currentText-prop"><a name="currentText-prop"></a><span class="name">currentText</span> : <span class="type"><a href="../qtcore/qstring.html">QString</a></span></h3>
<p>This property holds the current text</p>
<p>If the combo box is editable, the current text is the value displayed by the line edit. Otherwise, it is the value of the current item or an empty string if the combo box is empty or no current item is set.</p>
<p>The setter setCurrentText() simply calls <a href="qcombobox.html#setEditText">setEditText</a>() if the combo box is editable. Otherwise, if there is a matching text in the list, <a href="qcombobox.html#currentIndex-prop">currentIndex</a> is set to the corresponding index.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>currentText</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setCurrentText</b></span>(const QString &amp;<i>text</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="qcombobox.html#currentTextChanged">currentTextChanged</a></b></span>(const QString &amp;<i>text</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qcombobox.html#editable-prop">editable</a> and <a href="qcombobox.html#setEditText">setEditText</a>().</p>
<!-- @@@currentText -->
<!-- $$$duplicatesEnabled-prop$$$duplicatesEnabled$$$setDuplicatesEnabledbool -->
<h3 class="fn" id="duplicatesEnabled-prop"><a name="duplicatesEnabled-prop"></a><span class="name">duplicatesEnabled</span> : <span class="type">bool</span></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 <code>false</code> (duplicates are not allowed).</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>duplicatesEnabled</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setDuplicatesEnabled</b></span>(bool <i>enable</i>)</td></tr>
</table></div>
<!-- @@@duplicatesEnabled -->
<!-- $$$editable-prop$$$isEditable$$$setEditablebool -->
<h3 class="fn" id="editable-prop"><a name="editable-prop"></a><span class="name">editable</span> : <span class="type">bool</span></h3>
<p>This property holds whether the combo box can be edited by the user</p>
<p>By default, this property is <code>false</code>. The effect of editing depends on the insert policy.</p>
<p><b>Note: </b>When disabling the <i>editable</i> state, the validator and completer are removed.</p><p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isEditable</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setEditable</b></span>(bool <i>editable</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qcombobox.html#InsertPolicy-enum">InsertPolicy</a>.</p>
<!-- @@@editable -->
<!-- $$$frame-prop$$$hasFrame$$$setFramebool -->
<h3 class="fn" id="frame-prop"><a name="frame-prop"></a><span class="name">frame</span> : <span class="type">bool</span></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>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>hasFrame</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setFrame</b></span>(<i>bool</i>)</td></tr>
</table></div>
<!-- @@@frame -->
<!-- $$$iconSize-prop$$$iconSize$$$setIconSizeconstQSize& -->
<h3 class="fn" id="iconSize-prop"><a name="iconSize-prop"></a><span class="name">iconSize</span> : <span class="type"><a href="../qtcore/qsize.html">QSize</a></span></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>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QSize </td><td class="memItemRight bottomAlign"><span class="name"><b>iconSize</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setIconSize</b></span>(const QSize &amp;<i>size</i>)</td></tr>
</table></div>
<!-- @@@iconSize -->
<!-- $$$insertPolicy-prop$$$insertPolicy$$$setInsertPolicyQComboBox::InsertPolicy -->
<h3 class="fn" id="insertPolicy-prop"><a name="insertPolicy-prop"></a><span class="name">insertPolicy</span> : <span class="type"><a href="qcombobox.html#InsertPolicy-enum">InsertPolicy</a></span></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">InsertAtBottom</a>, indicating that new items will appear at the bottom of the list of items.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QComboBox::InsertPolicy </td><td class="memItemRight bottomAlign"><span class="name"><b>insertPolicy</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setInsertPolicy</b></span>(QComboBox::InsertPolicy <i>policy</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qcombobox.html#InsertPolicy-enum">InsertPolicy</a>.</p>
<!-- @@@insertPolicy -->
<!-- $$$maxCount-prop$$$maxCount$$$setMaxCountint -->
<h3 class="fn" id="maxCount-prop"><a name="maxCount-prop"></a><span class="name">maxCount</span> : <span class="type">int</span></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>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>maxCount</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setMaxCount</b></span>(int <i>max</i>)</td></tr>
</table></div>
<!-- @@@maxCount -->
<!-- $$$maxVisibleItems-prop$$$maxVisibleItems$$$setMaxVisibleItemsint -->
<h3 class="fn" id="maxVisibleItems-prop"><a name="maxVisibleItems-prop"></a><span class="name">maxVisibleItems</span> : <span class="type">int</span></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 styles that returns true for <a href="qstyle.html#StyleHint-enum">QStyle::SH_ComboBox_Popup</a> such as the Mac style or the Gtk+ Style.</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>maxVisibleItems</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setMaxVisibleItems</b></span>(int <i>maxItems</i>)</td></tr>
</table></div>
<!-- @@@maxVisibleItems -->
<!-- $$$minimumContentsLength-prop$$$minimumContentsLength$$$setMinimumContentsLengthint -->
<h3 class="fn" id="minimumContentsLength-prop"><a name="minimumContentsLength-prop"></a><span class="name">minimumContentsLength</span> : <span class="type">int</span></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>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>minimumContentsLength</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setMinimumContentsLength</b></span>(int <i>characters</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qcombobox.html#sizeAdjustPolicy-prop">sizeAdjustPolicy</a>.</p>
<!-- @@@minimumContentsLength -->
<!-- $$$modelColumn-prop$$$modelColumn$$$setModelColumnint -->
<h3 class="fn" id="modelColumn-prop"><a name="modelColumn-prop"></a><span class="name">modelColumn</span> : <span class="type">int</span></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>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>modelColumn</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setModelColumn</b></span>(int <i>visibleColumn</i>)</td></tr>
</table></div>
<!-- @@@modelColumn -->
<!-- $$$sizeAdjustPolicy-prop$$$sizeAdjustPolicy$$$setSizeAdjustPolicyQComboBox::SizeAdjustPolicy -->
<h3 class="fn" id="sizeAdjustPolicy-prop"><a name="sizeAdjustPolicy-prop"></a><span class="name">sizeAdjustPolicy</span> : <span class="type"><a href="qcombobox.html#SizeAdjustPolicy-enum">SizeAdjustPolicy</a></span></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>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QComboBox::SizeAdjustPolicy </td><td class="memItemRight bottomAlign"><span class="name"><b>sizeAdjustPolicy</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setSizeAdjustPolicy</b></span>(QComboBox::SizeAdjustPolicy <i>policy</i>)</td></tr>
</table></div>
<p><b>See also </b><a href="qcombobox.html#SizeAdjustPolicy-enum">SizeAdjustPolicy</a>.</p>
<!-- @@@sizeAdjustPolicy -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QComboBox[overload1]$$$QComboBoxQWidget* -->
<h3 class="fn" id="QComboBox"><a name="QComboBox"></a>QComboBox::<span class="name">QComboBox</span>(<span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<i>parent</i> = nullptr)</h3>
<p>Constructs a combobox with the given <i>parent</i>, using the default model <a href="../qtgui/qstandarditemmodel.html">QStandardItemModel</a>.</p>
<!-- @@@QComboBox -->
<!-- $$$~QComboBox[overload1]$$$~QComboBox -->
<h3 class="fn" id="dtor.QComboBox"><a name="dtor.QComboBox"></a><code>[virtual] </code>QComboBox::<span class="name">~QComboBox</span>()</h3>
<p>Destroys the combobox.</p>
<!-- @@@~QComboBox -->
<!-- $$$activated[overload1]$$$activatedint -->
<h3 class="fn" id="activated"><a name="activated"></a><code>[signal] </code><span class="type">void</span> QComboBox::<span class="name">activated</span>(<span class="type">int</span> <i>index</i>)</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>
<p><b>Note:</b> Signal <i>activated</i> is overloaded in this class. To connect to this signal by using the function pointer syntax, Qt provides a convenient helper for obtaining the function pointer as shown in this example:<pre class="cpp">

  connect(comboBox<span class="operator">,</span> <span class="type">QOverload</span><span class="operator">&lt;</span><span class="type">int</span><span class="operator">&gt;</span><span class="operator">::</span>of(<span class="operator">&amp;</span><span class="type"><a href="qcombobox.html#QComboBox">QComboBox</a></span><span class="operator">::</span>activated)<span class="operator">,</span>
      <span class="operator">[</span><span class="operator">=</span><span class="operator">]</span>(<span class="type">int</span> index){ <span class="comment">/* ... */</span> });

</pre>
<!-- @@@activated -->
<!-- $$$activated$$$activatedconstQString& -->
<h3 class="fn" id="activated-1"><a name="activated-1"></a><code>[signal] </code><span class="type">void</span> QComboBox::<span class="name">activated</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>text</i>)</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>
<p><b>Note:</b> Signal <i>activated</i> is overloaded in this class. To connect to this signal by using the function pointer syntax, Qt provides a convenient helper for obtaining the function pointer as shown in this example:<pre class="cpp">

  connect(comboBox<span class="operator">,</span> <span class="type">QOverload</span><span class="operator">&lt;</span><span class="keyword">const</span> <span class="type"><a href="../qtcore/qstring.html">QString</a></span> <span class="operator">&amp;</span><span class="operator">&gt;</span><span class="operator">::</span>of(<span class="operator">&amp;</span><span class="type"><a href="qcombobox.html#QComboBox">QComboBox</a></span><span class="operator">::</span>activated)<span class="operator">,</span>
      <span class="operator">[</span><span class="operator">=</span><span class="operator">]</span>(<span class="keyword">const</span> <span class="type"><a href="../qtcore/qstring.html">QString</a></span> <span class="operator">&amp;</span>text){ <span class="comment">/* ... */</span> });

</pre>
<!-- @@@activated -->
<!-- $$$addItem[overload1]$$$addItemconstQString&constQVariant& -->
<h3 class="fn" id="addItem"><a name="addItem"></a><span class="type">void</span> QComboBox::<span class="name">addItem</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>text</i>, const <span class="type"><a href="../qtcore/qvariant.html">QVariant</a></span> &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="../qtcore/qt.html#ItemDataRole-enum">Qt::UserRole</a>). The item is appended to the list of existing items.</p>
<!-- @@@addItem -->
<!-- $$$addItem$$$addItemconstQIcon&constQString&constQVariant& -->
<h3 class="fn" id="addItem-1"><a name="addItem-1"></a><span class="type">void</span> QComboBox::<span class="name">addItem</span>(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>, const <span class="type"><a href="../qtcore/qvariant.html">QVariant</a></span> &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="../qtcore/qt.html#ItemDataRole-enum">Qt::UserRole</a>). The item is appended to the list of existing items.</p>
<!-- @@@addItem -->
<!-- $$$addItems[overload1]$$$addItemsconstQStringList& -->
<h3 class="fn" id="addItems"><a name="addItems"></a><span class="type">void</span> QComboBox::<span class="name">addItems</span>(const <span class="type"><a href="../qtcore/qstringlist.html">QStringList</a></span> &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>
<!-- @@@addItems -->
<!-- $$$changeEvent[overload1]$$$changeEventQEvent* -->
<h3 class="fn" id="changeEvent"><a name="changeEvent"></a><code>[override virtual protected] </code><span class="type">void</span> QComboBox::<span class="name">changeEvent</span>(<span class="type"><a href="../qtcore/qevent.html">QEvent</a></span> *<i>e</i>)</h3>
<p>Reimplemented from <a href="qwidget.html#changeEvent">QWidget::changeEvent</a>().</p>
<!-- @@@changeEvent -->
<!-- $$$clear[overload1]$$$clear -->
<h3 class="fn" id="clear"><a name="clear"></a><code>[slot] </code><span class="type">void</span> QComboBox::<span class="name">clear</span>()</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>
<!-- @@@clear -->
<!-- $$$clearEditText[overload1]$$$clearEditText -->
<h3 class="fn" id="clearEditText"><a name="clearEditText"></a><code>[slot] </code><span class="type">void</span> QComboBox::<span class="name">clearEditText</span>()</h3>
<p>Clears the contents of the line edit used for editing in the combobox.</p>
<!-- @@@clearEditText -->
<!-- $$$completer[overload1]$$$completer -->
<h3 class="fn" id="completer"><a name="completer"></a><span class="type"><a href="qcompleter.html">QCompleter</a></span> *QComboBox::<span class="name">completer</span>() 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><b>See also </b><a href="qcombobox.html#setCompleter">setCompleter</a>() and <a href="qcombobox.html#editable-prop">editable</a>.</p>
<!-- @@@completer -->
<!-- $$$contextMenuEvent[overload1]$$$contextMenuEventQContextMenuEvent* -->
<h3 class="fn" id="contextMenuEvent"><a name="contextMenuEvent"></a><code>[override virtual protected] </code><span class="type">void</span> QComboBox::<span class="name">contextMenuEvent</span>(<span class="type"><a href="../qtgui/qcontextmenuevent.html">QContextMenuEvent</a></span> *<i>e</i>)</h3>
<p>Reimplemented from <a href="qwidget.html#contextMenuEvent">QWidget::contextMenuEvent</a>().</p>
<!-- @@@contextMenuEvent -->
<!-- $$$currentIndexChanged -->
<h3 class="fn" id="currentIndexChanged"><a name="currentIndexChanged"></a><code>[signal] </code><span class="type">void</span> QComboBox::<span class="name">currentIndexChanged</span>(<span class="type">int</span> <i>index</i>)</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><b>Note:</b> Signal <i>currentIndexChanged</i> is overloaded in this class. To connect to this signal by using the function pointer syntax, Qt provides a convenient helper for obtaining the function pointer as shown in this example:<pre class="cpp">

  connect(comboBox<span class="operator">,</span> <span class="type">QOverload</span><span class="operator">&lt;</span><span class="type">int</span><span class="operator">&gt;</span><span class="operator">::</span>of(<span class="operator">&amp;</span><span class="type"><a href="qcombobox.html#QComboBox">QComboBox</a></span><span class="operator">::</span>currentIndexChanged)<span class="operator">,</span>
      <span class="operator">[</span><span class="operator">=</span><span class="operator">]</span>(<span class="type">int</span> index){ <span class="comment">/* ... */</span> });

</pre>
<p>This function was introduced in  Qt 4.1.</p>
<p><b>Note:</b> Notifier signal for property <a href="qcombobox.html#currentIndex-prop">currentIndex</a>. </p><!-- @@@currentIndexChanged -->
<!-- $$$currentIndexChanged -->
<h3 class="fn" id="currentIndexChanged-1"><a name="currentIndexChanged-1"></a><code>[signal] </code><span class="type">void</span> QComboBox::<span class="name">currentIndexChanged</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>text</i>)</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><b>Note:</b> Signal <i>currentIndexChanged</i> is overloaded in this class. To connect to this signal by using the function pointer syntax, Qt provides a convenient helper for obtaining the function pointer as shown in this example:<pre class="cpp">

  connect(comboBox<span class="operator">,</span> <span class="type">QOverload</span><span class="operator">&lt;</span><span class="keyword">const</span> <span class="type"><a href="../qtcore/qstring.html">QString</a></span> <span class="operator">&amp;</span><span class="operator">&gt;</span><span class="operator">::</span>of(<span class="operator">&amp;</span><span class="type"><a href="qcombobox.html#QComboBox">QComboBox</a></span><span class="operator">::</span>currentIndexChanged)<span class="operator">,</span>
      <span class="operator">[</span><span class="operator">=</span><span class="operator">]</span>(<span class="keyword">const</span> <span class="type"><a href="../qtcore/qstring.html">QString</a></span> <span class="operator">&amp;</span>text){ <span class="comment">/* ... */</span> });

</pre>
<p>This function was introduced in  Qt 4.1.</p>
<p><b>Note:</b> Notifier signal for property <a href="qcombobox.html#currentIndex-prop">currentIndex</a>. </p><!-- @@@currentIndexChanged -->
<!-- $$$currentTextChanged -->
<h3 class="fn" id="currentTextChanged"><a name="currentTextChanged"></a><code>[signal] </code><span class="type">void</span> QComboBox::<span class="name">currentTextChanged</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>text</i>)</h3>
<p>This signal is sent whenever <a href="qcombobox.html#currentText-prop">currentText</a> changes. The new value is passed as <i>text</i>.</p>
<p>This function was introduced in  Qt 5.0.</p>
<p><b>Note:</b> Notifier signal for property <a href="qcombobox.html#currentText-prop">currentText</a>. </p><!-- @@@currentTextChanged -->
<!-- $$$editTextChanged[overload1]$$$editTextChangedconstQString& -->
<h3 class="fn" id="editTextChanged"><a name="editTextChanged"></a><code>[signal] </code><span class="type">void</span> QComboBox::<span class="name">editTextChanged</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>text</i>)</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>
<!-- @@@editTextChanged -->
<!-- $$$event[overload1]$$$eventQEvent* -->
<h3 class="fn" id="event"><a name="event"></a><code>[override virtual] </code><span class="type">bool</span> QComboBox::<span class="name">event</span>(<span class="type"><a href="../qtcore/qevent.html">QEvent</a></span> *<i>event</i>)</h3>
<p>Reimplemented from <a href="qwidget.html#event">QWidget::event</a>().</p>
<!-- @@@event -->
<!-- $$$findData[overload1]$$$findDataconstQVariant&intQt::MatchFlags -->
<h3 class="fn" id="findData"><a name="findData"></a><span class="type">int</span> QComboBox::<span class="name">findData</span>(const <span class="type"><a href="../qtcore/qvariant.html">QVariant</a></span> &amp;<i>data</i>, <span class="type">int</span> <i>role</i> = Qt::UserRole, <span class="type"><a href="../qtcore/qt.html#MatchFlag-enum">Qt::MatchFlags</a></span> <i>flags</i> = static_cast&lt;Qt::MatchFlags&gt;(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>
<!-- @@@findData -->
<!-- $$$findText[overload1]$$$findTextconstQString&Qt::MatchFlags -->
<h3 class="fn" id="findText"><a name="findText"></a><span class="type">int</span> QComboBox::<span class="name">findText</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>text</i>, <span class="type"><a href="../qtcore/qt.html#MatchFlag-enum">Qt::MatchFlags</a></span> <i>flags</i> = ...) 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>
<!-- @@@findText -->
<!-- $$$focusInEvent[overload1]$$$focusInEventQFocusEvent* -->
<h3 class="fn" id="focusInEvent"><a name="focusInEvent"></a><code>[override virtual protected] </code><span class="type">void</span> QComboBox::<span class="name">focusInEvent</span>(<span class="type"><a href="../qtgui/qfocusevent.html">QFocusEvent</a></span> *<i>e</i>)</h3>
<p>Reimplemented from <a href="qwidget.html#focusInEvent">QWidget::focusInEvent</a>().</p>
<!-- @@@focusInEvent -->
<!-- $$$focusOutEvent[overload1]$$$focusOutEventQFocusEvent* -->
<h3 class="fn" id="focusOutEvent"><a name="focusOutEvent"></a><code>[override virtual protected] </code><span class="type">void</span> QComboBox::<span class="name">focusOutEvent</span>(<span class="type"><a href="../qtgui/qfocusevent.html">QFocusEvent</a></span> *<i>e</i>)</h3>
<p>Reimplemented from <a href="qwidget.html#focusOutEvent">QWidget::focusOutEvent</a>().</p>
<!-- @@@focusOutEvent -->
<!-- $$$hideEvent[overload1]$$$hideEventQHideEvent* -->
<h3 class="fn" id="hideEvent"><a name="hideEvent"></a><code>[override virtual protected] </code><span class="type">void</span> QComboBox::<span class="name">hideEvent</span>(<span class="type"><a href="../qtgui/qhideevent.html">QHideEvent</a></span> *<i>e</i>)</h3>
<p>Reimplemented from <a href="qwidget.html#hideEvent">QWidget::hideEvent</a>().</p>
<!-- @@@hideEvent -->
<!-- $$$hidePopup[overload1]$$$hidePopup -->
<h3 class="fn" id="hidePopup"><a name="hidePopup"></a><code>[virtual] </code><span class="type">void</span> QComboBox::<span class="name">hidePopup</span>()</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><b>See also </b><a href="qcombobox.html#showPopup">showPopup</a>().</p>
<!-- @@@hidePopup -->
<!-- $$$highlighted[overload1]$$$highlightedint -->
<h3 class="fn" id="highlighted"><a name="highlighted"></a><code>[signal] </code><span class="type">void</span> QComboBox::<span class="name">highlighted</span>(<span class="type">int</span> <i>index</i>)</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>
<p><b>Note:</b> Signal <i>highlighted</i> is overloaded in this class. To connect to this signal by using the function pointer syntax, Qt provides a convenient helper for obtaining the function pointer as shown in this example:<pre class="cpp">

  connect(comboBox<span class="operator">,</span> <span class="type">QOverload</span><span class="operator">&lt;</span><span class="type">int</span><span class="operator">&gt;</span><span class="operator">::</span>of(<span class="operator">&amp;</span><span class="type"><a href="qcombobox.html#QComboBox">QComboBox</a></span><span class="operator">::</span>highlighted)<span class="operator">,</span>
      <span class="operator">[</span><span class="operator">=</span><span class="operator">]</span>(<span class="type">int</span> index){ <span class="comment">/* ... */</span> });

</pre>
<!-- @@@highlighted -->
<!-- $$$highlighted$$$highlightedconstQString& -->
<h3 class="fn" id="highlighted-1"><a name="highlighted-1"></a><code>[signal] </code><span class="type">void</span> QComboBox::<span class="name">highlighted</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>text</i>)</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>
<p><b>Note:</b> Signal <i>highlighted</i> is overloaded in this class. To connect to this signal by using the function pointer syntax, Qt provides a convenient helper for obtaining the function pointer as shown in this example:<pre class="cpp">

  connect(comboBox<span class="operator">,</span> <span class="type">QOverload</span><span class="operator">&lt;</span><span class="keyword">const</span> <span class="type"><a href="../qtcore/qstring.html">QString</a></span> <span class="operator">&amp;</span><span class="operator">&gt;</span><span class="operator">::</span>of(<span class="operator">&amp;</span><span class="type"><a href="qcombobox.html#QComboBox">QComboBox</a></span><span class="operator">::</span>highlighted)<span class="operator">,</span>
      <span class="operator">[</span><span class="operator">=</span><span class="operator">]</span>(<span class="keyword">const</span> <span class="type"><a href="../qtcore/qstring.html">QString</a></span> <span class="operator">&amp;</span>text){ <span class="comment">/* ... */</span> });

</pre>
<!-- @@@highlighted -->
<!-- $$$initStyleOption[overload1]$$$initStyleOptionQStyleOptionComboBox* -->
<h3 class="fn" id="initStyleOption"><a name="initStyleOption"></a><code>[protected] </code><span class="type">void</span> QComboBox::<span class="name">initStyleOption</span>(<span class="type"><a href="qstyleoptioncombobox.html">QStyleOptionComboBox</a></span> *<i>option</i>) const</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><b>See also </b><a href="qstyleoption.html#initFrom">QStyleOption::initFrom</a>().</p>
<!-- @@@initStyleOption -->
<!-- $$$inputMethodEvent[overload1]$$$inputMethodEventQInputMethodEvent* -->
<h3 class="fn" id="inputMethodEvent"><a name="inputMethodEvent"></a><code>[override virtual protected] </code><span class="type">void</span> QComboBox::<span class="name">inputMethodEvent</span>(<span class="type"><a href="../qtgui/qinputmethodevent.html">QInputMethodEvent</a></span> *<i>e</i>)</h3>
<p>Reimplemented from <a href="qwidget.html#inputMethodEvent">QWidget::inputMethodEvent</a>().</p>
<!-- @@@inputMethodEvent -->
<!-- $$$inputMethodQuery[overload1]$$$inputMethodQueryQt::InputMethodQuery -->
<h3 class="fn" id="inputMethodQuery"><a name="inputMethodQuery"></a><code>[override virtual] </code><span class="type"><a href="../qtcore/qvariant.html">QVariant</a></span> QComboBox::<span class="name">inputMethodQuery</span>(<span class="type"><a href="../qtcore/qt.html#InputMethodQuery-enum">Qt::InputMethodQuery</a></span> <i>query</i>) const</h3>
<p>Reimplemented from <a href="qwidget.html#inputMethodQuery">QWidget::inputMethodQuery</a>().</p>
<!-- @@@inputMethodQuery -->
<!-- $$$insertItem[overload1]$$$insertItemintconstQString&constQVariant& -->
<h3 class="fn" id="insertItem"><a name="insertItem"></a><span class="type">void</span> QComboBox::<span class="name">insertItem</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>, const <span class="type"><a href="../qtcore/qvariant.html">QVariant</a></span> &amp;<i>userData</i> = QVariant())</h3>
<p>Inserts the <i>text</i> and <i>userData</i> (stored in the <a href="../qtcore/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><b>See also </b><a href="qcombobox.html#insertItems">insertItems</a>().</p>
<!-- @@@insertItem -->
<!-- $$$insertItem$$$insertItemintconstQIcon&constQString&constQVariant& -->
<h3 class="fn" id="insertItem-1"><a name="insertItem-1"></a><span class="type">void</span> QComboBox::<span class="name">insertItem</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>, const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>text</i>, const <span class="type"><a href="../qtcore/qvariant.html">QVariant</a></span> &amp;<i>userData</i> = QVariant())</h3>
<p>Inserts the <i>icon</i>, <i>text</i> and <i>userData</i> (stored in the <a href="../qtcore/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><b>See also </b><a href="qcombobox.html#insertItems">insertItems</a>().</p>
<!-- @@@insertItem -->
<!-- $$$insertItems[overload1]$$$insertItemsintconstQStringList& -->
<h3 class="fn" id="insertItems"><a name="insertItems"></a><span class="type">void</span> QComboBox::<span class="name">insertItems</span>(<span class="type">int</span> <i>index</i>, const <span class="type"><a href="../qtcore/qstringlist.html">QStringList</a></span> &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><b>See also </b><a href="qcombobox.html#insertItem">insertItem</a>().</p>
<!-- @@@insertItems -->
<!-- $$$insertSeparator[overload1]$$$insertSeparatorint -->
<h3 class="fn" id="insertSeparator"><a name="insertSeparator"></a><span class="type">void</span> QComboBox::<span class="name">insertSeparator</span>(<span class="type">int</span> <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><b>See also </b><a href="qcombobox.html#insertItem">insertItem</a>().</p>
<!-- @@@insertSeparator -->
<!-- $$$itemData[overload1]$$$itemDataintint -->
<h3 class="fn" id="itemData"><a name="itemData"></a><span class="type"><a href="../qtcore/qvariant.html">QVariant</a></span> QComboBox::<span class="name">itemData</span>(<span class="type">int</span> <i>index</i>, <span class="type">int</span> <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 QVariant::Invalid if there is no data for this role.</p>
<p><b>See also </b><a href="qcombobox.html#setItemData">setItemData</a>().</p>
<!-- @@@itemData -->
<!-- $$$itemDelegate[overload1]$$$itemDelegate -->
<h3 class="fn" id="itemDelegate"><a name="itemDelegate"></a><span class="type"><a href="qabstractitemdelegate.html">QAbstractItemDelegate</a></span> *QComboBox::<span class="name">itemDelegate</span>() const</h3>
<p>Returns the item delegate used by the popup list view.</p>
<p><b>See also </b><a href="qcombobox.html#setItemDelegate">setItemDelegate</a>().</p>
<!-- @@@itemDelegate -->
<!-- $$$itemIcon[overload1]$$$itemIconint -->
<h3 class="fn" id="itemIcon"><a name="itemIcon"></a><span class="type"><a href="../qtgui/qicon.html">QIcon</a></span> QComboBox::<span class="name">itemIcon</span>(<span class="type">int</span> <i>index</i>) const</h3>
<p>Returns the icon for the given <i>index</i> in the combobox.</p>
<p><b>See also </b><a href="qcombobox.html#setItemIcon">setItemIcon</a>().</p>
<!-- @@@itemIcon -->
<!-- $$$itemText[overload1]$$$itemTextint -->
<h3 class="fn" id="itemText"><a name="itemText"></a><span class="type"><a href="../qtcore/qstring.html">QString</a></span> QComboBox::<span class="name">itemText</span>(<span class="type">int</span> <i>index</i>) const</h3>
<p>Returns the text for the given <i>index</i> in the combobox.</p>
<p><b>See also </b><a href="qcombobox.html#setItemText">setItemText</a>().</p>
<!-- @@@itemText -->
<!-- $$$keyPressEvent[overload1]$$$keyPressEventQKeyEvent* -->
<h3 class="fn" id="keyPressEvent"><a name="keyPressEvent"></a><code>[override virtual protected] </code><span class="type">void</span> QComboBox::<span class="name">keyPressEvent</span>(<span class="type"><a href="../qtgui/qkeyevent.html">QKeyEvent</a></span> *<i>e</i>)</h3>
<p>Reimplemented from <a href="qwidget.html#keyPressEvent">QWidget::keyPressEvent</a>().</p>
<!-- @@@keyPressEvent -->
<!-- $$$keyReleaseEvent[overload1]$$$keyReleaseEventQKeyEvent* -->
<h3 class="fn" id="keyReleaseEvent"><a name="keyReleaseEvent"></a><code>[override virtual protected] </code><span class="type">void</span> QComboBox::<span class="name">keyReleaseEvent</span>(<span class="type"><a href="../qtgui/qkeyevent.html">QKeyEvent</a></span> *<i>e</i>)</h3>
<p>Reimplemented from <a href="qwidget.html#keyReleaseEvent">QWidget::keyReleaseEvent</a>().</p>
<!-- @@@keyReleaseEvent -->
<!-- $$$lineEdit[overload1]$$$lineEdit -->
<h3 class="fn" id="lineEdit"><a name="lineEdit"></a><span class="type"><a href="qlineedit.html">QLineEdit</a></span> *QComboBox::<span class="name">lineEdit</span>() 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><b>See also </b><a href="qcombobox.html#setLineEdit">setLineEdit</a>().</p>
<!-- @@@lineEdit -->
<!-- $$$minimumSizeHint[overload1]$$$minimumSizeHint -->
<h3 class="fn" id="minimumSizeHint"><a name="minimumSizeHint"></a><code>[override virtual] </code><span class="type"><a href="../qtcore/qsize.html">QSize</a></span> QComboBox::<span class="name">minimumSizeHint</span>() const</h3>
<p>Reimplemented from <a href="qwidget.html#minimumSizeHint-prop">QWidget::minimumSizeHint</a>().</p>
<!-- @@@minimumSizeHint -->
<!-- $$$model[overload1]$$$model -->
<h3 class="fn" id="model"><a name="model"></a><span class="type"><a href="../qtcore/qabstractitemmodel.html">QAbstractItemModel</a></span> *QComboBox::<span class="name">model</span>() const</h3>
<p>Returns the model used by the combobox.</p>
<p><b>See also </b><a href="qcombobox.html#setModel">setModel</a>().</p>
<!-- @@@model -->
<!-- $$$mousePressEvent[overload1]$$$mousePressEventQMouseEvent* -->
<h3 class="fn" id="mousePressEvent"><a name="mousePressEvent"></a><code>[override virtual protected] </code><span class="type">void</span> QComboBox::<span class="name">mousePressEvent</span>(<span class="type"><a href="../qtgui/qmouseevent.html">QMouseEvent</a></span> *<i>e</i>)</h3>
<p>Reimplemented from <a href="qwidget.html#mousePressEvent">QWidget::mousePressEvent</a>().</p>
<!-- @@@mousePressEvent -->
<!-- $$$mouseReleaseEvent[overload1]$$$mouseReleaseEventQMouseEvent* -->
<h3 class="fn" id="mouseReleaseEvent"><a name="mouseReleaseEvent"></a><code>[override virtual protected] </code><span class="type">void</span> QComboBox::<span class="name">mouseReleaseEvent</span>(<span class="type"><a href="../qtgui/qmouseevent.html">QMouseEvent</a></span> *<i>e</i>)</h3>
<p>Reimplemented from <a href="qwidget.html#mouseReleaseEvent">QWidget::mouseReleaseEvent</a>().</p>
<!-- @@@mouseReleaseEvent -->
<!-- $$$paintEvent[overload1]$$$paintEventQPaintEvent* -->
<h3 class="fn" id="paintEvent"><a name="paintEvent"></a><code>[override virtual protected] </code><span class="type">void</span> QComboBox::<span class="name">paintEvent</span>(<span class="type"><a href="../qtgui/qpaintevent.html">QPaintEvent</a></span> *<i>e</i>)</h3>
<p>Reimplemented from <a href="qwidget.html#paintEvent">QWidget::paintEvent</a>().</p>
<!-- @@@paintEvent -->
<!-- $$$removeItem[overload1]$$$removeItemint -->
<h3 class="fn" id="removeItem"><a name="removeItem"></a><span class="type">void</span> QComboBox::<span class="name">removeItem</span>(<span class="type">int</span> <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>
<!-- @@@removeItem -->
<!-- $$$resizeEvent[overload1]$$$resizeEventQResizeEvent* -->
<h3 class="fn" id="resizeEvent"><a name="resizeEvent"></a><code>[override virtual protected] </code><span class="type">void</span> QComboBox::<span class="name">resizeEvent</span>(<span class="type"><a href="../qtgui/qresizeevent.html">QResizeEvent</a></span> *<i>e</i>)</h3>
<p>Reimplemented from <a href="qwidget.html#resizeEvent">QWidget::resizeEvent</a>().</p>
<!-- @@@resizeEvent -->
<!-- $$$rootModelIndex[overload1]$$$rootModelIndex -->
<h3 class="fn" id="rootModelIndex"><a name="rootModelIndex"></a><span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> QComboBox::<span class="name">rootModelIndex</span>() const</h3>
<p>Returns the root model item index for the items in the combobox.</p>
<p><b>See also </b><a href="qcombobox.html#setRootModelIndex">setRootModelIndex</a>().</p>
<!-- @@@rootModelIndex -->
<!-- $$$setCompleter[overload1]$$$setCompleterQCompleter* -->
<h3 class="fn" id="setCompleter"><a name="setCompleter"></a><span class="type">void</span> QComboBox::<span class="name">setCompleter</span>(<span class="type"><a href="qcompleter.html">QCompleter</a></span> *<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><b>Note: </b>The completer is removed when the <a href="qcombobox.html#editable-prop">editable</a> property becomes <code>false</code>.</p><p>This function was introduced in  Qt 4.2.</p>
<p><b>See also </b><a href="qcombobox.html#completer">completer</a>().</p>
<!-- @@@setCompleter -->
<!-- $$$setEditText[overload1]$$$setEditTextconstQString& -->
<h3 class="fn" id="setEditText"><a name="setEditText"></a><code>[slot] </code><span class="type">void</span> QComboBox::<span class="name">setEditText</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>text</i>)</h3>
<p>Sets the <i>text</i> in the combobox's text edit.</p>
<!-- @@@setEditText -->
<!-- $$$setItemData[overload1]$$$setItemDataintconstQVariant&int -->
<h3 class="fn" id="setItemData"><a name="setItemData"></a><span class="type">void</span> QComboBox::<span class="name">setItemData</span>(<span class="type">int</span> <i>index</i>, const <span class="type"><a href="../qtcore/qvariant.html">QVariant</a></span> &amp;<i>value</i>, <span class="type">int</span> <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><b>See also </b><a href="qcombobox.html#itemData">itemData</a>().</p>
<!-- @@@setItemData -->
<!-- $$$setItemDelegate[overload1]$$$setItemDelegateQAbstractItemDelegate* -->
<h3 class="fn" id="setItemDelegate"><a name="setItemDelegate"></a><span class="type">void</span> QComboBox::<span class="name">setItemDelegate</span>(<span class="type"><a href="qabstractitemdelegate.html">QAbstractItemDelegate</a></span> *<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><b>See also </b><a href="qcombobox.html#itemDelegate">itemDelegate</a>().</p>
<!-- @@@setItemDelegate -->
<!-- $$$setItemIcon[overload1]$$$setItemIconintconstQIcon& -->
<h3 class="fn" id="setItemIcon"><a name="setItemIcon"></a><span class="type">void</span> QComboBox::<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 <i>icon</i> for the item on the given <i>index</i> in the combobox.</p>
<p><b>See also </b><a href="qcombobox.html#itemIcon">itemIcon</a>().</p>
<!-- @@@setItemIcon -->
<!-- $$$setItemText[overload1]$$$setItemTextintconstQString& -->
<h3 class="fn" id="setItemText"><a name="setItemText"></a><span class="type">void</span> QComboBox::<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 <i>text</i> for the item on the given <i>index</i> in the combobox.</p>
<p><b>See also </b><a href="qcombobox.html#itemText">itemText</a>().</p>
<!-- @@@setItemText -->
<!-- $$$setLineEdit[overload1]$$$setLineEditQLineEdit* -->
<h3 class="fn" id="setLineEdit"><a name="setLineEdit"></a><span class="type">void</span> QComboBox::<span class="name">setLineEdit</span>(<span class="type"><a href="qlineedit.html">QLineEdit</a></span> *<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><b>See also </b><a href="qcombobox.html#lineEdit">lineEdit</a>().</p>
<!-- @@@setLineEdit -->
<!-- $$$setModel[overload1]$$$setModelQAbstractItemModel* -->
<h3 class="fn" id="setModel"><a name="setModel"></a><span class="type">void</span> QComboBox::<span class="name">setModel</span>(<span class="type"><a href="../qtcore/qabstractitemmodel.html">QAbstractItemModel</a></span> *<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><b>See also </b><a href="qcombobox.html#model">model</a>() and <a href="qcombobox.html#clear">clear</a>().</p>
<!-- @@@setModel -->
<!-- $$$setRootModelIndex[overload1]$$$setRootModelIndexconstQModelIndex& -->
<h3 class="fn" id="setRootModelIndex"><a name="setRootModelIndex"></a><span class="type">void</span> QComboBox::<span class="name">setRootModelIndex</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>)</h3>
<p>Sets the root model item <i>index</i> for the items in the combobox.</p>
<p><b>See also </b><a href="qcombobox.html#rootModelIndex">rootModelIndex</a>().</p>
<!-- @@@setRootModelIndex -->
<!-- $$$setValidator[overload1]$$$setValidatorconstQValidator* -->
<h3 class="fn" id="setValidator"><a name="setValidator"></a><span class="type">void</span> QComboBox::<span class="name">setValidator</span>(const <span class="type"><a href="../qtgui/qvalidator.html">QValidator</a></span> *<i>validator</i>)</h3>
<p>Sets the <i>validator</i> to use instead of the current validator.</p>
<p><b>Note: </b>The validator is removed when the <a href="qcombobox.html#editable-prop">editable</a> property becomes <code>false</code>.</p><p><b>See also </b><a href="qcombobox.html#validator">validator</a>().</p>
<!-- @@@setValidator -->
<!-- $$$setView[overload1]$$$setViewQAbstractItemView* -->
<h3 class="fn" id="setView"><a name="setView"></a><span class="type">void</span> QComboBox::<span class="name">setView</span>(<span class="type"><a href="qabstractitemview.html">QAbstractItemView</a></span> *<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><b>See also </b><a href="qcombobox.html#view">view</a>().</p>
<!-- @@@setView -->
<!-- $$$showEvent[overload1]$$$showEventQShowEvent* -->
<h3 class="fn" id="showEvent"><a name="showEvent"></a><code>[override virtual protected] </code><span class="type">void</span> QComboBox::<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 -->
<!-- $$$showPopup[overload1]$$$showPopup -->
<h3 class="fn" id="showPopup"><a name="showPopup"></a><code>[virtual] </code><span class="type">void</span> QComboBox::<span class="name">showPopup</span>()</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><b>See also </b><a href="qcombobox.html#hidePopup">hidePopup</a>().</p>
<!-- @@@showPopup -->
<!-- $$$sizeHint[overload1]$$$sizeHint -->
<h3 class="fn" id="sizeHint"><a name="sizeHint"></a><code>[override virtual] </code><span class="type"><a href="../qtcore/qsize.html">QSize</a></span> QComboBox::<span class="name">sizeHint</span>() const</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>
<!-- @@@sizeHint -->
<!-- $$$validator[overload1]$$$validator -->
<h3 class="fn" id="validator"><a name="validator"></a>const <span class="type"><a href="../qtgui/qvalidator.html">QValidator</a></span> *QComboBox::<span class="name">validator</span>() const</h3>
<p>Returns the validator that is used to constrain text input for the combobox.</p>
<p><b>See also </b><a href="qcombobox.html#setValidator">setValidator</a>() and <a href="qcombobox.html#editable-prop">editable</a>.</p>
<!-- @@@validator -->
<!-- $$$view[overload1]$$$view -->
<h3 class="fn" id="view"><a name="view"></a><span class="type"><a href="qabstractitemview.html">QAbstractItemView</a></span> *QComboBox::<span class="name">view</span>() const</h3>
<p>Returns the list view used for the combobox popup.</p>
<p><b>See also </b><a href="qcombobox.html#setView">setView</a>().</p>
<!-- @@@view -->
<!-- $$$wheelEvent[overload1]$$$wheelEventQWheelEvent* -->
<h3 class="fn" id="wheelEvent"><a name="wheelEvent"></a><code>[override virtual protected] </code><span class="type">void</span> QComboBox::<span class="name">wheelEvent</span>(<span class="type"><a href="../qtgui/qwheelevent.html">QWheelEvent</a></span> *<i>e</i>)</h3>
<p>Reimplemented from <a href="qwidget.html#wheelEvent">QWidget::wheelEvent</a>().</p>
<!-- @@@wheelEvent -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 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>