Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 5674

qt4-doc-4.8.7-26.2.mga7.noarch.rpm

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

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

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtgui.html">QtGui</a></li>
<li>QListWidget</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QListWidget Class Reference</h1>
<!-- $$$QListWidget-brief -->
<p>The QListWidget class provides an item-based list widget. <a href="#details">More...</a></p>
<!-- @@@QListWidget -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QListWidget&gt;</span></pre><p><b>Inherits: </b><a href="qlistview.html">QListView</a>.</p>
<ul>
<li><a href="qlistwidget-members.html">List of all members, including inherited members</a></li>
<li><a href="qlistwidget-obsolete.html">Obsolete members</a></li>
</ul>
<a name="properties"></a>
<h2>Properties</h2>
<ul>
<li class="fn"><b><a href="qlistwidget.html#count-prop">count</a></b> : const int</li>
<li class="fn"><b><a href="qlistwidget.html#currentRow-prop">currentRow</a></b> : int</li>
<li class="fn"><b><a href="qlistwidget.html#sortingEnabled-prop">sortingEnabled</a></b> : bool</li>
</ul>
<ul>
<li class="fn">13 properties inherited from <a href="qlistview.html#properties">QListView</a></li>
<li class="fn">16 properties inherited from <a href="qabstractitemview.html#properties">QAbstractItemView</a></li>
<li class="fn">2 properties inherited from <a href="qabstractscrollarea.html#properties">QAbstractScrollArea</a></li>
<li class="fn">6 properties inherited from <a href="qframe.html#properties">QFrame</a></li>
<li class="fn">58 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#QListWidget">QListWidget</a></b> ( QWidget * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#dtor.QListWidget">~QListWidget</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#addItem">addItem</a></b> ( const QString &amp; <i>label</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#addItem-2">addItem</a></b> ( QListWidgetItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#addItems">addItems</a></b> ( const QStringList &amp; <i>labels</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#closePersistentEditor">closePersistentEditor</a></b> ( QListWidgetItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#count-prop">count</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QListWidgetItem * </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#currentItem">currentItem</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#currentRow-prop">currentRow</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#editItem">editItem</a></b> ( QListWidgetItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QListWidgetItem *&gt; </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#findItems">findItems</a></b> ( const QString &amp; <i>text</i>, Qt::MatchFlags <i>flags</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#insertItem">insertItem</a></b> ( int <i>row</i>, QListWidgetItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#insertItem-2">insertItem</a></b> ( int <i>row</i>, const QString &amp; <i>label</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#insertItems">insertItems</a></b> ( int <i>row</i>, const QStringList &amp; <i>labels</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#sortingEnabled-prop">isSortingEnabled</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QListWidgetItem * </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#item">item</a></b> ( int <i>row</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QListWidgetItem * </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#itemAt">itemAt</a></b> ( const QPoint &amp; <i>p</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QListWidgetItem * </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#itemAt-2">itemAt</a></b> ( int <i>x</i>, int <i>y</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWidget * </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#itemWidget">itemWidget</a></b> ( QListWidgetItem * <i>item</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#openPersistentEditor">openPersistentEditor</a></b> ( QListWidgetItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#removeItemWidget">removeItemWidget</a></b> ( QListWidgetItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#row">row</a></b> ( const QListWidgetItem * <i>item</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QListWidgetItem *&gt; </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#selectedItems">selectedItems</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#setCurrentItem">setCurrentItem</a></b> ( QListWidgetItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#setCurrentItem-2">setCurrentItem</a></b> ( QListWidgetItem * <i>item</i>, QItemSelectionModel::SelectionFlags <i>command</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#currentRow-prop">setCurrentRow</a></b> ( int <i>row</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#currentRow-prop">setCurrentRow</a></b> ( int <i>row</i>, QItemSelectionModel::SelectionFlags <i>command</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#setItemWidget">setItemWidget</a></b> ( QListWidgetItem * <i>item</i>, QWidget * <i>widget</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#sortingEnabled-prop">setSortingEnabled</a></b> ( bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#sortItems">sortItems</a></b> ( Qt::SortOrder <i>order</i> = Qt::AscendingOrder )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QListWidgetItem * </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#takeItem">takeItem</a></b> ( int <i>row</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRect </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#visualItemRect">visualItemRect</a></b> ( const QListWidgetItem * <i>item</i> ) const</td></tr>
</table>
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#dropEvent">dropEvent</a></b> ( QDropEvent * <i>event</i> )</td></tr>
</table>
<ul>
<li class="fn">32 public functions inherited from <a href="qlistview.html#public-functions">QListView</a></li>
<li class="fn">57 public functions inherited from <a href="qabstractitemview.html#public-functions">QAbstractItemView</a></li>
<li class="fn">17 public functions inherited from <a href="qabstractscrollarea.html#public-functions">QAbstractScrollArea</a></li>
<li class="fn">14 public functions inherited from <a href="qframe.html#public-functions">QFrame</a></li>
<li class="fn">221 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li class="fn">13 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<a name="public-slots"></a>
<h2>Public Slots</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#clear">clear</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#scrollToItem">scrollToItem</a></b> ( const QListWidgetItem * <i>item</i>, QAbstractItemView::ScrollHint <i>hint</i> = EnsureVisible )</td></tr>
</table>
<ul>
<li class="fn">9 public slots inherited from <a href="qabstractitemview.html#public-slots">QAbstractItemView</a></li>
<li class="fn">19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#currentItemChanged">currentItemChanged</a></b> ( QListWidgetItem * <i>current</i>, QListWidgetItem * <i>previous</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#currentRowChanged">currentRowChanged</a></b> ( int <i>currentRow</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#currentTextChanged">currentTextChanged</a></b> ( const QString &amp; <i>currentText</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#itemActivated">itemActivated</a></b> ( QListWidgetItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#itemChanged">itemChanged</a></b> ( QListWidgetItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#itemClicked">itemClicked</a></b> ( QListWidgetItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#itemDoubleClicked">itemDoubleClicked</a></b> ( QListWidgetItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#itemEntered">itemEntered</a></b> ( QListWidgetItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#itemPressed">itemPressed</a></b> ( QListWidgetItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#itemSelectionChanged">itemSelectionChanged</a></b> ()</td></tr>
</table>
<ul>
<li class="fn">1 signal inherited from <a href="qlistview.html#signals">QListView</a></li>
<li class="fn">6 signals inherited from <a href="qabstractitemview.html#signals">QAbstractItemView</a></li>
<li class="fn">1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#dropMimeData">dropMimeData</a></b> ( int <i>index</i>, const QMimeData * <i>data</i>, Qt::DropAction <i>action</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QModelIndex </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#indexFromItem">indexFromItem</a></b> ( QListWidgetItem * <i>item</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QListWidgetItem * </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#itemFromIndex">itemFromIndex</a></b> ( const QModelIndex &amp; <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QListWidgetItem *&gt; </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#items">items</a></b> ( const QMimeData * <i>data</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QMimeData * </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#mimeData">mimeData</a></b> ( const QList&lt;QListWidgetItem *&gt; <i>items</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QStringList </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#mimeTypes">mimeTypes</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual Qt::DropActions </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#supportedDropActions">supportedDropActions</a></b> () const</td></tr>
</table>
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qlistwidget.html#event">event</a></b> ( QEvent * <i>e</i> )</td></tr>
</table>
<ul>
<li class="fn">26 protected functions inherited from <a href="qlistview.html#protected-functions">QListView</a></li>
<li class="fn">36 protected functions inherited from <a href="qabstractitemview.html#protected-functions">QAbstractItemView</a></li>
<li class="fn">18 protected functions inherited from <a href="qabstractscrollarea.html#protected-functions">QAbstractScrollArea</a></li>
<li class="fn">3 protected functions inherited from <a href="qframe.html#protected-functions">QFrame</a></li>
<li class="fn">37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li class="fn">1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li class="fn">9 protected slots inherited from <a href="qabstractitemview.html#protected-slots">QAbstractItemView</a></li>
<li class="fn">1 protected slot inherited from <a href="qabstractscrollarea.html#protected-slots">QAbstractScrollArea</a></li>
<li class="fn">1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<a name="details"></a>
<!-- $$$QListWidget-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QListWidget class provides an item-based list widget.</p>
<p>QListWidget is a convenience class that provides a list view similar to the one supplied by <a href="qlistview.html">QListView</a>, but with a classic item-based interface for adding and removing items. QListWidget uses an internal model to manage each <a href="qlistwidgetitem.html">QListWidgetItem</a> in the list.</p>
<p>For a more flexible list view widget, use the <a href="qlistview.html">QListView</a> class with a standard model.</p>
<p>List widgets are constructed in the same way as other widgets:</p>
<pre class="cpp">     QListWidget *listWidget = new QListWidget(this);</pre>
<p>The <a href="qabstractitemview.html#selectionMode-prop">selectionMode</a>() of a list widget determines how many of the items in the list can be selected at the same time, and whether complex selections of items can be created. This can be set with the <a href="qabstractitemview.html#selectionMode-prop">setSelectionMode</a>() function.</p>
<p>There are two ways to add items to the list: they can be constructed with the list widget as their parent widget, or they can be constructed with no parent widget and added to the list later. If a list widget already exists when the items are constructed, the first method is easier to use:</p>
<pre class="cpp">     <span class="keyword">new</span> <span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span>(tr(<span class="string">&quot;Oak&quot;</span>)<span class="operator">,</span> listWidget);
     <span class="keyword">new</span> <span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span>(tr(<span class="string">&quot;Fir&quot;</span>)<span class="operator">,</span> listWidget);
     <span class="keyword">new</span> <span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span>(tr(<span class="string">&quot;Pine&quot;</span>)<span class="operator">,</span> listWidget);</pre>
<p>If you need to insert a new item into the list at a particular position, then it should be constructed without a parent widget. The <a href="qlistwidget.html#insertItem">insertItem</a>() function should then be used to place it within the list. The list widget will take ownership of the item.</p>
<pre class="cpp">     <span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> <span class="operator">*</span>newItem <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span>;
     newItem<span class="operator">-</span><span class="operator">&gt;</span>setText(itemText);
     listWidget<span class="operator">-</span><span class="operator">&gt;</span>insertItem(row<span class="operator">,</span> newItem);</pre>
<p>For multiple items, <a href="qlistwidget.html#insertItems">insertItems</a>() can be used instead. The number of items in the list is found with the <a href="qlistwidget.html#count-prop">count</a>() function. To remove items from the list, use <a href="qlistwidget.html#takeItem">takeItem</a>().</p>
<p>The current item in the list can be found with <a href="qlistwidget.html#currentItem">currentItem</a>(), and changed with <a href="qlistwidget.html#setCurrentItem">setCurrentItem</a>(). The user can also change the current item by navigating with the keyboard or clicking on a different item. When the current item changes, the <a href="qlistwidget.html#currentItemChanged">currentItemChanged</a>() signal is emitted with the new current item and the item that was previously current.</p>
<table class="generic" width="100%">
 <tr valign="top" class="odd"><td ><img src="images/windowsxp-listview.png" alt="Screenshot of a Windows XP style list widget" /></td><td ><img src="images/macintosh-listview.png" alt="Screenshot of a Macintosh style table widget" /></td><td ><img src="images/plastique-listview.png" alt="Screenshot of a Plastique style table widget" /></td></tr>
<tr valign="top" class="even"><td >A <a href="gallery-windowsxp.html">Windows XP style</a> list widget.</td><td >A <a href="gallery-macintosh.html">Macintosh style</a> list widget.</td><td >A <a href="gallery-plastique.html">Plastique style</a> list widget.</td></tr>
</table>
</div>
<p><b>See also </b><a href="qlistwidgetitem.html">QListWidgetItem</a>, <a href="qlistview.html">QListView</a>, <a href="qtreeview.html">QTreeView</a>, <a href="model-view-programming.html">Model/View Programming</a>, and <a href="dialogs-configdialog.html">Config Dialog Example</a>.</p>
<!-- @@@QListWidget -->
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$count-prop$$$count -->
<h3 class="fn"><a name="count-prop"></a><span class="name">count</span> : const <span class="type">int</span></h3>
<p>This property holds the number of items in the list including any hidden items.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>count</b></span> () const</td></tr>
</table>
<!-- @@@count -->
<!-- $$$currentRow-prop$$$currentRow$$$setCurrentRowint$$$setCurrentRowintQItemSelectionModel::SelectionFlags$$$currentRowChangedint -->
<h3 class="fn"><a name="currentRow-prop"></a><span class="name">currentRow</span> : <span class="type">int</span></h3>
<p>This property holds the row of the current item.</p>
<p>Depending on the current selection mode, the row may also be selected.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>currentRow</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setCurrentRow</b></span> ( int <i>row</i> )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setCurrentRow</b></span> ( int <i>row</i>, QItemSelectionModel::SelectionFlags <i>command</i> )</td></tr>
</table>
<p><b>Notifier signal:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qlistwidget.html#currentRowChanged">currentRowChanged</a></b></span> ( int <i>currentRow</i> )</td></tr>
</table>
<!-- @@@currentRow -->
<!-- $$$sortingEnabled-prop$$$isSortingEnabled$$$setSortingEnabledbool -->
<h3 class="fn"><a name="sortingEnabled-prop"></a><span class="name">sortingEnabled</span> : <span class="type">bool</span></h3>
<p>This property holds whether sorting is enabled.</p>
<p>If this property is true, sorting is enabled for the list; if the property is false, sorting is not enabled.</p>
<p>The default value is false.</p>
<p>This property was introduced in Qt 4.2.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>isSortingEnabled</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setSortingEnabled</b></span> ( bool <i>enable</i> )</td></tr>
</table>
<!-- @@@sortingEnabled -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QListWidget[overload1]$$$QListWidgetQWidget* -->
<h3 class="fn"><a name="QListWidget"></a>QListWidget::<span class="name">QListWidget</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0 )</h3>
<p>Constructs an empty <a href="qlistwidget.html">QListWidget</a> with the given <i>parent</i>.</p>
<!-- @@@QListWidget -->
<!-- $$$~QListWidget[overload1]$$$~QListWidget -->
<h3 class="fn"><a name="dtor.QListWidget"></a>QListWidget::<span class="name">~QListWidget</span> ()</h3>
<p>Destroys the list widget and all its items.</p>
<!-- @@@~QListWidget -->
<!-- $$$addItem[overload1]$$$addItemconstQString& -->
<h3 class="fn"><a name="addItem"></a><span class="type">void</span> QListWidget::<span class="name">addItem</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label</i> )</h3>
<p>Inserts an item with the text <i>label</i> at the end of the list widget.</p>
<!-- @@@addItem -->
<!-- $$$addItem$$$addItemQListWidgetItem* -->
<h3 class="fn"><a name="addItem-2"></a><span class="type">void</span> QListWidget::<span class="name">addItem</span> ( <span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> * <i>item</i> )</h3>
<p>Inserts the <i>item</i> at the end of the list widget.</p>
<p><b>Warning:</b> A <a href="qlistwidgetitem.html">QListWidgetItem</a> can only be added to a <a href="qlistwidget.html">QListWidget</a> once. Adding the same <a href="qlistwidgetitem.html">QListWidgetItem</a> multiple times to a <a href="qlistwidget.html">QListWidget</a> will result in undefined behavior.</p>
<p><b>See also </b><a href="qlistwidget.html#insertItem">insertItem</a>().</p>
<!-- @@@addItem -->
<!-- $$$addItems[overload1]$$$addItemsconstQStringList& -->
<h3 class="fn"><a name="addItems"></a><span class="type">void</span> QListWidget::<span class="name">addItems</span> ( const <span class="type"><a href="qstringlist.html">QStringList</a></span> &amp; <i>labels</i> )</h3>
<p>Inserts items with the text <i>labels</i> at the end of the list widget.</p>
<p><b>See also </b><a href="qlistwidget.html#insertItems">insertItems</a>().</p>
<!-- @@@addItems -->
<!-- $$$clear[overload1]$$$clear -->
<h3 class="fn"><a name="clear"></a><span class="type">void</span> QListWidget::<span class="name">clear</span> ()<tt> [slot]</tt></h3>
<p>Removes all items and selections in the view.</p>
<p><b>Warning:</b> All items will be permanently deleted.</p>
<!-- @@@clear -->
<!-- $$$closePersistentEditor[overload1]$$$closePersistentEditorQListWidgetItem* -->
<h3 class="fn"><a name="closePersistentEditor"></a><span class="type">void</span> QListWidget::<span class="name">closePersistentEditor</span> ( <span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> * <i>item</i> )</h3>
<p>Closes the persistent editor for the given <i>item</i>.</p>
<p><b>See also </b><a href="qlistwidget.html#openPersistentEditor">openPersistentEditor</a>().</p>
<!-- @@@closePersistentEditor -->
<!-- $$$currentItem[overload1]$$$currentItem -->
<h3 class="fn"><a name="currentItem"></a><span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> * QListWidget::<span class="name">currentItem</span> () const</h3>
<p>Returns the current item.</p>
<p><b>See also </b><a href="qlistwidget.html#setCurrentItem">setCurrentItem</a>().</p>
<!-- @@@currentItem -->
<!-- $$$currentItemChanged[overload1]$$$currentItemChangedQListWidgetItem*QListWidgetItem* -->
<h3 class="fn"><a name="currentItemChanged"></a><span class="type">void</span> QListWidget::<span class="name">currentItemChanged</span> ( <span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> * <i>current</i>, <span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> * <i>previous</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the current item changes.</p>
<p><i>previous</i> is the item that previously had the focus; <i>current</i> is the new current item.</p>
<!-- @@@currentItemChanged -->
<!-- $$$currentRowChanged[overload1]$$$currentRowChangedint -->
<h3 class="fn"><a name="currentRowChanged"></a><span class="type">void</span> QListWidget::<span class="name">currentRowChanged</span> ( <span class="type">int</span> <i>currentRow</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the current item changes.</p>
<p><i>currentRow</i> is the row of the current item. If there is no current item, the <i>currentRow</i> is -1.</p>
<!-- @@@currentRowChanged -->
<!-- $$$currentTextChanged[overload1]$$$currentTextChangedconstQString& -->
<h3 class="fn"><a name="currentTextChanged"></a><span class="type">void</span> QListWidget::<span class="name">currentTextChanged</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>currentText</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the current item changes.</p>
<p><i>currentText</i> is the text data in the current item. If there is no current item, the <i>currentText</i> is invalid.</p>
<!-- @@@currentTextChanged -->
<!-- $$$dropEvent[overload1]$$$dropEventQDropEvent* -->
<h3 class="fn"><a name="dropEvent"></a><span class="type">void</span> QListWidget::<span class="name">dropEvent</span> ( <span class="type"><a href="qdropevent.html">QDropEvent</a></span> * <i>event</i> )<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#dropEvent">QWidget::dropEvent</a>().</p>
<!-- @@@dropEvent -->
<!-- $$$dropMimeData[overload1]$$$dropMimeDataintconstQMimeData*Qt::DropAction -->
<h3 class="fn"><a name="dropMimeData"></a><span class="type">bool</span> QListWidget::<span class="name">dropMimeData</span> ( <span class="type">int</span> <i>index</i>, const <span class="type"><a href="qmimedata.html">QMimeData</a></span> * <i>data</i>, <span class="type"><a href="qt.html#DropAction-enum">Qt::DropAction</a></span> <i>action</i> )<tt> [virtual protected]</tt></h3>
<p>Handles <i>data</i> supplied by an external drag and drop operation that ended with the given <i>action</i> in the given <i>index</i>. Returns true if <i>data</i> and <i>action</i> can be handled by the model; otherwise returns false.</p>
<p><b>See also </b><a href="qlistwidget.html#supportedDropActions">supportedDropActions</a>().</p>
<!-- @@@dropMimeData -->
<!-- $$$editItem[overload1]$$$editItemQListWidgetItem* -->
<h3 class="fn"><a name="editItem"></a><span class="type">void</span> QListWidget::<span class="name">editItem</span> ( <span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> * <i>item</i> )</h3>
<p>Starts editing the <i>item</i> if it is editable.</p>
<!-- @@@editItem -->
<!-- $$$event[overload1]$$$eventQEvent* -->
<h3 class="fn"><a name="event"></a><span class="type">bool</span> QListWidget::<span class="name">event</span> ( <span class="type"><a href="qevent.html">QEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qobject.html#event">QObject::event</a>().</p>
<!-- @@@event -->
<!-- $$$findItems[overload1]$$$findItemsconstQString&Qt::MatchFlags -->
<h3 class="fn"><a name="findItems"></a><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> *&gt; QListWidget::<span class="name">findItems</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i>, <span class="type"><a href="qt.html#MatchFlag-enum">Qt::MatchFlags</a></span> <i>flags</i> ) const</h3>
<p>Finds items with the text that matches the string <i>text</i> using the given <i>flags</i>.</p>
<!-- @@@findItems -->
<!-- $$$indexFromItem[overload1]$$$indexFromItemQListWidgetItem* -->
<h3 class="fn"><a name="indexFromItem"></a><span class="type"><a href="qmodelindex.html">QModelIndex</a></span> QListWidget::<span class="name">indexFromItem</span> ( <span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> * <i>item</i> ) const<tt> [protected]</tt></h3>
<p>Returns the <a href="qmodelindex.html">QModelIndex</a> assocated with the given <i>item</i>.</p>
<!-- @@@indexFromItem -->
<!-- $$$insertItem[overload1]$$$insertItemintQListWidgetItem* -->
<h3 class="fn"><a name="insertItem"></a><span class="type">void</span> QListWidget::<span class="name">insertItem</span> ( <span class="type">int</span> <i>row</i>, <span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> * <i>item</i> )</h3>
<p>Inserts the <i>item</i> at the position in the list given by <i>row</i>.</p>
<p><b>See also </b><a href="qlistwidget.html#addItem">addItem</a>().</p>
<!-- @@@insertItem -->
<!-- $$$insertItem$$$insertItemintconstQString& -->
<h3 class="fn"><a name="insertItem-2"></a><span class="type">void</span> QListWidget::<span class="name">insertItem</span> ( <span class="type">int</span> <i>row</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>label</i> )</h3>
<p>Inserts an item with the text <i>label</i> in the list widget at the position given by <i>row</i>.</p>
<p><b>See also </b><a href="qlistwidget.html#addItem">addItem</a>().</p>
<!-- @@@insertItem -->
<!-- $$$insertItems[overload1]$$$insertItemsintconstQStringList& -->
<h3 class="fn"><a name="insertItems"></a><span class="type">void</span> QListWidget::<span class="name">insertItems</span> ( <span class="type">int</span> <i>row</i>, const <span class="type"><a href="qstringlist.html">QStringList</a></span> &amp; <i>labels</i> )</h3>
<p>Inserts items from the list of <i>labels</i> into the list, starting at the given <i>row</i>.</p>
<p><b>See also </b><a href="qlistwidget.html#insertItem">insertItem</a>() and <a href="qlistwidget.html#addItem">addItem</a>().</p>
<!-- @@@insertItems -->
<!-- $$$item[overload1]$$$itemint -->
<h3 class="fn"><a name="item"></a><span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> * QListWidget::<span class="name">item</span> ( <span class="type">int</span> <i>row</i> ) const</h3>
<p>Returns the item that occupies the given <i>row</i> in the list if one has been set; otherwise returns 0.</p>
<p><b>See also </b><a href="qlistwidget.html#row">row</a>().</p>
<!-- @@@item -->
<!-- $$$itemActivated[overload1]$$$itemActivatedQListWidgetItem* -->
<h3 class="fn"><a name="itemActivated"></a><span class="type">void</span> QListWidget::<span class="name">itemActivated</span> ( <span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> * <i>item</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the <i>item</i> is activated. The <i>item</i> is activated when the user clicks or double clicks on it, depending on the system configuration. It is also activated when the user presses the activation key (on Windows and X11 this is the <b>Return</b> key, on Mac OS X it is <b>Ctrl+0</b>).</p>
<!-- @@@itemActivated -->
<!-- $$$itemAt[overload1]$$$itemAtconstQPoint& -->
<h3 class="fn"><a name="itemAt"></a><span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> * QListWidget::<span class="name">itemAt</span> ( const <span class="type"><a href="qpoint.html">QPoint</a></span> &amp; <i>p</i> ) const</h3>
<p>Returns a pointer to the item at the coordinates <i>p</i>. The coordinates are relative to the list widget's <a href="qabstractscrollarea.html#viewport">viewport()</a>.</p>
<!-- @@@itemAt -->
<!-- $$$itemAt$$$itemAtintint -->
<h3 class="fn"><a name="itemAt-2"></a><span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> * QListWidget::<span class="name">itemAt</span> ( <span class="type">int</span> <i>x</i>, <span class="type">int</span> <i>y</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>Returns a pointer to the item at the coordinates (<i>x</i>, <i>y</i>). The coordinates are relative to the list widget's <a href="qabstractscrollarea.html#viewport">viewport()</a>.</p>
<!-- @@@itemAt -->
<!-- $$$itemChanged[overload1]$$$itemChangedQListWidgetItem* -->
<h3 class="fn"><a name="itemChanged"></a><span class="type">void</span> QListWidget::<span class="name">itemChanged</span> ( <span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> * <i>item</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the data of <i>item</i> has changed.</p>
<!-- @@@itemChanged -->
<!-- $$$itemClicked[overload1]$$$itemClickedQListWidgetItem* -->
<h3 class="fn"><a name="itemClicked"></a><span class="type">void</span> QListWidget::<span class="name">itemClicked</span> ( <span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> * <i>item</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted with the specified <i>item</i> when a mouse button is clicked on an item in the widget.</p>
<p><b>See also </b><a href="qlistwidget.html#itemPressed">itemPressed</a>() and <a href="qlistwidget.html#itemDoubleClicked">itemDoubleClicked</a>().</p>
<!-- @@@itemClicked -->
<!-- $$$itemDoubleClicked[overload1]$$$itemDoubleClickedQListWidgetItem* -->
<h3 class="fn"><a name="itemDoubleClicked"></a><span class="type">void</span> QListWidget::<span class="name">itemDoubleClicked</span> ( <span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> * <i>item</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted with the specified <i>item</i> when a mouse button is double clicked on an item in the widget.</p>
<p><b>See also </b><a href="qlistwidget.html#itemClicked">itemClicked</a>() and <a href="qlistwidget.html#itemPressed">itemPressed</a>().</p>
<!-- @@@itemDoubleClicked -->
<!-- $$$itemEntered[overload1]$$$itemEnteredQListWidgetItem* -->
<h3 class="fn"><a name="itemEntered"></a><span class="type">void</span> QListWidget::<span class="name">itemEntered</span> ( <span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> * <i>item</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the mouse cursor enters an item. The <i>item</i> is the item entered. This signal is only emitted when <a href="qwidget.html#mouseTracking-prop">mouseTracking</a> is turned on, or when a mouse button is pressed while moving into an item.</p>
<p><b>See also </b><a href="qwidget.html#mouseTracking-prop">QWidget::setMouseTracking</a>().</p>
<!-- @@@itemEntered -->
<!-- $$$itemFromIndex[overload1]$$$itemFromIndexconstQModelIndex& -->
<h3 class="fn"><a name="itemFromIndex"></a><span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> * QListWidget::<span class="name">itemFromIndex</span> ( const <span class="type"><a href="qmodelindex.html">QModelIndex</a></span> &amp; <i>index</i> ) const<tt> [protected]</tt></h3>
<p>Returns a pointer to the <a href="qlistwidgetitem.html">QListWidgetItem</a> assocated with the given <i>index</i>.</p>
<!-- @@@itemFromIndex -->
<!-- $$$itemPressed[overload1]$$$itemPressedQListWidgetItem* -->
<h3 class="fn"><a name="itemPressed"></a><span class="type">void</span> QListWidget::<span class="name">itemPressed</span> ( <span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> * <i>item</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted with the specified <i>item</i> when a mouse button is pressed on an item in the widget.</p>
<p><b>See also </b><a href="qlistwidget.html#itemClicked">itemClicked</a>() and <a href="qlistwidget.html#itemDoubleClicked">itemDoubleClicked</a>().</p>
<!-- @@@itemPressed -->
<!-- $$$itemSelectionChanged[overload1]$$$itemSelectionChanged -->
<h3 class="fn"><a name="itemSelectionChanged"></a><span class="type">void</span> QListWidget::<span class="name">itemSelectionChanged</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the selection changes.</p>
<p><b>See also </b><a href="qlistwidget.html#selectedItems">selectedItems</a>(), <a href="qlistwidgetitem.html#isSelected">QListWidgetItem::isSelected</a>(), and <a href="qlistwidget.html#currentItemChanged">currentItemChanged</a>().</p>
<!-- @@@itemSelectionChanged -->
<!-- $$$itemWidget[overload1]$$$itemWidgetQListWidgetItem* -->
<h3 class="fn"><a name="itemWidget"></a><span class="type"><a href="qwidget.html">QWidget</a></span> * QListWidget::<span class="name">itemWidget</span> ( <span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> * <i>item</i> ) const</h3>
<p>Returns the widget displayed in the given <i>item</i>.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qlistwidget.html#setItemWidget">setItemWidget</a>().</p>
<!-- @@@itemWidget -->
<!-- $$$items[overload1]$$$itemsconstQMimeData* -->
<h3 class="fn"><a name="items"></a><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> *&gt; QListWidget::<span class="name">items</span> ( const <span class="type"><a href="qmimedata.html">QMimeData</a></span> * <i>data</i> ) const<tt> [protected]</tt></h3>
<p>Returns a list of pointers to the items contained in the <i>data</i> object. If the object was not created by a <a href="qlistwidget.html">QListWidget</a> in the same process, the list is empty.</p>
<!-- @@@items -->
<!-- $$$mimeData[overload1]$$$mimeDataconstQList<QListWidgetItem*> -->
<h3 class="fn"><a name="mimeData"></a><span class="type"><a href="qmimedata.html">QMimeData</a></span> * QListWidget::<span class="name">mimeData</span> ( const <span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> *&gt; <i>items</i> ) const<tt> [virtual protected]</tt></h3>
<p>Returns an object that contains a serialized description of the specified <i>items</i>. The format used to describe the items is obtained from the <a href="qlistwidget.html#mimeTypes">mimeTypes</a>() function.</p>
<p>If the list of items is empty, 0 is returned instead of a serialized empty list.</p>
<!-- @@@mimeData -->
<!-- $$$mimeTypes[overload1]$$$mimeTypes -->
<h3 class="fn"><a name="mimeTypes"></a><span class="type"><a href="qstringlist.html">QStringList</a></span> QListWidget::<span class="name">mimeTypes</span> () const<tt> [virtual protected]</tt></h3>
<p>Returns a list of MIME types that can be used to describe a list of listwidget items.</p>
<p><b>See also </b><a href="qlistwidget.html#mimeData">mimeData</a>().</p>
<!-- @@@mimeTypes -->
<!-- $$$openPersistentEditor[overload1]$$$openPersistentEditorQListWidgetItem* -->
<h3 class="fn"><a name="openPersistentEditor"></a><span class="type">void</span> QListWidget::<span class="name">openPersistentEditor</span> ( <span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> * <i>item</i> )</h3>
<p>Opens an editor for the given <i>item</i>. The editor remains open after editing.</p>
<p><b>See also </b><a href="qlistwidget.html#closePersistentEditor">closePersistentEditor</a>().</p>
<!-- @@@openPersistentEditor -->
<!-- $$$removeItemWidget[overload1]$$$removeItemWidgetQListWidgetItem* -->
<h3 class="fn"><a name="removeItemWidget"></a><span class="type">void</span> QListWidget::<span class="name">removeItemWidget</span> ( <span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> * <i>item</i> )</h3>
<p>Removes the widget set on the given <i>item</i>.</p>
<p>This function was introduced in Qt 4.3.</p>
<!-- @@@removeItemWidget -->
<!-- $$$row[overload1]$$$rowconstQListWidgetItem* -->
<h3 class="fn"><a name="row"></a><span class="type">int</span> QListWidget::<span class="name">row</span> ( const <span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> * <i>item</i> ) const</h3>
<p>Returns the row containing the given <i>item</i>.</p>
<p><b>See also </b><a href="qlistwidget.html#item">item</a>().</p>
<!-- @@@row -->
<!-- $$$scrollToItem[overload1]$$$scrollToItemconstQListWidgetItem*QAbstractItemView::ScrollHint -->
<h3 class="fn"><a name="scrollToItem"></a><span class="type">void</span> QListWidget::<span class="name">scrollToItem</span> ( const <span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> * <i>item</i>, <span class="type"><a href="qabstractitemview.html#ScrollHint-enum">QAbstractItemView::ScrollHint</a></span> <i>hint</i> = EnsureVisible )<tt> [slot]</tt></h3>
<p>Scrolls the view if necessary to ensure that the <i>item</i> is visible.</p>
<p><i>hint</i> specifies where the <i>item</i> should be located after the operation.</p>
<!-- @@@scrollToItem -->
<!-- $$$selectedItems[overload1]$$$selectedItems -->
<h3 class="fn"><a name="selectedItems"></a><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> *&gt; QListWidget::<span class="name">selectedItems</span> () const</h3>
<p>Returns a list of all selected items in the list widget.</p>
<!-- @@@selectedItems -->
<!-- $$$setCurrentItem[overload1]$$$setCurrentItemQListWidgetItem* -->
<h3 class="fn"><a name="setCurrentItem"></a><span class="type">void</span> QListWidget::<span class="name">setCurrentItem</span> ( <span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> * <i>item</i> )</h3>
<p>Sets the current item to <i>item</i>.</p>
<p>Unless the selection mode is <a href="qabstractitemview.html#SelectionMode-enum">NoSelection</a>, the item is also be selected.</p>
<p><b>See also </b><a href="qlistwidget.html#currentItem">currentItem</a>().</p>
<!-- @@@setCurrentItem -->
<!-- $$$setCurrentItem$$$setCurrentItemQListWidgetItem*QItemSelectionModel::SelectionFlags -->
<h3 class="fn"><a name="setCurrentItem-2"></a><span class="type">void</span> QListWidget::<span class="name">setCurrentItem</span> ( <span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> * <i>item</i>, <span class="type"><a href="qitemselectionmodel.html#SelectionFlag-enum">QItemSelectionModel::SelectionFlags</a></span> <i>command</i> )</h3>
<p>Set the current item to <i>item</i>, using the given <i>command</i>.</p>
<p>This function was introduced in Qt 4.4.</p>
<!-- @@@setCurrentItem -->
<!-- $$$setItemWidget[overload1]$$$setItemWidgetQListWidgetItem*QWidget* -->
<h3 class="fn"><a name="setItemWidget"></a><span class="type">void</span> QListWidget::<span class="name">setItemWidget</span> ( <span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> * <i>item</i>, <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>widget</i> )</h3>
<p>Sets the <i>widget</i> to be displayed in the give <i>item</i>.</p>
<p>This function should only be used to display static content in the place of a list widget item. If you want to display custom dynamic content or implement a custom editor widget, use <a href="qlistview.html">QListView</a> and subclass <a href="qitemdelegate.html">QItemDelegate</a> instead.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also </b><a href="qlistwidget.html#itemWidget">itemWidget</a>() and <a href="model-view-programming.html#delegate-classes">Delegate Classes</a>.</p>
<!-- @@@setItemWidget -->
<!-- $$$sortItems[overload1]$$$sortItemsQt::SortOrder -->
<h3 class="fn"><a name="sortItems"></a><span class="type">void</span> QListWidget::<span class="name">sortItems</span> ( <span class="type"><a href="qt.html#SortOrder-enum">Qt::SortOrder</a></span> <i>order</i> = Qt::AscendingOrder )</h3>
<p>Sorts all the items in the list widget according to the specified <i>order</i>.</p>
<!-- @@@sortItems -->
<!-- $$$supportedDropActions[overload1]$$$supportedDropActions -->
<h3 class="fn"><a name="supportedDropActions"></a><span class="type"><a href="qt.html#DropAction-enum">Qt::DropActions</a></span> QListWidget::<span class="name">supportedDropActions</span> () const<tt> [virtual protected]</tt></h3>
<p>Returns the drop actions supported by this view.</p>
<p><b>See also </b><a href="qt.html#DropAction-enum">Qt::DropActions</a>.</p>
<!-- @@@supportedDropActions -->
<!-- $$$takeItem[overload1]$$$takeItemint -->
<h3 class="fn"><a name="takeItem"></a><span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> * QListWidget::<span class="name">takeItem</span> ( <span class="type">int</span> <i>row</i> )</h3>
<p>Removes and returns the item from the given <i>row</i> in the list widget; otherwise returns 0.</p>
<p>Items removed from a list widget will not be managed by Qt, and will need to be deleted manually.</p>
<p><b>See also </b><a href="qlistwidget.html#insertItem">insertItem</a>() and <a href="qlistwidget.html#addItem">addItem</a>().</p>
<!-- @@@takeItem -->
<!-- $$$visualItemRect[overload1]$$$visualItemRectconstQListWidgetItem* -->
<h3 class="fn"><a name="visualItemRect"></a><span class="type"><a href="qrect.html">QRect</a></span> QListWidget::<span class="name">visualItemRect</span> ( const <span class="type"><a href="qlistwidgetitem.html">QListWidgetItem</a></span> * <i>item</i> ) const</h3>
<p>Returns the rectangle on the viewport occupied by the item at <i>item</i>.</p>
<!-- @@@visualItemRect -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
      Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      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. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

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