Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 28b9e36e96ce34b2567ae5b47a27b2c5 > files > 552

python-qt4-doc-4.10.3-3.mga4.noarch.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QComboBox Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QComboBox Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QComboBox widget is a combined button and popup list.
<a href="#details">More...</a></p>

<p>Inherits <a href="qwidget.html">QWidget</a>.</p><p>Inherited by <a href="qfontcombobox.html">QFontComboBox</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qcombobox.html#InsertPolicy-enum">InsertPolicy</a></b> { NoInsert, InsertAtTop, InsertAtCurrent, InsertAtBottom, ..., InsertAlphabetically }</li><li><div class="fn" />enum <b><a href="qcombobox.html#SizeAdjustPolicy-enum">SizeAdjustPolicy</a></b> { AdjustToContents, AdjustToContentsOnFirstShow, AdjustToMinimumContentsLength, AdjustToMinimumContentsLengthWithIcon }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qcombobox.html#QComboBox">__init__</a></b> (<i>self</i>, QWidget&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qcombobox.html#addItem">addItem</a></b> (<i>self</i>, QString&#160;<i>text</i>, QVariant&#160;<i>userData</i>&#160;=&#160;QVariant())</li><li><div class="fn" /><b><a href="qcombobox.html#addItem-2">addItem</a></b> (<i>self</i>, QIcon&#160;<i>icon</i>, QString&#160;<i>text</i>, QVariant&#160;<i>userData</i>&#160;=&#160;QVariant())</li><li><div class="fn" /><b><a href="qcombobox.html#addItems">addItems</a></b> (<i>self</i>, QStringList&#160;<i>texts</i>)</li><li><div class="fn" />bool <b><a href="qcombobox.html#autoCompletion">autoCompletion</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.CaseSensitivity <b><a href="qcombobox.html#autoCompletionCaseSensitivity">autoCompletionCaseSensitivity</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#changeEvent">changeEvent</a></b> (<i>self</i>, QEvent&#160;<i>e</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#clear">clear</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#clearEditText">clearEditText</a></b> (<i>self</i>)</li><li><div class="fn" />QCompleter <b><a href="qcombobox.html#completer">completer</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#contextMenuEvent">contextMenuEvent</a></b> (<i>self</i>, QContextMenuEvent&#160;<i>e</i>)</li><li><div class="fn" />int <b><a href="qcombobox.html#count">count</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qcombobox.html#currentIndex">currentIndex</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qcombobox.html#currentText">currentText</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qcombobox.html#duplicatesEnabled">duplicatesEnabled</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qcombobox.html#event">event</a></b> (<i>self</i>, QEvent&#160;<i>event</i>)</li><li><div class="fn" />int <b><a href="qcombobox.html#findData">findData</a></b> (<i>self</i>, QVariant&#160;<i>data</i>, int&#160;<i>role</i>&#160;=&#160;Qt.UserRole, Qt.MatchFlags&#160;<i>flags</i>&#160;=&#160;Qt.MatchExactly|Qt.MatchCaseSensitive)</li><li><div class="fn" />int <b><a href="qcombobox.html#findText">findText</a></b> (<i>self</i>, QString&#160;<i>text</i>, Qt.MatchFlags&#160;<i>flags</i>&#160;=&#160;Qt.MatchExactly|Qt.MatchCaseSensitive)</li><li><div class="fn" /><b><a href="qcombobox.html#focusInEvent">focusInEvent</a></b> (<i>self</i>, QFocusEvent&#160;<i>e</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#focusOutEvent">focusOutEvent</a></b> (<i>self</i>, QFocusEvent&#160;<i>e</i>)</li><li><div class="fn" />bool <b><a href="qcombobox.html#hasFrame">hasFrame</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#hideEvent">hideEvent</a></b> (<i>self</i>, QHideEvent&#160;<i>e</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#hidePopup">hidePopup</a></b> (<i>self</i>)</li><li><div class="fn" />QSize <b><a href="qcombobox.html#iconSize">iconSize</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#initStyleOption">initStyleOption</a></b> (<i>self</i>, QStyleOptionComboBox&#160;<i>option</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#inputMethodEvent">inputMethodEvent</a></b> (<i>self</i>, QInputMethodEvent)</li><li><div class="fn" />QVariant <b><a href="qcombobox.html#inputMethodQuery">inputMethodQuery</a></b> (<i>self</i>, Qt.InputMethodQuery)</li><li><div class="fn" /><b><a href="qcombobox.html#insertItem">insertItem</a></b> (<i>self</i>, int&#160;<i>index</i>, QString&#160;<i>text</i>, QVariant&#160;<i>userData</i>&#160;=&#160;QVariant())</li><li><div class="fn" /><b><a href="qcombobox.html#insertItem-2">insertItem</a></b> (<i>self</i>, int&#160;<i>index</i>, QIcon&#160;<i>icon</i>, QString&#160;<i>text</i>, QVariant&#160;<i>userData</i>&#160;=&#160;QVariant())</li><li><div class="fn" /><b><a href="qcombobox.html#insertItems">insertItems</a></b> (<i>self</i>, int&#160;<i>index</i>, QStringList&#160;<i>texts</i>)</li><li><div class="fn" />InsertPolicy <b><a href="qcombobox.html#insertPolicy">insertPolicy</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#insertSeparator">insertSeparator</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" />bool <b><a href="qcombobox.html#isEditable">isEditable</a></b> (<i>self</i>)</li><li><div class="fn" />QVariant <b><a href="qcombobox.html#itemData">itemData</a></b> (<i>self</i>, int&#160;<i>index</i>, int&#160;<i>role</i>&#160;=&#160;Qt.UserRole)</li><li><div class="fn" />QAbstractItemDelegate <b><a href="qcombobox.html#itemDelegate">itemDelegate</a></b> (<i>self</i>)</li><li><div class="fn" />QIcon <b><a href="qcombobox.html#itemIcon">itemIcon</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" />QString <b><a href="qcombobox.html#itemText">itemText</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#keyPressEvent">keyPressEvent</a></b> (<i>self</i>, QKeyEvent&#160;<i>e</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#keyReleaseEvent">keyReleaseEvent</a></b> (<i>self</i>, QKeyEvent&#160;<i>e</i>)</li><li><div class="fn" />QLineEdit <b><a href="qcombobox.html#lineEdit">lineEdit</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qcombobox.html#maxCount">maxCount</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qcombobox.html#maxVisibleItems">maxVisibleItems</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qcombobox.html#minimumContentsLength">minimumContentsLength</a></b> (<i>self</i>)</li><li><div class="fn" />QSize <b><a href="qcombobox.html#minimumSizeHint">minimumSizeHint</a></b> (<i>self</i>)</li><li><div class="fn" />QAbstractItemModel <b><a href="qcombobox.html#model">model</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qcombobox.html#modelColumn">modelColumn</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#mousePressEvent">mousePressEvent</a></b> (<i>self</i>, QMouseEvent&#160;<i>e</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#mouseReleaseEvent">mouseReleaseEvent</a></b> (<i>self</i>, QMouseEvent&#160;<i>e</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#paintEvent">paintEvent</a></b> (<i>self</i>, QPaintEvent&#160;<i>e</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#removeItem">removeItem</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#resizeEvent">resizeEvent</a></b> (<i>self</i>, QResizeEvent&#160;<i>e</i>)</li><li><div class="fn" />QModelIndex <b><a href="qcombobox.html#rootModelIndex">rootModelIndex</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#setAutoCompletion">setAutoCompletion</a></b> (<i>self</i>, bool&#160;<i>enable</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#setAutoCompletionCaseSensitivity">setAutoCompletionCaseSensitivity</a></b> (<i>self</i>, Qt.CaseSensitivity&#160;<i>sensitivity</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#setCompleter">setCompleter</a></b> (<i>self</i>, QCompleter&#160;<i>c</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#setCurrentIndex">setCurrentIndex</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#setDuplicatesEnabled">setDuplicatesEnabled</a></b> (<i>self</i>, bool&#160;<i>enable</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#setEditable">setEditable</a></b> (<i>self</i>, bool&#160;<i>editable</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#setEditText">setEditText</a></b> (<i>self</i>, QString&#160;<i>text</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#setFrame">setFrame</a></b> (<i>self</i>, bool)</li><li><div class="fn" /><b><a href="qcombobox.html#setIconSize">setIconSize</a></b> (<i>self</i>, QSize&#160;<i>size</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#setInsertPolicy">setInsertPolicy</a></b> (<i>self</i>, InsertPolicy&#160;<i>policy</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#setItemData">setItemData</a></b> (<i>self</i>, int&#160;<i>index</i>, QVariant&#160;<i>value</i>, int&#160;<i>role</i>&#160;=&#160;Qt.UserRole)</li><li><div class="fn" /><b><a href="qcombobox.html#setItemDelegate">setItemDelegate</a></b> (<i>self</i>, QAbstractItemDelegate&#160;<i>delegate</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#setItemIcon">setItemIcon</a></b> (<i>self</i>, int&#160;<i>index</i>, QIcon&#160;<i>icon</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#setItemText">setItemText</a></b> (<i>self</i>, int&#160;<i>index</i>, QString&#160;<i>text</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#setLineEdit">setLineEdit</a></b> (<i>self</i>, QLineEdit&#160;<i>edit</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#setMaxCount">setMaxCount</a></b> (<i>self</i>, int&#160;<i>max</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#setMaxVisibleItems">setMaxVisibleItems</a></b> (<i>self</i>, int&#160;<i>maxItems</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#setMinimumContentsLength">setMinimumContentsLength</a></b> (<i>self</i>, int&#160;<i>characters</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#setModel">setModel</a></b> (<i>self</i>, QAbstractItemModel&#160;<i>model</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#setModelColumn">setModelColumn</a></b> (<i>self</i>, int&#160;<i>visibleColumn</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#setRootModelIndex">setRootModelIndex</a></b> (<i>self</i>, QModelIndex&#160;<i>index</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#setSizeAdjustPolicy">setSizeAdjustPolicy</a></b> (<i>self</i>, SizeAdjustPolicy&#160;<i>policy</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#setValidator">setValidator</a></b> (<i>self</i>, QValidator&#160;<i>v</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#setView">setView</a></b> (<i>self</i>, QAbstractItemView&#160;<i>itemView</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#showEvent">showEvent</a></b> (<i>self</i>, QShowEvent&#160;<i>e</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#showPopup">showPopup</a></b> (<i>self</i>)</li><li><div class="fn" />SizeAdjustPolicy <b><a href="qcombobox.html#sizeAdjustPolicy">sizeAdjustPolicy</a></b> (<i>self</i>)</li><li><div class="fn" />QSize <b><a href="qcombobox.html#sizeHint">sizeHint</a></b> (<i>self</i>)</li><li><div class="fn" />QValidator <b><a href="qcombobox.html#validator">validator</a></b> (<i>self</i>)</li><li><div class="fn" />QAbstractItemView <b><a href="qcombobox.html#view">view</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qcombobox.html#wheelEvent">wheelEvent</a></b> (<i>self</i>, QWheelEvent&#160;<i>e</i>)</li></ul><h3>Special Methods</h3><ul><li><div class="fn" /> <b><a href="qcombobox.html#__len__">__len__</a></b> (<i>self</i>)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qcombobox.html#activated">activated</a></b> (int)</li><li><div class="fn" />void <b><a href="qcombobox.html#activated-2">activated</a></b> (const QString&amp;)</li><li><div class="fn" />void <b><a href="qcombobox.html#currentIndexChanged">currentIndexChanged</a></b> (int)</li><li><div class="fn" />void <b><a href="qcombobox.html#currentIndexChanged-2">currentIndexChanged</a></b> (const QString&amp;)</li><li><div class="fn" />void <b><a href="qcombobox.html#editTextChanged">editTextChanged</a></b> (const QString&amp;)</li><li><div class="fn" />void <b><a href="qcombobox.html#highlighted">highlighted</a></b> (int)</li><li><div class="fn" />void <b><a href="qcombobox.html#highlighted-2">highlighted</a></b> (const QString&amp;)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QComboBox widget is a combined button and popup list.</p>
<p>A QComboBox provides a means of presenting a list of options to
the user in a way that takes up the minimum amount of screen
space.</p>
<p>A combobox is a selection widget that displays the current item,
and can pop up a list of selectable items. A combobox may be
editable, allowing the user to modify each item in the list.</p>
<p>Comboboxes can contain pixmaps as well as strings; the <a href="qcombobox.html#insertItem">insertItem</a>() and <a href="qcombobox.html#setItemText">setItemText</a>() functions are
suitably overloaded. For editable comboboxes, the function <a href="qcombobox.html#clearEditText">clearEditText</a>() is provided, to
clear the displayed string without changing the combobox's
contents.</p>
<p>There are two signals emitted if the current item of a combobox
changes, <a href="qcombobox.html#currentIndexChanged">currentIndexChanged</a>() and
<a href="qcombobox.html#activated">activated</a>(). <a href="qcombobox.html#currentIndexChanged">currentIndexChanged</a>() is
always emitted regardless if the change was done programmatically
or by user interaction, while <a href="qcombobox.html#activated">activated</a>() is only emitted when the
change is caused by user interaction. The <a href="qcombobox.html#highlighted">highlighted</a>() signal is emitted
when the user highlights an item in the combobox popup list. All
three signals exist in two versions, one with a <a href="qstring.html">QString</a> argument and one with an <tt>int</tt>
argument. If the user selects or highlights a pixmap, only the
<tt>int</tt> signals are emitted. Whenever the text of an editable
combobox is changed the <a href="qcombobox.html#editTextChanged">editTextChanged</a>() signal is
emitted.</p>
<p>When the user enters a new string in an editable combobox, the
widget may or may not insert it, and it can insert it in several
locations. The default policy is is <a href="qcombobox.html#InsertPolicy-enum">AtBottom</a> but you can change
this using <a href="qcombobox.html#insertPolicy-prop">setInsertPolicy</a>().</p>
<p>It is possible to constrain the input to an editable combobox
using <a href="qvalidator.html">QValidator</a>; see <a href="qcombobox.html#setValidator">setValidator</a>(). By default, any
input is accepted.</p>
<p>A combobox can be populated using the insert functions, <a href="qcombobox.html#insertItem">insertItem</a>() and <a href="qcombobox.html#insertItems">insertItems</a>() for example. Items
can be changed with <a href="qcombobox.html#setItemText">setItemText</a>(). An item can be
removed with <a href="qcombobox.html#removeItem">removeItem</a>()
and all items can be removed with <a href="qcombobox.html#clear">clear</a>(). The text of the current item is
returned by <a href="qcombobox.html#currentText-prop">currentText</a>(), and the text
of a numbered item is returned with <a class="compat" href="qcombobox-qt3.html#text">text</a>(). The current
item can be set with <a href="qcombobox.html#currentIndex-prop">setCurrentIndex</a>(). The
number of items in the combobox is returned by <a href="qcombobox.html#count-prop">count</a>(); the maximum number of
items can be set with <a href="qcombobox.html#maxCount-prop">setMaxCount</a>(). You can allow
editing using <a href="qcombobox.html#editable-prop">setEditable</a>(). For editable
comboboxes you can set auto-completion using <a href="qcombobox.html#setCompleter">setCompleter</a>() and whether or not
the user can add duplicates is set with <a href="qcombobox.html#duplicatesEnabled-prop">setDuplicatesEnabled</a>().</p>
<p>QComboBox uses the <a href="model-view-programming.html">model/view framework</a> for its
popup list and to store its items. By default a <a href="qstandarditemmodel.html">QStandardItemModel</a> stores the items
and a <a href="qlistview.html">QListView</a> subclass displays the
popuplist. You can access the model and view directly (with
<a href="qcombobox.html#model">model</a>() and <a href="qcombobox.html#view">view</a>()), but QComboBox also provides
functions to set and get item data (e.g., <a href="qcombobox.html#setItemData">setItemData</a>() and <a href="qcombobox.html#itemText">itemText</a>()). You can also set a new
model and view (with <a href="qcombobox.html#setModel">setModel</a>() and <a href="qcombobox.html#setView">setView</a>()). For the text and icon in
the combobox label, the data in the model that has the <a href="qt.html#ItemDataRole-enum">Qt.DisplayRole</a> and <a href="qt.html#ItemDataRole-enum">Qt.DecorationRole</a> is used. 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., by using
<a href="qabstractitemview.html#selectionMode-prop">setSelectionMode()</a>.</p>
<p class="centerAlign"><img alt="Comboboxes in the different built-in styles." src="images/qstyle-comboboxes.png" /></p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="InsertPolicy-enum" />QComboBox.InsertPolicy</h3><p>This enum specifies what the <a href="qcombobox.html">QComboBox</a> should do when a new string is
entered by the user.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QComboBox.NoInsert</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">The string will not be inserted into the
combobox.</td>
</tr>
<tr>
<td class="topAlign"><tt>QComboBox.InsertAtTop</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">The string will be inserted as the first item
in the combobox.</td>
</tr>
<tr>
<td class="topAlign"><tt>QComboBox.InsertAtCurrent</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">The current item will be <i>replaced</i> by
the string.</td>
</tr>
<tr>
<td class="topAlign"><tt>QComboBox.InsertAtBottom</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">The string will be inserted after the last
item in the combobox.</td>
</tr>
<tr>
<td class="topAlign"><tt>QComboBox.InsertAfterCurrent</tt></td>
<td class="topAlign"><tt>4</tt></td>
<td class="topAlign">The string is inserted after the current item
in the combobox.</td>
</tr>
<tr>
<td class="topAlign"><tt>QComboBox.InsertBeforeCurrent</tt></td>
<td class="topAlign"><tt>5</tt></td>
<td class="topAlign">The string is inserted before the current item
in the combobox.</td>
</tr>
<tr>
<td class="topAlign"><tt>QComboBox.InsertAlphabetically</tt></td>
<td class="topAlign"><tt>6</tt></td>
<td class="topAlign">The string is inserted in the alphabetic order
in the combobox.</td>
</tr>
</table>


<h3 class="fn"><a name="SizeAdjustPolicy-enum" />QComboBox.SizeAdjustPolicy</h3><p>This enum specifies how the size hint of the <a href="qcombobox.html">QComboBox</a> should adjust when new content is
added or content changes.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QComboBox.AdjustToContents</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">The combobox will always adjust to the
contents</td>
</tr>
<tr>
<td class="topAlign">
<tt>QComboBox.AdjustToContentsOnFirstShow</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">The combobox will adjust to its contents the
first time it is shown.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QComboBox.AdjustToMinimumContentsLength</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">Use AdjustToContents or
AdjustToContentsOnFirstShow instead.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QComboBox.AdjustToMinimumContentsLengthWithIcon</tt></td>
<td class="topAlign"><tt>3</tt></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>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QComboBox" />QComboBox.__init__ (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a combobox with the given <i>parent</i>, using the
default model <a href="qstandarditemmodel.html">QStandardItemModel</a>.</p>


<h3 class="fn"><a name="addItem" />QComboBox.addItem (<i>self</i>, QString&#160;<i>text</i>, QVariant&#160;<i>userData</i>&#160;=&#160;QVariant())</h3><p>Adds an item to the combobox with the given <i>text</i>, and
containing the specified <i>userData</i> (stored in the <a href="qt.html#ItemDataRole-enum">Qt.UserRole</a>). The item is appended
to the list of existing items.</p>


<h3 class="fn"><a name="addItem-2" />QComboBox.addItem (<i>self</i>, <a href="qicon.html">QIcon</a>&#160;<i>icon</i>, QString&#160;<i>text</i>, QVariant&#160;<i>userData</i>&#160;=&#160;QVariant())</h3><p>Adds an item to the combobox with the given <i>icon</i> and
<i>text</i>, and containing the specified <i>userData</i> (stored
in the <a href="qt.html#ItemDataRole-enum">Qt.UserRole</a>). The
item is appended to the list of existing items.</p>


<h3 class="fn"><a name="addItems" />QComboBox.addItems (<i>self</i>, QStringList&#160;<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>


<h3 class="fn"><a name="autoCompletion" />bool QComboBox.autoCompletion (<i>self</i>)</h3><h3 class="fn"><a name="autoCompletionCaseSensitivity" /><a href="qt.html#CaseSensitivity-enum">Qt.CaseSensitivity</a> QComboBox.autoCompletionCaseSensitivity (<i>self</i>)</h3><h3 class="fn"><a name="changeEvent" />QComboBox.changeEvent (<i>self</i>, <a href="qevent.html">QEvent</a>&#160;<i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#changeEvent">QWidget.changeEvent</a>().</p>


<h3 class="fn"><a name="clear" />QComboBox.clear (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void clear()</tt>.</p><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>


<h3 class="fn"><a name="clearEditText" />QComboBox.clearEditText (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void clearEditText()</tt>.</p><p>Clears the contents of the line edit used for editing in the
combobox.</p>


<h3 class="fn"><a name="completer" /><a href="qcompleter.html">QCompleter</a> QComboBox.completer (<i>self</i>)</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>


<h3 class="fn"><a name="contextMenuEvent" />QComboBox.contextMenuEvent (<i>self</i>, <a href="qcontextmenuevent.html">QContextMenuEvent</a>&#160;<i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#contextMenuEvent">QWidget.contextMenuEvent</a>().</p>


<h3 class="fn"><a name="count" />int QComboBox.count (<i>self</i>)</h3><h3 class="fn"><a name="currentIndex" />int QComboBox.currentIndex (<i>self</i>)</h3><h3 class="fn"><a name="currentText" />QString QComboBox.currentText (<i>self</i>)</h3><h3 class="fn"><a name="duplicatesEnabled" />bool QComboBox.duplicatesEnabled (<i>self</i>)</h3><h3 class="fn"><a name="event" />bool QComboBox.event (<i>self</i>, <a href="qevent.html">QEvent</a>&#160;<i>event</i>)</h3><p>Reimplemented from <a href="qobject.html#event">QObject.event</a>().</p>


<h3 class="fn"><a name="findData" />int QComboBox.findData (<i>self</i>, QVariant&#160;<i>data</i>, int&#160;<i>role</i>&#160;=&#160;Qt.UserRole, <a href="qt-matchflags.html">Qt.MatchFlags</a>&#160;<i>flags</i>&#160;=&#160;Qt.MatchExactly|Qt.MatchCaseSensitive)</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>


<h3 class="fn"><a name="findText" />int QComboBox.findText (<i>self</i>, QString&#160;<i>text</i>, <a href="qt-matchflags.html">Qt.MatchFlags</a>&#160;<i>flags</i>&#160;=&#160;Qt.MatchExactly|Qt.MatchCaseSensitive)</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>


<h3 class="fn"><a name="focusInEvent" />QComboBox.focusInEvent (<i>self</i>, <a href="qfocusevent.html">QFocusEvent</a>&#160;<i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#focusInEvent">QWidget.focusInEvent</a>().</p>


<h3 class="fn"><a name="focusOutEvent" />QComboBox.focusOutEvent (<i>self</i>, <a href="qfocusevent.html">QFocusEvent</a>&#160;<i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#focusOutEvent">QWidget.focusOutEvent</a>().</p>


<h3 class="fn"><a name="hasFrame" />bool QComboBox.hasFrame (<i>self</i>)</h3><h3 class="fn"><a name="hideEvent" />QComboBox.hideEvent (<i>self</i>, <a href="qhideevent.html">QHideEvent</a>&#160;<i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#hideEvent">QWidget.hideEvent</a>().</p>


<h3 class="fn"><a name="hidePopup" />QComboBox.hidePopup (<i>self</i>)</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>


<h3 class="fn"><a name="iconSize" /><a href="qsize.html">QSize</a> QComboBox.iconSize (<i>self</i>)</h3><h3 class="fn"><a name="initStyleOption" />QComboBox.initStyleOption (<i>self</i>, <a href="qstyleoptioncombobox.html">QStyleOptionComboBox</a>&#160;<i>option</i>)</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>


<h3 class="fn"><a name="inputMethodEvent" />QComboBox.inputMethodEvent (<i>self</i>, <a href="qinputmethodevent.html">QInputMethodEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#inputMethodEvent">QWidget.inputMethodEvent</a>().</p>


<h3 class="fn"><a name="inputMethodQuery" />QVariant QComboBox.inputMethodQuery (<i>self</i>, <a href="qt.html#InputMethodQuery-enum">Qt.InputMethodQuery</a>)</h3><p>Reimplemented from <a href="qwidget.html#inputMethodQuery">QWidget.inputMethodQuery</a>().</p>


<h3 class="fn"><a name="insertItem" />QComboBox.insertItem (<i>self</i>, int&#160;<i>index</i>, QString&#160;<i>text</i>, QVariant&#160;<i>userData</i>&#160;=&#160;QVariant())</h3><p>Inserts the <i>text</i> and <i>userData</i> (stored in the
<a href="qt.html#ItemDataRole-enum">Qt.UserRole</a>) into the
combobox at the given <i>index</i>.</p>
<p>If the index is equal to or higher than the total number of
items, the new item is appended to the list of existing items. If
the index is zero or negative, the new item is prepended to the
list of existing items.</p>
<p><b>See also</b> <a href="qcombobox.html#insertItems">insertItems</a>().</p>


<h3 class="fn"><a name="insertItem-2" />QComboBox.insertItem (<i>self</i>, int&#160;<i>index</i>, <a href="qicon.html">QIcon</a>&#160;<i>icon</i>, QString&#160;<i>text</i>, QVariant&#160;<i>userData</i>&#160;=&#160;QVariant())</h3><p>Inserts the <i>icon</i>, <i>text</i> and <i>userData</i> (stored
in the <a href="qt.html#ItemDataRole-enum">Qt.UserRole</a>) into
the combobox at the given <i>index</i>.</p>
<p>If the index is equal to or higher than the total number of
items, the new item is appended to the list of existing items. If
the index is zero or negative, the new item is prepended to the
list of existing items.</p>
<p><b>See also</b> <a href="qcombobox.html#insertItems">insertItems</a>().</p>


<h3 class="fn"><a name="insertItems" />QComboBox.insertItems (<i>self</i>, int&#160;<i>index</i>, QStringList&#160;<i>texts</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>


<h3 class="fn"><a name="insertPolicy" /><a href="qcombobox.html#InsertPolicy-enum">InsertPolicy</a> QComboBox.insertPolicy (<i>self</i>)</h3><h3 class="fn"><a name="insertSeparator" />QComboBox.insertSeparator (<i>self</i>, int&#160;<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>


<h3 class="fn"><a name="isEditable" />bool QComboBox.isEditable (<i>self</i>)</h3><h3 class="fn"><a name="itemData" />QVariant QComboBox.itemData (<i>self</i>, int&#160;<i>index</i>, int&#160;<i>role</i>&#160;=&#160;Qt.UserRole)</h3><p>Returns the data for the given <i>role</i> in the given
<i>index</i> in the combobox, or <a href="qvariant.html#Type-enum">QVariant.Invalid</a> if there is no data
for this role.</p>
<p><b>See also</b> <a href="qcombobox.html#setItemData">setItemData</a>().</p>


<h3 class="fn"><a name="itemDelegate" /><a href="qabstractitemdelegate.html">QAbstractItemDelegate</a> QComboBox.itemDelegate (<i>self</i>)</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>


<h3 class="fn"><a name="itemIcon" /><a href="qicon.html">QIcon</a> QComboBox.itemIcon (<i>self</i>, int&#160;<i>index</i>)</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>


<h3 class="fn"><a name="itemText" />QString QComboBox.itemText (<i>self</i>, int&#160;<i>index</i>)</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>


<h3 class="fn"><a name="keyPressEvent" />QComboBox.keyPressEvent (<i>self</i>, <a href="qkeyevent.html">QKeyEvent</a>&#160;<i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#keyPressEvent">QWidget.keyPressEvent</a>().</p>


<h3 class="fn"><a name="keyReleaseEvent" />QComboBox.keyReleaseEvent (<i>self</i>, <a href="qkeyevent.html">QKeyEvent</a>&#160;<i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#keyReleaseEvent">QWidget.keyReleaseEvent</a>().</p>


<h3 class="fn"><a name="lineEdit" /><a href="qlineedit.html">QLineEdit</a> QComboBox.lineEdit (<i>self</i>)</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>


<h3 class="fn"><a name="maxCount" />int QComboBox.maxCount (<i>self</i>)</h3><h3 class="fn"><a name="maxVisibleItems" />int QComboBox.maxVisibleItems (<i>self</i>)</h3><h3 class="fn"><a name="minimumContentsLength" />int QComboBox.minimumContentsLength (<i>self</i>)</h3><h3 class="fn"><a name="minimumSizeHint" /><a href="qsize.html">QSize</a> QComboBox.minimumSizeHint (<i>self</i>)</h3><p>Reimplemented from <a href="qwidget.html#minimumSizeHint-prop">QWidget.minimumSizeHint</a>().</p>


<h3 class="fn"><a name="model" /><a href="qabstractitemmodel.html">QAbstractItemModel</a> QComboBox.model (<i>self</i>)</h3><p>Returns the model used by the combobox.</p>
<p><b>See also</b> <a href="qcombobox.html#setModel">setModel</a>().</p>


<h3 class="fn"><a name="modelColumn" />int QComboBox.modelColumn (<i>self</i>)</h3><h3 class="fn"><a name="mousePressEvent" />QComboBox.mousePressEvent (<i>self</i>, <a href="qmouseevent.html">QMouseEvent</a>&#160;<i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#mousePressEvent">QWidget.mousePressEvent</a>().</p>


<h3 class="fn"><a name="mouseReleaseEvent" />QComboBox.mouseReleaseEvent (<i>self</i>, <a href="qmouseevent.html">QMouseEvent</a>&#160;<i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#mouseReleaseEvent">QWidget.mouseReleaseEvent</a>().</p>


<h3 class="fn"><a name="paintEvent" />QComboBox.paintEvent (<i>self</i>, <a href="qpaintevent.html">QPaintEvent</a>&#160;<i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#paintEvent">QWidget.paintEvent</a>().</p>


<h3 class="fn"><a name="removeItem" />QComboBox.removeItem (<i>self</i>, int&#160;<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>


<h3 class="fn"><a name="resizeEvent" />QComboBox.resizeEvent (<i>self</i>, <a href="qresizeevent.html">QResizeEvent</a>&#160;<i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#resizeEvent">QWidget.resizeEvent</a>().</p>


<h3 class="fn"><a name="rootModelIndex" /><a href="qmodelindex.html">QModelIndex</a> QComboBox.rootModelIndex (<i>self</i>)</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>


<h3 class="fn"><a name="setAutoCompletion" />QComboBox.setAutoCompletion (<i>self</i>, bool&#160;<i>enable</i>)</h3><h3 class="fn"><a name="setAutoCompletionCaseSensitivity" />QComboBox.setAutoCompletionCaseSensitivity (<i>self</i>, <a href="qt.html#CaseSensitivity-enum">Qt.CaseSensitivity</a>&#160;<i>sensitivity</i>)</h3><h3 class="fn"><a name="setCompleter" />QComboBox.setCompleter (<i>self</i>, <a href="qcompleter.html">QCompleter</a>&#160;<i>c</i>)</h3><p>Sets the <i>completer</i> to use instead of the current
completer. If <i>completer</i> is 0, auto completion is
disabled.</p>
<p>By default, for an editable combo box, a <a href="qcompleter.html">QCompleter</a> that performs case insensitive
inline completion is automatically created.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qcombobox.html#completer">completer</a>().</p>


<h3 class="fn"><a name="setCurrentIndex" />QComboBox.setCurrentIndex (<i>self</i>, int&#160;<i>index</i>)</h3><h3 class="fn"><a name="setDuplicatesEnabled" />QComboBox.setDuplicatesEnabled (<i>self</i>, bool&#160;<i>enable</i>)</h3><h3 class="fn"><a name="setEditable" />QComboBox.setEditable (<i>self</i>, bool&#160;<i>editable</i>)</h3><h3 class="fn"><a name="setEditText" />QComboBox.setEditText (<i>self</i>, QString&#160;<i>text</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setEditText(const QString&amp;)</tt>.</p><p>Sets the <i>text</i> in the combobox's text edit.</p>


<h3 class="fn"><a name="setFrame" />QComboBox.setFrame (<i>self</i>, bool)</h3><h3 class="fn"><a name="setIconSize" />QComboBox.setIconSize (<i>self</i>, <a href="qsize.html">QSize</a>&#160;<i>size</i>)</h3><h3 class="fn"><a name="setInsertPolicy" />QComboBox.setInsertPolicy (<i>self</i>, <a href="qcombobox.html#InsertPolicy-enum">InsertPolicy</a>&#160;<i>policy</i>)</h3><h3 class="fn"><a name="setItemData" />QComboBox.setItemData (<i>self</i>, int&#160;<i>index</i>, QVariant&#160;<i>value</i>, int&#160;<i>role</i>&#160;=&#160;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>


<h3 class="fn"><a name="setItemDelegate" />QComboBox.setItemDelegate (<i>self</i>, <a href="qabstractitemdelegate.html">QAbstractItemDelegate</a>&#160;<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>


<h3 class="fn"><a name="setItemIcon" />QComboBox.setItemIcon (<i>self</i>, int&#160;<i>index</i>, <a href="qicon.html">QIcon</a>&#160;<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>


<h3 class="fn"><a name="setItemText" />QComboBox.setItemText (<i>self</i>, int&#160;<i>index</i>, QString&#160;<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>


<h3 class="fn"><a name="setLineEdit" />QComboBox.setLineEdit (<i>self</i>, <a href="qlineedit.html">QLineEdit</a>&#160;<i>edit</i>)</h3><p>The <i>edit</i> argument has it's ownership transferred to Qt.</p><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>


<h3 class="fn"><a name="setMaxCount" />QComboBox.setMaxCount (<i>self</i>, int&#160;<i>max</i>)</h3><h3 class="fn"><a name="setMaxVisibleItems" />QComboBox.setMaxVisibleItems (<i>self</i>, int&#160;<i>maxItems</i>)</h3><h3 class="fn"><a name="setMinimumContentsLength" />QComboBox.setMinimumContentsLength (<i>self</i>, int&#160;<i>characters</i>)</h3><h3 class="fn"><a name="setModel" />QComboBox.setModel (<i>self</i>, <a href="qabstractitemmodel.html">QAbstractItemModel</a>&#160;<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>


<h3 class="fn"><a name="setModelColumn" />QComboBox.setModelColumn (<i>self</i>, int&#160;<i>visibleColumn</i>)</h3><h3 class="fn"><a name="setRootModelIndex" />QComboBox.setRootModelIndex (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<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>


<h3 class="fn"><a name="setSizeAdjustPolicy" />QComboBox.setSizeAdjustPolicy (<i>self</i>, <a href="qcombobox.html#SizeAdjustPolicy-enum">SizeAdjustPolicy</a>&#160;<i>policy</i>)</h3><h3 class="fn"><a name="setValidator" />QComboBox.setValidator (<i>self</i>, <a href="qvalidator.html">QValidator</a>&#160;<i>v</i>)</h3><p>Sets the <i>validator</i> to use instead of the current
validator.</p>
<p><b>See also</b> <a href="qcombobox.html#validator">validator</a>().</p>


<h3 class="fn"><a name="setView" />QComboBox.setView (<i>self</i>, <a href="qabstractitemview.html">QAbstractItemView</a>&#160;<i>itemView</i>)</h3><p>The <i>itemView</i> argument has it's ownership transferred to Qt.</p><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>


<h3 class="fn"><a name="showEvent" />QComboBox.showEvent (<i>self</i>, <a href="qshowevent.html">QShowEvent</a>&#160;<i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#showEvent">QWidget.showEvent</a>().</p>


<h3 class="fn"><a name="showPopup" />QComboBox.showPopup (<i>self</i>)</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>


<h3 class="fn"><a name="sizeAdjustPolicy" /><a href="qcombobox.html#SizeAdjustPolicy-enum">SizeAdjustPolicy</a> QComboBox.sizeAdjustPolicy (<i>self</i>)</h3><h3 class="fn"><a name="sizeHint" /><a href="qsize.html">QSize</a> QComboBox.sizeHint (<i>self</i>)</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>


<h3 class="fn"><a name="validator" /><a href="qvalidator.html">QValidator</a> QComboBox.validator (<i>self</i>)</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>


<h3 class="fn"><a name="view" /><a href="qabstractitemview.html">QAbstractItemView</a> QComboBox.view (<i>self</i>)</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>


<h3 class="fn"><a name="wheelEvent" />QComboBox.wheelEvent (<i>self</i>, <a href="qwheelevent.html">QWheelEvent</a>&#160;<i>e</i>)</h3><p>Reimplemented from <a href="qwidget.html#wheelEvent">QWidget.wheelEvent</a>().</p>
<h3 class="fn"><a name="__len__" /> QComboBox.__len__ (<i>self</i>)</h3><hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="activated" />void activated (int)</h3><p>This is the default overload of this signal.</p><p>This signal is sent when the user chooses an item in the
combobox. The item's <i>index</i> is passed. Note that this signal
is sent even when the choice is not changed. If you need to know
when the choice actually changes, use signal <a href="qcombobox.html#currentIndexChanged">currentIndexChanged</a>().</p>


<h3 class="fn"><a name="activated-2" />void activated (const QString&amp;)</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>


<h3 class="fn"><a name="currentIndexChanged" />void currentIndexChanged (int)</h3><p>This is the default overload of this signal.</p><p>This signal is sent whenever the <a href="qcombobox.html#currentIndex-prop">currentIndex</a> in the combobox
changes either through user interaction or programmatically. The
item's <i>index</i> is passed or -1 if the combobox becomes empty
or the <a href="qcombobox.html#currentIndex-prop">currentIndex</a>
was reset.</p>
<p>This function was introduced in Qt 4.1.</p>


<h3 class="fn"><a name="currentIndexChanged-2" />void currentIndexChanged (const QString&amp;)</h3><p>This signal is sent whenever the <a href="qcombobox.html#currentIndex-prop">currentIndex</a> in the combobox
changes either through user interaction or programmatically. The
item's <i>text</i> is passed.</p>
<p>This function was introduced in Qt 4.1.</p>


<h3 class="fn"><a name="editTextChanged" />void editTextChanged (const QString&amp;)</h3><p>This is the default overload of this signal.</p><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>


<h3 class="fn"><a name="highlighted" />void highlighted (int)</h3><p>This is the default overload of this signal.</p><p>This signal is sent when an item in the combobox popup list is
highlighted by the user. The item's <i>index</i> is passed.</p>


<h3 class="fn"><a name="highlighted-2" />void highlighted (const QString&amp;)</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>


<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.10.3 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.5</td></tr></table></div></address></body></html>