Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > ff187cb994c94c614ecc64c5a8528b1b > files > 4585

qt-doc-4.8.5-10.fc18.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" />
<!-- q3listbox.cpp -->
  <title>Qt 4.8: Q3ListBox 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>Qt3SupportLight</li>
<li>Q3ListBox</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="#public-types">Public Types</a></li>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#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">Q3ListBox Class Reference</h1>
<!-- $$$Q3ListBox-brief -->
<p>The Q3ListBox widget provides a list of selectable, read-only items. <a href="#details">More...</a></p>
<!-- @@@Q3ListBox -->
<pre class="cpp"> <span class="preprocessor">#include &lt;Q3ListBox&gt;</span></pre><p><b>This class is part of the Qt 3 support library.</b> It is provided to keep old source code working. We strongly advise against using it in new code. See <a href="porting4.html#qlistbox">Porting to Qt 4</a> for more information.</p>
<p><b>Inherits: </b><a href="q3scrollview.html">Q3ScrollView</a>.</p>
<ul>
<li><a href="q3listbox-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#ComparisonFlags-typedef">ComparisonFlags</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#LayoutMode-enum">LayoutMode</a></b> { FixedNumber, FitToWidth, FitToHeight, Variable }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#SelectionMode-enum">SelectionMode</a></b> { Single, Multi, Extended, NoSelection }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#StringComparisonMode-enum">StringComparisonMode</a></b> { CaseSensitive, ExactMatch, BeginsWith, EndsWith, Contains }</td></tr>
</table>
<a name="properties"></a>
<h2>Properties</h2>
<table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><b><a href="q3listbox.html#columnMode-prop">columnMode</a></b> : LayoutMode</li>
<li class="fn"><b><a href="q3listbox.html#count-prop">count</a></b> : const uint</li>
<li class="fn"><b><a href="q3listbox.html#currentItem-prop">currentItem</a></b> : int</li>
<li class="fn"><b><a href="q3listbox.html#currentText-prop">currentText</a></b> : const QString</li>
<li class="fn"><b><a href="q3listbox.html#multiSelection-prop">multiSelection</a></b> : bool</li>
<li class="fn"><b><a href="q3listbox.html#numColumns-prop">numColumns</a></b> : const int</li>
<li class="fn"><b><a href="q3listbox.html#numItemsVisible-prop">numItemsVisible</a></b> : const int</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><b><a href="q3listbox.html#numRows-prop">numRows</a></b> : const int</li>
<li class="fn"><b><a href="q3listbox.html#rowMode-prop">rowMode</a></b> : LayoutMode</li>
<li class="fn"><b><a href="q3listbox.html#selectionMode-prop">selectionMode</a></b> : SelectionMode</li>
<li class="fn"><b><a href="q3listbox.html#topItem-prop">topItem</a></b> : int</li>
<li class="fn"><b><a href="q3listbox.html#variableHeight-prop">variableHeight</a></b> : bool</li>
<li class="fn"><b><a href="q3listbox.html#variableWidth-prop">variableWidth</a></b> : bool</li>
</ul>
</td></tr>
</table>
<ul>
<li class="fn">10 properties inherited from <a href="q3scrollview.html#properties">Q3ScrollView</a></li>
<li class="fn">2 properties inherited from <a href="q3frame.html#properties">Q3Frame</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="q3listbox.html#Q3ListBox">Q3ListBox</a></b> ( QWidget * <i>parent</i> = 0, const char * <i>name</i> = 0, Qt::WindowFlags <i>f</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#dtor.Q3ListBox">~Q3ListBox</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#autoBottomScrollBar">autoBottomScrollBar</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#autoScroll">autoScroll</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#autoScrollBar">autoScrollBar</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#autoUpdate">autoUpdate</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#bottomScrollBar">bottomScrollBar</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#cellHeight">cellHeight</a></b> ( int <i>i</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#cellHeight-2">cellHeight</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#cellWidth">cellWidth</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#cellWidth-2">cellWidth</a></b> ( int <i>i</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#centerCurrentItem">centerCurrentItem</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#changeItem">changeItem</a></b> ( const Q3ListBoxItem * <i>lbi</i>, int <i>index</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#changeItem-2">changeItem</a></b> ( const QString &amp; <i>text</i>, int <i>index</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#changeItem-3">changeItem</a></b> ( const QPixmap &amp; <i>pixmap</i>, int <i>index</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#changeItem-4">changeItem</a></b> ( const QPixmap &amp; <i>pixmap</i>, const QString &amp; <i>text</i>, int <i>index</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> LayoutMode </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#columnMode-prop">columnMode</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> uint </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#count-prop">count</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#currentItem-prop">currentItem</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#currentText-prop">currentText</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#dragSelect">dragSelect</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ListBoxItem * </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#findItem">findItem</a></b> ( const QString &amp; <i>text</i>, ComparisonFlags <i>compare</i> = BeginsWith ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ListBoxItem * </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#firstItem">firstItem</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#inSort">inSort</a></b> ( const Q3ListBoxItem * <i>lbi</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#inSort-2">inSort</a></b> ( const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#index">index</a></b> ( const Q3ListBoxItem * <i>lbi</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#insertItem">insertItem</a></b> ( const Q3ListBoxItem * <i>lbi</i>, int <i>index</i> = -1 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#insertItem-2">insertItem</a></b> ( const Q3ListBoxItem * <i>lbi</i>, const Q3ListBoxItem * <i>after</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#insertItem-3">insertItem</a></b> ( const QString &amp; <i>text</i>, int <i>index</i> = -1 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#insertItem-4">insertItem</a></b> ( const QPixmap &amp; <i>pixmap</i>, int <i>index</i> = -1 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#insertItem-5">insertItem</a></b> ( const QPixmap &amp; <i>pixmap</i>, const QString &amp; <i>text</i>, int <i>index</i> = -1 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#insertStrList">insertStrList</a></b> ( const char ** <i>strings</i>, int <i>numStrings</i> = -1, int <i>index</i> = -1 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#insertStringList">insertStringList</a></b> ( const QStringList &amp; <i>list</i>, int <i>index</i> = -1 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#multiSelection-prop">isMultiSelection</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#isSelected">isSelected</a></b> ( int <i>i</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#isSelected-2">isSelected</a></b> ( const Q3ListBoxItem * <i>i</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ListBoxItem * </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#item">item</a></b> ( int <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ListBoxItem * </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#itemAt">itemAt</a></b> ( const QPoint &amp; <i>p</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#itemHeight">itemHeight</a></b> ( int <i>index</i> = 0 ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRect </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#itemRect">itemRect</a></b> ( Q3ListBoxItem * <i>item</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#itemVisible">itemVisible</a></b> ( int <i>index</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#itemVisible-2">itemVisible</a></b> ( const Q3ListBoxItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> long </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#maxItemWidth">maxItemWidth</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#numCols">numCols</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#numColumns-prop">numColumns</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#numItemsVisible-prop">numItemsVisible</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#numRows-prop">numRows</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QPixmap * </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#pixmap">pixmap</a></b> ( int <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#removeItem">removeItem</a></b> ( int <i>index</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> LayoutMode </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#rowMode-prop">rowMode</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#scrollBar">scrollBar</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Q3ListBoxItem * </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#selectedItem">selectedItem</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> SelectionMode </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#selectionMode-prop">selectionMode</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#setAutoBottomScrollBar">setAutoBottomScrollBar</a></b> ( bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#setAutoScroll">setAutoScroll</a></b> ( bool <i>b</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#setAutoScrollBar">setAutoScrollBar</a></b> ( bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#setAutoUpdate">setAutoUpdate</a></b> ( bool <i>b</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#setBottomItem">setBottomItem</a></b> ( int <i>index</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#setBottomScrollBar">setBottomScrollBar</a></b> ( bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#columnMode-prop">setColumnMode</a></b> ( LayoutMode )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#columnMode-prop">setColumnMode</a></b> ( int )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#currentItem-prop">setCurrentItem</a></b> ( int <i>index</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#currentItem-prop">setCurrentItem</a></b> ( Q3ListBoxItem * <i>i</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#setDragSelect">setDragSelect</a></b> ( bool <i>b</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#setFixedVisibleLines">setFixedVisibleLines</a></b> ( int <i>lines</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#multiSelection-prop">setMultiSelection</a></b> ( bool <i>multi</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#rowMode-prop">setRowMode</a></b> ( LayoutMode )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#rowMode-prop">setRowMode</a></b> ( int )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#setScrollBar">setScrollBar</a></b> ( bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#setSelected">setSelected</a></b> ( Q3ListBoxItem * <i>item</i>, bool <i>select</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#setSelected-2">setSelected</a></b> ( int <i>index</i>, bool <i>select</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#selectionMode-prop">setSelectionMode</a></b> ( SelectionMode )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#setSmoothScrolling">setSmoothScrolling</a></b> ( bool <i>b</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#topItem-prop">setTopItem</a></b> ( int <i>index</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#variableHeight-prop">setVariableHeight</a></b> ( bool )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#variableWidth-prop">setVariableWidth</a></b> ( bool )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#smoothScrolling">smoothScrolling</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#sort">sort</a></b> ( bool <i>ascending</i> = true )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#takeItem">takeItem</a></b> ( const Q3ListBoxItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#text">text</a></b> ( int <i>index</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#topItem-prop">topItem</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#triggerUpdate">triggerUpdate</a></b> ( bool <i>doLayout</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#variableHeight-prop">variableHeight</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#variableWidth-prop">variableWidth</a></b> () 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 QVariant </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#inputMethodQuery">inputMethodQuery</a></b> ( Qt::InputMethodQuery <i>query</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSize </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#minimumSizeHint">minimumSizeHint</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSize </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#sizeHint">sizeHint</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#viewportPaintEvent">viewportPaintEvent</a></b> ( QPaintEvent * <i>e</i> )</td></tr>
</table>
<ul>
<li class="fn">49 public functions inherited from <a href="q3scrollview.html#public-functions">Q3ScrollView</a></li>
<li class="fn">4 public functions inherited from <a href="q3frame.html#public-functions">Q3Frame</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="q3listbox.html#clear">clear</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#clearSelection">clearSelection</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#ensureCurrentVisible">ensureCurrentVisible</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#invertSelection">invertSelection</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#selectAll">selectAll</a></b> ( bool <i>select</i> )</td></tr>
</table>
<ul>
<li class="fn">8 public slots inherited from <a href="q3scrollview.html#public-slots">Q3ScrollView</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="q3listbox.html#clicked">clicked</a></b> ( Q3ListBoxItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#clicked-2">clicked</a></b> ( Q3ListBoxItem * <i>item</i>, const QPoint &amp; <i>pnt</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#contextMenuRequested">contextMenuRequested</a></b> ( Q3ListBoxItem * <i>item</i>, const QPoint &amp; <i>pos</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#currentChanged">currentChanged</a></b> ( Q3ListBoxItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#doubleClicked">doubleClicked</a></b> ( Q3ListBoxItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#highlighted">highlighted</a></b> ( int <i>index</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#highlighted-2">highlighted</a></b> ( Q3ListBoxItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#highlighted-3">highlighted</a></b> ( const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#mouseButtonClicked">mouseButtonClicked</a></b> ( int <i>button</i>, Q3ListBoxItem * <i>item</i>, const QPoint &amp; <i>pos</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#mouseButtonPressed">mouseButtonPressed</a></b> ( int <i>button</i>, Q3ListBoxItem * <i>item</i>, const QPoint &amp; <i>pos</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#onItem">onItem</a></b> ( Q3ListBoxItem * <i>i</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#onViewport">onViewport</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#pressed">pressed</a></b> ( Q3ListBoxItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#pressed-2">pressed</a></b> ( Q3ListBoxItem * <i>item</i>, const QPoint &amp; <i>pnt</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#returnPressed">returnPressed</a></b> ( Q3ListBoxItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#rightButtonClicked">rightButtonClicked</a></b> ( Q3ListBoxItem * <i>item</i>, const QPoint &amp; <i>point</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#rightButtonPressed">rightButtonPressed</a></b> ( Q3ListBoxItem * <i>item</i>, const QPoint &amp; <i>point</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#selected">selected</a></b> ( int <i>index</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#selected-2">selected</a></b> ( Q3ListBoxItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#selected-3">selected</a></b> ( const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#selectionChanged">selectionChanged</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#selectionChanged-2">selectionChanged</a></b> ( Q3ListBoxItem * <i>item</i> )</td></tr>
</table>
<ul>
<li class="fn">5 signals inherited from <a href="q3scrollview.html#signals">Q3ScrollView</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"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#doLayout">doLayout</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#findItem-2">findItem</a></b> ( int <i>yPos</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#isRubberSelecting">isRubberSelecting</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#paintCell">paintCell</a></b> ( QPainter * <i>p</i>, int <i>row</i>, int <i>col</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#toggleCurrentItem">toggleCurrentItem</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#totalHeight">totalHeight</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#totalWidth">totalWidth</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#updateCellWidth">updateCellWidth</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#updateItem">updateItem</a></b> ( int <i>index</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#updateItem-2">updateItem</a></b> ( Q3ListBoxItem * <i>i</i> )</td></tr>
</table>
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#changeEvent">changeEvent</a></b> ( QEvent * <i>ev</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#contentsContextMenuEvent">contentsContextMenuEvent</a></b> ( QContextMenuEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#eventFilter">eventFilter</a></b> ( QObject * <i>o</i>, QEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#focusInEvent">focusInEvent</a></b> ( QFocusEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#focusOutEvent">focusOutEvent</a></b> ( QFocusEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#keyPressEvent">keyPressEvent</a></b> ( QKeyEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a></b> ( QMouseEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#mouseMoveEvent">mouseMoveEvent</a></b> ( QMouseEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#mousePressEvent">mousePressEvent</a></b> ( QMouseEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#mouseReleaseEvent">mouseReleaseEvent</a></b> ( QMouseEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#resizeEvent">resizeEvent</a></b> ( QResizeEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3listbox.html#showEvent">showEvent</a></b> ( QShowEvent * )</td></tr>
</table>
<ul>
<li class="fn">26 protected functions inherited from <a href="q3scrollview.html#protected-functions">Q3ScrollView</a></li>
<li class="fn">5 protected functions inherited from <a href="q3frame.html#protected-functions">Q3Frame</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">1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<a name="details"></a>
<!-- $$$Q3ListBox-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The Q3ListBox widget provides a list of selectable, read-only items.</p>
<p>This is typically a single-column list in which either no item or one item is selected, but it can also be used in many other ways.</p>
<p>Q3ListBox will add scroll bars as necessary, but it isn't intended for <i>really</i> big lists. If you want more than a few thousand items, it's probably better to use a different widget mainly because the scroll bars won't provide very good navigation, but also because Q3ListBox may become slow with huge lists. (See <a href="q3listview.html">Q3ListView</a> and <a href="q3table.html">Q3Table</a> for possible alternatives.)</p>
<p>There are a variety of selection modes described in the <a href="q3listbox.html#SelectionMode-enum">Q3ListBox::SelectionMode</a> documentation. The default is <a href="q3listbox.html#SelectionMode-enum">Single</a> selection mode, but you can change it using <a href="q3listbox.html#selectionMode-prop">setSelectionMode</a>(). (<a href="q3listbox.html#multiSelection-prop">setMultiSelection</a>() is still provided for compatibility with Qt 1.x&#x2e; We recommend using <a href="q3listbox.html#selectionMode-prop">setSelectionMode</a>() in all code.)</p>
<p>Because Q3ListBox offers multiple selection it must display keyboard focus and selection state separately. Therefore there are functions both to set the selection state of an item, i.e&#x2e; <a href="q3listbox.html#setSelected">setSelected</a>(), and to set which item displays keyboard focus, i.e&#x2e; <a href="q3listbox.html#currentItem-prop">setCurrentItem</a>().</p>
<p>The list box normally arranges its items in a single column and adds a vertical scroll bar if required. It is possible to have a different fixed number of columns (<a href="q3listbox.html#columnMode-prop">setColumnMode</a>()), or as many columns as will fit in the list box's assigned screen space (setColumnMode(<a href="q3listbox.html#LayoutMode-enum">FitToWidth</a>)), or to have a fixed number of rows (<a href="q3listbox.html#rowMode-prop">setRowMode</a>()) or as many rows as will fit in the list box's assigned screen space (setRowMode(<a href="q3listbox.html#LayoutMode-enum">FitToHeight</a>)). In all these cases Q3ListBox will add scroll bars, as appropriate, in at least one direction.</p>
<p>If multiple rows are used, each row can be as high as necessary (the normal setting), or you can request that all items will have the same height by calling setVariableHeight(false). The same applies to a column's width, see <a href="q3listbox.html#variableWidth-prop">setVariableWidth</a>().</p>
<p>The Q3ListBox's items are <a href="q3listboxitem.html">Q3ListBoxItem</a> objects. Q3ListBox provides methods to insert new items as strings, as pixmaps, and as <a href="q3listboxitem.html">Q3ListBoxItem</a> * (<a href="q3listbox.html#insertItem">insertItem</a>() with various arguments), and to replace an existing item with a new string, pixmap or <a href="q3listboxitem.html">Q3ListBoxItem</a> (<a href="q3listbox.html#changeItem">changeItem</a>() with various arguments). You can also remove items singly with <a href="q3listbox.html#removeItem">removeItem</a>() or <a href="q3listbox.html#clear">clear</a>() the entire list box. Note that if you create a <a href="q3listboxitem.html">Q3ListBoxItem</a> yourself and insert it, Q3ListBox takes ownership of the item.</p>
<p>You can also create a <a href="q3listboxitem.html">Q3ListBoxItem</a>, such as <a href="q3listboxtext.html">Q3ListBoxText</a> or <a href="q3listboxpixmap.html">Q3ListBoxPixmap</a>, with the list box as first parameter. The item will then append itself. When you delete an item it is automatically removed from the list box.</p>
<p>The list of items can be arbitrarily large; Q3ListBox will add scroll bars if necessary. Q3ListBox can display a single-column (the common case) or multiple-columns, and offers both single and multiple selection. Q3ListBox does not support multiple-column items (but <a href="q3listview.html">Q3ListView</a> and <a href="q3table.html">Q3Table</a> do), or tree hierarchies (but <a href="q3listview.html">Q3ListView</a> does).</p>
<p>The list box items can be accessed both as <a href="q3listboxitem.html">Q3ListBoxItem</a> objects (recommended) and using integer indexes (the original Q3ListBox implementation used an array of strings internally, and the API still supports this mode of operation). Everything can be done using the new objects, and most things can be done using indexes.</p>
<p>Each item in a Q3ListBox contains a <a href="q3listboxitem.html">Q3ListBoxItem</a>. One of the items can be the current item. The <a href="q3listbox.html#currentChanged">currentChanged</a>() signal and the <a href="q3listbox.html#highlighted">highlighted</a>() signal are emitted when a new item becomes current, e.g&#x2e; because the user clicks on it or <a href="q3listbox.html#currentItem-prop">Q3ListBox::setCurrentItem</a>() is called. The <a href="q3listbox.html#selected">selected</a>() signal is emitted when the user double-clicks on an item or presses Enter on the current item.</p>
<p>If the user does not select anything, no signals are emitted and <a href="q3listbox.html#currentItem-prop">currentItem</a>() returns -1.</p>
<p>A list box has <a href="qt.html#FocusPolicy-enum">Qt::WheelFocus</a> as a default <a href="qwidget.html#focusPolicy-prop">focusPolicy</a>(), i.e&#x2e; it can get keyboard focus by tabbing, clicking and through the use of the mouse wheel.</p>
<p>New items can be inserted using <a href="q3listbox.html#insertItem">insertItem</a>(), <a href="q3listbox.html#insertStrList">insertStrList</a>() or <a href="q3listbox.html#insertStringList">insertStringList</a>().</p>
<p>By default, vertical and horizontal scroll bars are added and removed as necessary. <a href="q3scrollview.html#hScrollBarMode-prop">setHScrollBarMode</a>() and <a href="q3scrollview.html#vScrollBarMode-prop">setVScrollBarMode</a>() can be used to change this policy.</p>
<p>If you need to insert types other than strings and pixmaps, you must define new classes which inherit <a href="q3listboxitem.html">Q3ListBoxItem</a>.</p>
<p><b>Warning:</b> The list box assumes ownership of all list box items and will delete them when it does not need them any more.</p>
<p><img src="images/qlistbox-m.png" alt="Screenshot in Motif style" /> <img src="images/qlistbox-w.png" alt="Screenshot in Windows style" /></p>
</div>
<p><b>See also </b><a href="q3listview.html">Q3ListView</a>, <a href="qcombobox.html">QComboBox</a>, and <a href="qbuttongroup.html">QButtonGroup</a>.</p>
<!-- @@@Q3ListBox -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$ComparisonFlags -->
<h3 class="fn"><a name="ComparisonFlags-typedef"></a>typedef Q3ListBox::<span class="name">ComparisonFlags</span></h3>
<p>This typedef is used in <a href="q3iconview.html" class="compat">Q3IconView</a>'s API for values that are OR'd combinations of <a href="q3listbox.html#StringComparisonMode-enum">StringComparisonMode</a> values.</p>
<p><b>See also </b><a href="q3listbox.html#StringComparisonMode-enum">StringComparisonMode</a>.</p>
<!-- @@@ComparisonFlags -->
<!-- $$$LayoutMode$$$FixedNumber$$$FitToWidth$$$FitToHeight$$$Variable -->
<h3 class="fn"><a name="LayoutMode-enum"></a>enum Q3ListBox::<span class="name">LayoutMode</span></h3>
<p>This enum type is used to specify how <a href="q3listbox.html" class="compat">Q3ListBox</a> lays out its rows and columns.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>Q3ListBox::FixedNumber</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">There is a fixed number of rows (or columns).</td></tr>
<tr><td class="topAlign"><tt>Q3ListBox::FitToWidth</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">There are as many columns as will fit on-screen.</td></tr>
<tr><td class="topAlign"><tt>Q3ListBox::FitToHeight</tt></td><td class="topAlign"><tt>FitToWidth</tt></td><td class="topAlign">There are as many rows as will fit on-screen.</td></tr>
<tr><td class="topAlign"><tt>Q3ListBox::Variable</tt></td><td class="topAlign">?</td><td class="topAlign">There are as many rows as are required by the column mode. (Or as many columns as required by the row mode.)</td></tr>
</table>
<p>Example: When you call setRowMode(FitToHeight), <a href="q3listbox.html#columnMode-prop">columnMode</a>() automatically becomes <tt>Variable</tt> to accommodate the row mode you've set.</p>
<!-- @@@LayoutMode -->
<!-- $$$SelectionMode$$$Single$$$Multi$$$Extended$$$NoSelection -->
<h3 class="fn"><a name="SelectionMode-enum"></a>enum Q3ListBox::<span class="name">SelectionMode</span></h3>
<p>This enumerated type is used by <a href="q3listbox.html" class="compat">Q3ListBox</a> to indicate how it reacts to selection by the user.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>Q3ListBox::Single</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">When the user selects an item, any already-selected item becomes unselected and the user cannot unselect the selected item. This means that the user can never clear the selection, even though the selection may be cleared by the application programmer using <a href="q3listbox.html#clearSelection">Q3ListBox::clearSelection</a>().</td></tr>
<tr><td class="topAlign"><tt>Q3ListBox::Multi</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">When the user selects an item the selection status of that item is toggled and the other items are left alone.</td></tr>
<tr><td class="topAlign"><tt>Q3ListBox::Extended</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">When the user selects an item the selection is cleared and the new item selected. However, if the user presses the Ctrl key when clicking on an item, the clicked item gets toggled and all other items are left untouched. And if the user presses the Shift key while clicking on an item, all items between the current item and the clicked item get selected or unselected, depending on the state of the clicked item. Also, multiple items can be selected by dragging the mouse while the left mouse button is kept pressed.</td></tr>
<tr><td class="topAlign"><tt>Q3ListBox::NoSelection</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">Items cannot be selected.</td></tr>
</table>
<p>In other words, <tt>Single</tt> is a real single-selection list box, <tt>Multi</tt> is a real multi-selection list box, <tt>Extended</tt> is a list box in which users can select multiple items but usually want to select either just one or a range of contiguous items, and <tt>NoSelection</tt> is for a list box where the user can look but not touch.</p>
<!-- @@@SelectionMode -->
<!-- $$$StringComparisonMode$$$CaseSensitive$$$BeginsWith$$$EndsWith$$$Contains$$$ExactMatch -->
<h3 class="fn"><a name="StringComparisonMode-enum"></a>enum Q3ListBox::<span class="name">StringComparisonMode</span></h3>
<p>This enum type is used to set the string comparison mode when searching for an item. We'll refer to the string being searched as the 'target' string.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>Q3ListBox::CaseSensitive</tt></td><td class="topAlign"><tt>0x00001</tt></td><td class="topAlign">The strings must match case sensitively.</td></tr>
<tr><td class="topAlign"><tt>Q3ListBox::ExactMatch</tt></td><td class="topAlign"><tt>0x00010</tt></td><td class="topAlign">The target and search strings must match exactly.</td></tr>
<tr><td class="topAlign"><tt>Q3ListBox::BeginsWith</tt></td><td class="topAlign"><tt>0x00002</tt></td><td class="topAlign">The target string begins with the search string.</td></tr>
<tr><td class="topAlign"><tt>Q3ListBox::EndsWith</tt></td><td class="topAlign"><tt>0x00004</tt></td><td class="topAlign">The target string ends with the search string.</td></tr>
<tr><td class="topAlign"><tt>Q3ListBox::Contains</tt></td><td class="topAlign"><tt>0x00008</tt></td><td class="topAlign">The target string contains the search string.</td></tr>
</table>
<p>If you OR these flags together (excluding <tt>CaseSensitive</tt>), the search criteria be applied in the following order: <tt>ExactMatch</tt>, <tt>BeginsWith</tt>, <tt>EndsWith</tt>, <tt>Contains</tt>.</p>
<p>Matching is case-insensitive unless <tt>CaseSensitive</tt> is set. <tt>CaseSensitive</tt> can be OR-ed with any combination of the other flags.</p>
<p><b>See also </b><a href="q3listbox.html#ComparisonFlags-typedef">ComparisonFlags</a>.</p>
<!-- @@@StringComparisonMode -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$columnMode-prop$$$columnMode$$$setColumnModeLayoutMode$$$setColumnModeint -->
<h3 class="fn"><a name="columnMode-prop"></a><span class="name">columnMode</span> : <span class="type"><a href="q3listbox.html#LayoutMode-enum">LayoutMode</a></span></h3>
<p>This property holds the column layout mode for this list box.</p>
<p>setColumnMode() sets the layout mode and adjusts the number of displayed columns. The row layout mode automatically becomes <tt>Variable</tt>, unless the column mode is <tt>Variable</tt>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> LayoutMode </td><td class="memItemRight bottomAlign"><span class="name"><b>columnMode</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setColumnMode</b></span> ( LayoutMode )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setColumnMode</b></span> ( int )</td></tr>
</table>
<p><b>See also </b><a href="q3listbox.html#rowMode-prop">setRowMode</a>(), <a href="q3listbox.html#rowMode-prop">rowMode</a>, and <a href="q3listbox.html#numColumns-prop">numColumns</a>.</p>
<!-- @@@columnMode -->
<!-- $$$count-prop$$$count -->
<h3 class="fn"><a name="count-prop"></a><span class="name">count</span> : const <span class="type"><a href="qtglobal.html#uint-typedef">uint</a></span></h3>
<p>This property holds the number of items in the list box.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> uint </td><td class="memItemRight bottomAlign"><span class="name"><b>count</b></span> () const</td></tr>
</table>
<!-- @@@count -->
<!-- $$$currentItem-prop$$$currentItem$$$setCurrentItemint$$$setCurrentItemQ3ListBoxItem* -->
<h3 class="fn"><a name="currentItem-prop"></a><span class="name">currentItem</span> : <span class="type">int</span></h3>
<p>This property holds the current highlighted item.</p>
<p>When setting this property, the highlighting is moved to the item and the list box scrolled as necessary.</p>
<p>If no item is current, currentItem() returns -1.</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>currentItem</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setCurrentItem</b></span> ( int <i>index</i> )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setCurrentItem</b></span> ( Q3ListBoxItem * <i>i</i> )</td></tr>
</table>
<!-- @@@currentItem -->
<!-- $$$currentText-prop$$$currentText -->
<h3 class="fn"><a name="currentText-prop"></a><span class="name">currentText</span> : const <span class="type"><a href="qstring.html">QString</a></span></h3>
<p>This property holds the text of the current item.</p>
<p>This is equivalent to text(<a href="q3listbox.html#currentItem-prop">currentItem</a>()).</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>currentText</b></span> () const</td></tr>
</table>
<!-- @@@currentText -->
<!-- $$$multiSelection-prop$$$isMultiSelection$$$setMultiSelectionbool -->
<h3 class="fn"><a name="multiSelection-prop"></a><span class="name">multiSelection</span> : <span class="type">bool</span></h3>
<p>This property holds whether or not the list box is in Multi selection mode.</p>
<p>Consider using the <a href="q3listbox.html#selectionMode-prop">Q3ListBox::selectionMode</a> property instead of this property.</p>
<p>When setting this property, Multi selection mode is used if set to true and to Single selection mode if set to false.</p>
<p>When getting this property, true is returned if the list box is in Multi selection mode or Extended selection mode, and false if it is in Single selection mode or <a href="q3listbox.html#SelectionMode-enum">NoSelection</a> mode.</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>isMultiSelection</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b>setMultiSelection</b></span> ( bool <i>multi</i> )</td></tr>
</table>
<p><b>See also </b><a href="q3listbox.html#selectionMode-prop">selectionMode</a>.</p>
<!-- @@@multiSelection -->
<!-- $$$numColumns-prop$$$numColumns -->
<h3 class="fn"><a name="numColumns-prop"></a><span class="name">numColumns</span> : const <span class="type">int</span></h3>
<p>This property holds the number of columns in the list box.</p>
<p>This is normally 1, but can be different if <a href="q3listbox.html#columnMode-prop">Q3ListBox::columnMode</a> or <a href="q3listbox.html#rowMode-prop">Q3ListBox::rowMode</a> has been set.</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>numColumns</b></span> () const</td></tr>
</table>
<p><b>See also </b><a href="q3listbox.html#columnMode-prop">columnMode</a>, <a href="q3listbox.html#rowMode-prop">rowMode</a>, and <a href="q3listbox.html#numRows-prop">numRows</a>.</p>
<!-- @@@numColumns -->
<!-- $$$numItemsVisible-prop$$$numItemsVisible -->
<h3 class="fn"><a name="numItemsVisible-prop"></a><span class="name">numItemsVisible</span> : const <span class="type">int</span></h3>
<p>This property holds the number of visible items.</p>
<p>Both partially and entirely visible items are counted.</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>numItemsVisible</b></span> () const</td></tr>
</table>
<!-- @@@numItemsVisible -->
<!-- $$$numRows-prop$$$numRows -->
<h3 class="fn"><a name="numRows-prop"></a><span class="name">numRows</span> : const <span class="type">int</span></h3>
<p>This property holds the number of rows in the list box.</p>
<p>This is equal to the number of items in the default single-column layout, but can be different.</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>numRows</b></span> () const</td></tr>
</table>
<p><b>See also </b><a href="q3listbox.html#columnMode-prop">columnMode</a>, <a href="q3listbox.html#rowMode-prop">rowMode</a>, and <a href="q3listbox.html#numColumns-prop">numColumns</a>.</p>
<!-- @@@numRows -->
<!-- $$$rowMode-prop$$$rowMode$$$setRowModeLayoutMode$$$setRowModeint -->
<h3 class="fn"><a name="rowMode-prop"></a><span class="name">rowMode</span> : <span class="type"><a href="q3listbox.html#LayoutMode-enum">LayoutMode</a></span></h3>
<p>This property holds the row layout mode for this list box.</p>
<p>This property is normally <tt>Variable</tt>.</p>
<p>setRowMode() sets the layout mode and adjusts the number of displayed rows. The column layout mode automatically becomes <tt>Variable</tt>, unless the row mode is <tt>Variable</tt>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> LayoutMode </td><td class="memItemRight bottomAlign"><span class="name"><b>rowMode</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setRowMode</b></span> ( LayoutMode )</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setRowMode</b></span> ( int )</td></tr>
</table>
<p><b>See also </b><a href="q3listbox.html#columnMode-prop">columnMode</a>.</p>
<!-- @@@rowMode -->
<!-- $$$selectionMode-prop$$$selectionMode$$$setSelectionModeSelectionMode -->
<h3 class="fn"><a name="selectionMode-prop"></a><span class="name">selectionMode</span> : <span class="type"><a href="q3listbox.html#SelectionMode-enum">SelectionMode</a></span></h3>
<p>This property holds the selection mode of the list box.</p>
<p>Sets the list box's selection mode, which may be one of <tt>Single</tt> (the default), <tt>Extended</tt>, <tt>Multi</tt> or <tt>NoSelection</tt>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> SelectionMode </td><td class="memItemRight bottomAlign"><span class="name"><b>selectionMode</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setSelectionMode</b></span> ( SelectionMode )</td></tr>
</table>
<p><b>See also </b><a href="q3listbox.html#SelectionMode-enum">SelectionMode</a>.</p>
<!-- @@@selectionMode -->
<!-- $$$topItem-prop$$$topItem$$$setTopItemint -->
<h3 class="fn"><a name="topItem-prop"></a><span class="name">topItem</span> : <span class="type">int</span></h3>
<p>This property holds the index of an item at the top of the screen.</p>
<p>When getting this property and the listbox has multiple columns, an arbitrary item is selected and returned.</p>
<p>When setting this property, the list box is scrolled so the item at position <i>index</i> in the list is displayed in the top row of the list box.</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>topItem</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setTopItem</b></span> ( int <i>index</i> )</td></tr>
</table>
<!-- @@@topItem -->
<!-- $$$variableHeight-prop$$$variableHeight$$$setVariableHeightbool -->
<h3 class="fn"><a name="variableHeight-prop"></a><span class="name">variableHeight</span> : <span class="type">bool</span></h3>
<p>This property holds whether this list box has variable-height rows.</p>
<p>When the list box has variable-height rows (the default), each row is as high as the highest item in that row. When it has same-sized rows, all rows are as high as the highest item in the list box.</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>variableHeight</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setVariableHeight</b></span> ( bool )</td></tr>
</table>
<p><b>See also </b><a href="q3listbox.html#variableWidth-prop">variableWidth</a>.</p>
<!-- @@@variableHeight -->
<!-- $$$variableWidth-prop$$$variableWidth$$$setVariableWidthbool -->
<h3 class="fn"><a name="variableWidth-prop"></a><span class="name">variableWidth</span> : <span class="type">bool</span></h3>
<p>This property holds whether this list box has variable-width columns.</p>
<p>When the list box has variable-width columns, each column is as wide as the widest item in that column. When it has same-sized columns (the default), all columns are as wide as the widest item in the list box.</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>variableWidth</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setVariableWidth</b></span> ( bool )</td></tr>
</table>
<p><b>See also </b><a href="q3listbox.html#variableHeight-prop">variableHeight</a>.</p>
<!-- @@@variableWidth -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$Q3ListBox[overload1]$$$Q3ListBoxQWidget*constchar*Qt::WindowFlags -->
<h3 class="fn"><a name="Q3ListBox"></a>Q3ListBox::<span class="name">Q3ListBox</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0, const <span class="type">char</span> * <i>name</i> = 0, <span class="type"><a href="qt.html#WindowType-enum">Qt::WindowFlags</a></span> <i>f</i> = 0 )</h3>
<p>Constructs a new empty list box called <i>name</i> and with parent <i>parent</i> and widget attributes <i>f</i>.</p>
<p>This constructor sets the Qt::WA_StaticContent and the <a href="qt.html#WidgetAttribute-enum">Qt::WA_NoBackground</a> attributes to boost performance when drawing Q3ListBoxItems. This may be unsuitable for custom <a href="q3listboxitem.html" class="compat">Q3ListBoxItem</a> classes, in which case <a href="qt.html#WidgetAttribute-enum">Qt::WA_StaticContents</a> and <a href="qt.html#WidgetAttribute-enum">Qt::WA_NoBackground</a> should be cleared on the <a href="q3scrollview.html#viewport">viewport</a>() after construction.</p>
<!-- @@@Q3ListBox -->
<!-- $$$~Q3ListBox[overload1]$$$~Q3ListBox -->
<h3 class="fn"><a name="dtor.Q3ListBox"></a>Q3ListBox::<span class="name">~Q3ListBox</span> ()</h3>
<p>Destroys the list box. Deletes all list box items.</p>
<!-- @@@~Q3ListBox -->
<!-- $$$autoBottomScrollBar[overload1]$$$autoBottomScrollBar -->
<h3 class="fn"><a name="autoBottomScrollBar"></a><span class="type">bool</span> Q3ListBox::<span class="name">autoBottomScrollBar</span> () const</h3>
<p>Use <a href="q3scrollview.html#hScrollBarMode-prop">hScrollBarMode</a>() instead. Returns true if the horizontal scrollbar mode is set to <tt>Auto</tt>.</p>
<p><b>See also </b><a href="q3listbox.html#setAutoBottomScrollBar">setAutoBottomScrollBar</a>().</p>
<!-- @@@autoBottomScrollBar -->
<!-- $$$autoScroll[overload1]$$$autoScroll -->
<h3 class="fn"><a name="autoScroll"></a><span class="type">bool</span> Q3ListBox::<span class="name">autoScroll</span> () const</h3>
<p>Use <a href="q3scrollview.html#dragAutoScroll-prop">dragAutoScroll</a>() instead. This function always returns true.</p>
<p><b>See also </b><a href="q3listbox.html#setAutoScroll">setAutoScroll</a>().</p>
<!-- @@@autoScroll -->
<!-- $$$autoScrollBar[overload1]$$$autoScrollBar -->
<h3 class="fn"><a name="autoScrollBar"></a><span class="type">bool</span> Q3ListBox::<span class="name">autoScrollBar</span> () const</h3>
<p>Use <a href="q3scrollview.html#vScrollBarMode-prop">vScrollBarMode</a>() instead. Returns true if the vertical scrollbar mode is <tt>Auto</tt>.</p>
<p><b>See also </b><a href="q3listbox.html#setAutoScrollBar">setAutoScrollBar</a>().</p>
<!-- @@@autoScrollBar -->
<!-- $$$autoUpdate[overload1]$$$autoUpdate -->
<h3 class="fn"><a name="autoUpdate"></a><span class="type">bool</span> Q3ListBox::<span class="name">autoUpdate</span> () const</h3>
<p>Returns true. Qt always updates automatically.</p>
<p><b>See also </b><a href="q3listbox.html#setAutoUpdate">setAutoUpdate</a>().</p>
<!-- @@@autoUpdate -->
<!-- $$$bottomScrollBar[overload1]$$$bottomScrollBar -->
<h3 class="fn"><a name="bottomScrollBar"></a><span class="type">bool</span> Q3ListBox::<span class="name">bottomScrollBar</span> () const</h3>
<p>Use <a href="q3scrollview.html#hScrollBarMode-prop">hScrollBarMode</a>() instead. Returns true if the horizontal scrollbar mode is not <tt>AlwaysOff</tt>.</p>
<p><b>See also </b><a href="q3listbox.html#setBottomScrollBar">setBottomScrollBar</a>().</p>
<!-- @@@bottomScrollBar -->
<!-- $$$cellHeight[overload1]$$$cellHeightint -->
<h3 class="fn"><a name="cellHeight"></a><span class="type">int</span> Q3ListBox::<span class="name">cellHeight</span> ( <span class="type">int</span> <i>i</i> ) const</h3>
<p>Use itemHeight(<i>i</i>) instead.</p>
<!-- @@@cellHeight -->
<!-- $$$cellHeight$$$cellHeight -->
<h3 class="fn"><a name="cellHeight-2"></a><span class="type">int</span> Q3ListBox::<span class="name">cellHeight</span> () const</h3>
<p>Use <a href="q3listbox.html#itemHeight">itemHeight</a>() instead.</p>
<!-- @@@cellHeight -->
<!-- $$$cellWidth[overload1]$$$cellWidth -->
<h3 class="fn"><a name="cellWidth"></a><span class="type">int</span> Q3ListBox::<span class="name">cellWidth</span> () const</h3>
<p>Use <a href="q3listbox.html#maxItemWidth">maxItemWidth</a>() instead.</p>
<!-- @@@cellWidth -->
<!-- $$$cellWidth$$$cellWidthint -->
<h3 class="fn"><a name="cellWidth-2"></a><span class="type">int</span> Q3ListBox::<span class="name">cellWidth</span> ( <span class="type">int</span> <i>i</i> ) const</h3>
<p>Use maxItemWidth(<i>i</i>) instead.</p>
<!-- @@@cellWidth -->
<!-- $$$centerCurrentItem[overload1]$$$centerCurrentItem -->
<h3 class="fn"><a name="centerCurrentItem"></a><span class="type">void</span> Q3ListBox::<span class="name">centerCurrentItem</span> ()</h3>
<p>If there is a current item, the list box is scrolled so that this item is displayed centered.</p>
<p><b>See also </b><a href="q3listbox.html#ensureCurrentVisible">Q3ListBox::ensureCurrentVisible</a>().</p>
<!-- @@@centerCurrentItem -->
<!-- $$$changeEvent[overload1]$$$changeEventQEvent* -->
<h3 class="fn"><a name="changeEvent"></a><span class="type">void</span> Q3ListBox::<span class="name">changeEvent</span> ( <span class="type"><a href="qevent.html">QEvent</a></span> * <i>ev</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#changeEvent">QWidget::changeEvent</a>().</p>
<!-- @@@changeEvent -->
<!-- $$$changeItem[overload1]$$$changeItemconstQ3ListBoxItem*int -->
<h3 class="fn"><a name="changeItem"></a><span class="type">void</span> Q3ListBox::<span class="name">changeItem</span> ( const <span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * <i>lbi</i>, <span class="type">int</span> <i>index</i> )</h3>
<p>Replaces the item at position <i>index</i> with <i>lbi</i>. If <i>index</i> is negative or too large, changeItem() does nothing.</p>
<p>The item that has been changed will become selected.</p>
<p><b>See also </b><a href="q3listbox.html#insertItem">insertItem</a>() and <a href="q3listbox.html#removeItem">removeItem</a>().</p>
<!-- @@@changeItem -->
<!-- $$$changeItem$$$changeItemconstQString&int -->
<h3 class="fn"><a name="changeItem-2"></a><span class="type">void</span> Q3ListBox::<span class="name">changeItem</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i>, <span class="type">int</span> <i>index</i> )</h3>
<p>This is an overloaded function.</p>
<p>Replaces the item at position <i>index</i> with a new list box text item with text <i>text</i>.</p>
<p>The operation is ignored if <i>index</i> is out of range.</p>
<p><b>See also </b><a href="q3listbox.html#insertItem">insertItem</a>() and <a href="q3listbox.html#removeItem">removeItem</a>().</p>
<!-- @@@changeItem -->
<!-- $$$changeItem$$$changeItemconstQPixmap&int -->
<h3 class="fn"><a name="changeItem-3"></a><span class="type">void</span> Q3ListBox::<span class="name">changeItem</span> ( const <span class="type"><a href="qpixmap.html">QPixmap</a></span> &amp; <i>pixmap</i>, <span class="type">int</span> <i>index</i> )</h3>
<p>This is an overloaded function.</p>
<p>Replaces the item at position <i>index</i> with a new list box pixmap item with pixmap <i>pixmap</i>.</p>
<p>The operation is ignored if <i>index</i> is out of range.</p>
<p><b>See also </b><a href="q3listbox.html#insertItem">insertItem</a>() and <a href="q3listbox.html#removeItem">removeItem</a>().</p>
<!-- @@@changeItem -->
<!-- $$$changeItem$$$changeItemconstQPixmap&constQString&int -->
<h3 class="fn"><a name="changeItem-4"></a><span class="type">void</span> Q3ListBox::<span class="name">changeItem</span> ( const <span class="type"><a href="qpixmap.html">QPixmap</a></span> &amp; <i>pixmap</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i>, <span class="type">int</span> <i>index</i> )</h3>
<p>This is an overloaded function.</p>
<p>Replaces the item at position <i>index</i> with a new list box pixmap item with pixmap <i>pixmap</i> and text <i>text</i>.</p>
<p>The operation is ignored if <i>index</i> is out of range.</p>
<p><b>See also </b><a href="q3listbox.html#insertItem">insertItem</a>() and <a href="q3listbox.html#removeItem">removeItem</a>().</p>
<!-- @@@changeItem -->
<!-- $$$clear[overload1]$$$clear -->
<h3 class="fn"><a name="clear"></a><span class="type">void</span> Q3ListBox::<span class="name">clear</span> ()<tt> [slot]</tt></h3>
<p>Deletes all the items in the list.</p>
<p><b>See also </b><a href="q3listbox.html#removeItem">removeItem</a>().</p>
<!-- @@@clear -->
<!-- $$$clearSelection[overload1]$$$clearSelection -->
<h3 class="fn"><a name="clearSelection"></a><span class="type">void</span> Q3ListBox::<span class="name">clearSelection</span> ()<tt> [virtual slot]</tt></h3>
<p>Deselects all items, if possible.</p>
<p>Note that a <tt>Single</tt> selection list box will automatically select an item if it has keyboard focus.</p>
<!-- @@@clearSelection -->
<!-- $$$clicked[overload1]$$$clickedQ3ListBoxItem* -->
<h3 class="fn"><a name="clicked"></a><span class="type">void</span> Q3ListBox::<span class="name">clicked</span> ( <span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * <i>item</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the user clicks any mouse button. If <i>item</i> is not 0, the cursor is on <i>item</i>. If <i>item</i> is 0, the mouse cursor isn't on any item.</p>
<p>Note that you must not delete any <a href="q3listboxitem.html" class="compat">Q3ListBoxItem</a> objects in slots connected to this signal.</p>
<!-- @@@clicked -->
<!-- $$$clicked$$$clickedQ3ListBoxItem*constQPoint& -->
<h3 class="fn"><a name="clicked-2"></a><span class="type">void</span> Q3ListBox::<span class="name">clicked</span> ( <span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * <i>item</i>, const <span class="type"><a href="qpoint.html">QPoint</a></span> &amp; <i>pnt</i> )<tt> [signal]</tt></h3>
<p>This is an overloaded function.</p>
<p>This signal is emitted when the user clicks any mouse button. If <i>item</i> is not 0, the cursor is on <i>item</i>. If <i>item</i> is 0, the mouse cursor isn't on any item.</p>
<p><i>pnt</i> is the position of the mouse cursor in the global coordinate system (<a href="qmouseevent.html#globalPos">QMouseEvent::globalPos</a>()). (If the click's press and release differs by a pixel or two, <i>pnt</i> is the position at release time.)</p>
<p>Note that you must not delete any <a href="q3listboxitem.html" class="compat">Q3ListBoxItem</a> objects in slots connected to this signal.</p>
<!-- @@@clicked -->
<!-- $$$contentsContextMenuEvent[overload1]$$$contentsContextMenuEventQContextMenuEvent* -->
<h3 class="fn"><a name="contentsContextMenuEvent"></a><span class="type">void</span> Q3ListBox::<span class="name">contentsContextMenuEvent</span> ( <span class="type"><a href="qcontextmenuevent.html">QContextMenuEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="q3scrollview.html#contentsContextMenuEvent">Q3ScrollView::contentsContextMenuEvent</a>().</p>
<!-- @@@contentsContextMenuEvent -->
<!-- $$$contextMenuRequested[overload1]$$$contextMenuRequestedQ3ListBoxItem*constQPoint& -->
<h3 class="fn"><a name="contextMenuRequested"></a><span class="type">void</span> Q3ListBox::<span class="name">contextMenuRequested</span> ( <span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * <i>item</i>, const <span class="type"><a href="qpoint.html">QPoint</a></span> &amp; <i>pos</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the user invokes a context menu with the right mouse button or with special system keys, with <i>item</i> being the item under the mouse cursor or the current item, respectively.</p>
<p><i>pos</i> is the position for the context menu in the global coordinate system.</p>
<!-- @@@contextMenuRequested -->
<!-- $$$currentChanged[overload1]$$$currentChangedQ3ListBoxItem* -->
<h3 class="fn"><a name="currentChanged"></a><span class="type">void</span> Q3ListBox::<span class="name">currentChanged</span> ( <span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * <i>item</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the user makes a new item the current item. <i>item</i> is the new current list box item.</p>
<p><b>See also </b><a href="q3listbox.html#currentItem-prop">setCurrentItem</a>() and <a href="q3listbox.html#currentItem-prop">currentItem</a>().</p>
<!-- @@@currentChanged -->
<!-- $$$doLayout[overload1]$$$doLayout -->
<h3 class="fn"><a name="doLayout"></a><span class="type">void</span> Q3ListBox::<span class="name">doLayout</span> () const<tt> [protected]</tt></h3>
<p>This function does the hard layout work. You should never need to call it.</p>
<!-- @@@doLayout -->
<!-- $$$doubleClicked[overload1]$$$doubleClickedQ3ListBoxItem* -->
<h3 class="fn"><a name="doubleClicked"></a><span class="type">void</span> Q3ListBox::<span class="name">doubleClicked</span> ( <span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * <i>item</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever an item is double-clicked. It's emitted on the second button press, not the second button release. If <i>item</i> is not 0, the cursor is on <i>item</i>. If <i>item</i> is 0, the mouse cursor isn't on any item.</p>
<!-- @@@doubleClicked -->
<!-- $$$dragSelect[overload1]$$$dragSelect -->
<h3 class="fn"><a name="dragSelect"></a><span class="type">bool</span> Q3ListBox::<span class="name">dragSelect</span> () const</h3>
<p>Returns true. Dragging always selects.</p>
<p><b>See also </b><a href="q3listbox.html#setDragSelect">setDragSelect</a>().</p>
<!-- @@@dragSelect -->
<!-- $$$ensureCurrentVisible[overload1]$$$ensureCurrentVisible -->
<h3 class="fn"><a name="ensureCurrentVisible"></a><span class="type">void</span> Q3ListBox::<span class="name">ensureCurrentVisible</span> ()<tt> [virtual slot]</tt></h3>
<p>Ensures that the current item is visible.</p>
<!-- @@@ensureCurrentVisible -->
<!-- $$$eventFilter[overload1]$$$eventFilterQObject*QEvent* -->
<h3 class="fn"><a name="eventFilter"></a><span class="type">bool</span> Q3ListBox::<span class="name">eventFilter</span> ( <span class="type"><a href="qobject.html">QObject</a></span> * <i>o</i>, <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#eventFilter">QObject::eventFilter</a>().</p>
<!-- @@@eventFilter -->
<!-- $$$findItem[overload1]$$$findItemconstQString&ComparisonFlags -->
<h3 class="fn"><a name="findItem"></a><span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * Q3ListBox::<span class="name">findItem</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i>, <span class="type"><a href="q3listbox.html#ComparisonFlags-typedef">ComparisonFlags</a></span> <i>compare</i> = BeginsWith ) const</h3>
<p>Finds the first list box item that has the text <i>text</i> and returns it, or returns 0 of no such item could be found. If <tt>ComparisonFlags</tt> are specified in <i>compare</i> then these flags are used, otherwise the default is a case-insensitive, &quot;begins with&quot; search.</p>
<!-- @@@findItem -->
<!-- $$$findItem$$$findItemint -->
<h3 class="fn"><a name="findItem-2"></a><span class="type">int</span> Q3ListBox::<span class="name">findItem</span> ( <span class="type">int</span> <i>yPos</i> ) const<tt> [protected]</tt></h3>
<p>Use index(itemAt(<i>yPos</i>)) instead.</p>
<!-- @@@findItem -->
<!-- $$$firstItem[overload1]$$$firstItem -->
<h3 class="fn"><a name="firstItem"></a><span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * Q3ListBox::<span class="name">firstItem</span> () const</h3>
<p>Returns the first item in this list box. If the list box is empty, returns 0.</p>
<!-- @@@firstItem -->
<!-- $$$focusInEvent[overload1]$$$focusInEventQFocusEvent* -->
<h3 class="fn"><a name="focusInEvent"></a><span class="type">void</span> Q3ListBox::<span class="name">focusInEvent</span> ( <span class="type"><a href="qfocusevent.html">QFocusEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#focusInEvent">QWidget::focusInEvent</a>().</p>
<!-- @@@focusInEvent -->
<!-- $$$focusOutEvent[overload1]$$$focusOutEventQFocusEvent* -->
<h3 class="fn"><a name="focusOutEvent"></a><span class="type">void</span> Q3ListBox::<span class="name">focusOutEvent</span> ( <span class="type"><a href="qfocusevent.html">QFocusEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#focusOutEvent">QWidget::focusOutEvent</a>().</p>
<!-- @@@focusOutEvent -->
<!-- $$$highlighted[overload1]$$$highlightedint -->
<h3 class="fn"><a name="highlighted"></a><span class="type">void</span> Q3ListBox::<span class="name">highlighted</span> ( <span class="type">int</span> <i>index</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the user makes a new item the current item. <i>index</i> is the index of the new current item.</p>
<p><b>See also </b><a href="q3listbox.html#currentChanged">currentChanged</a>(), <a href="q3listbox.html#selected">selected</a>(), <a href="q3listbox.html#currentItem-prop">currentItem</a>(), and <a href="q3listbox.html#selectionChanged">selectionChanged</a>().</p>
<!-- @@@highlighted -->
<!-- $$$highlighted$$$highlightedQ3ListBoxItem* -->
<h3 class="fn"><a name="highlighted-2"></a><span class="type">void</span> Q3ListBox::<span class="name">highlighted</span> ( <span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * <i>item</i> )<tt> [signal]</tt></h3>
<p>This is an overloaded function.</p>
<p>This signal is emitted when the user makes a new <i>item</i> the current <i>item</i>.</p>
<p><b>See also </b><a href="q3listbox.html#currentChanged">currentChanged</a>(), <a href="q3listbox.html#selected">selected</a>(), <a href="q3listbox.html#currentItem-prop">currentItem</a>(), and <a href="q3listbox.html#selectionChanged">selectionChanged</a>().</p>
<!-- @@@highlighted -->
<!-- $$$highlighted$$$highlightedconstQString& -->
<h3 class="fn"><a name="highlighted-3"></a><span class="type">void</span> Q3ListBox::<span class="name">highlighted</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i> )<tt> [signal]</tt></h3>
<p>This is an overloaded function.</p>
<p>This signal is emitted when the user makes a new item the current item and the item is (or has) as string. The argument is the new current item's <i>text</i>.</p>
<p><b>See also </b><a href="q3listbox.html#currentChanged">currentChanged</a>(), <a href="q3listbox.html#selected">selected</a>(), <a href="q3listbox.html#currentItem-prop">currentItem</a>(), and <a href="q3listbox.html#selectionChanged">selectionChanged</a>().</p>
<!-- @@@highlighted -->
<!-- $$$inSort[overload1]$$$inSortconstQ3ListBoxItem* -->
<h3 class="fn"><a name="inSort"></a><span class="type">int</span> Q3ListBox::<span class="name">inSort</span> ( const <span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * <i>lbi</i> )</h3>
<p>Using this method is quite inefficient. We suggest to use <a href="q3listbox.html#insertItem">insertItem</a>() for inserting and <a href="q3listbox.html#sort">sort</a>() afterwards.</p>
<p>Inserts <i>lbi</i> at its sorted position in the list box and returns the position.</p>
<p>All items must be inserted with inSort() to maintain the sorting order. inSort() treats any pixmap (or user-defined type) as lexicographically less than any string.</p>
<p><b>See also </b><a href="q3listbox.html#insertItem">insertItem</a>() and <a href="q3listbox.html#sort">sort</a>().</p>
<!-- @@@inSort -->
<!-- $$$inSort$$$inSortconstQString& -->
<h3 class="fn"><a name="inSort-2"></a><span class="type">int</span> Q3ListBox::<span class="name">inSort</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i> )</h3>
<p>This is an overloaded function.</p>
<p>Using this method is quite inefficient. We suggest to use <a href="q3listbox.html#insertItem">insertItem</a>() for inserting and <a href="q3listbox.html#sort">sort</a>() afterwards.</p>
<p>Inserts a new item of <i>text</i> at its sorted position in the list box and returns the position.</p>
<p>All items must be inserted with <a href="q3listbox.html#inSort">inSort</a>() to maintain the sorting order. <a href="q3listbox.html#inSort">inSort</a>() treats any pixmap (or user-defined type) as lexicographically less than any string.</p>
<p><b>See also </b><a href="q3listbox.html#insertItem">insertItem</a>() and <a href="q3listbox.html#sort">sort</a>().</p>
<!-- @@@inSort -->
<!-- $$$index[overload1]$$$indexconstQ3ListBoxItem* -->
<h3 class="fn"><a name="index"></a><span class="type">int</span> Q3ListBox::<span class="name">index</span> ( const <span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * <i>lbi</i> ) const</h3>
<p>Returns the index of <i>lbi</i>, or -1 if the item is not in this list box or <i>lbi</i> is 0.</p>
<p><b>See also </b><a href="q3listbox.html#item">item</a>().</p>
<!-- @@@index -->
<!-- $$$inputMethodQuery[overload1]$$$inputMethodQueryQt::InputMethodQuery -->
<h3 class="fn"><a name="inputMethodQuery"></a><span class="type"><a href="qvariant.html">QVariant</a></span> Q3ListBox::<span class="name">inputMethodQuery</span> ( <span class="type"><a href="qt.html#InputMethodQuery-enum">Qt::InputMethodQuery</a></span> <i>query</i> ) const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#inputMethodQuery">QWidget::inputMethodQuery</a>().</p>
<!-- @@@inputMethodQuery -->
<!-- $$$insertItem[overload1]$$$insertItemconstQ3ListBoxItem*int -->
<h3 class="fn"><a name="insertItem"></a><span class="type">void</span> Q3ListBox::<span class="name">insertItem</span> ( const <span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * <i>lbi</i>, <span class="type">int</span> <i>index</i> = -1 )</h3>
<p>Inserts the item <i>lbi</i> into the list at position <i>index</i>.</p>
<p>If <i>index</i> is negative or larger than the number of items in the list box, <i>lbi</i> is inserted at the end of the list.</p>
<p><b>See also </b><a href="q3listbox.html#insertStrList">insertStrList</a>().</p>
<!-- @@@insertItem -->
<!-- $$$insertItem$$$insertItemconstQ3ListBoxItem*constQ3ListBoxItem* -->
<h3 class="fn"><a name="insertItem-2"></a><span class="type">void</span> Q3ListBox::<span class="name">insertItem</span> ( const <span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * <i>lbi</i>, const <span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * <i>after</i> )</h3>
<p>This is an overloaded function.</p>
<p>Inserts the item <i>lbi</i> into the list after the item <i>after</i>, or at the beginning if <i>after</i> is 0.</p>
<p><b>See also </b><a href="q3listbox.html#insertStrList">insertStrList</a>().</p>
<!-- @@@insertItem -->
<!-- $$$insertItem$$$insertItemconstQString&int -->
<h3 class="fn"><a name="insertItem-3"></a><span class="type">void</span> Q3ListBox::<span class="name">insertItem</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i>, <span class="type">int</span> <i>index</i> = -1 )</h3>
<p>This is an overloaded function.</p>
<p>Inserts a new list box text item with the text <i>text</i> into the list at position <i>index</i>.</p>
<p>If <i>index</i> is negative, <i>text</i> is inserted at the end of the list.</p>
<p><b>See also </b><a href="q3listbox.html#insertStrList">insertStrList</a>().</p>
<!-- @@@insertItem -->
<!-- $$$insertItem$$$insertItemconstQPixmap&int -->
<h3 class="fn"><a name="insertItem-4"></a><span class="type">void</span> Q3ListBox::<span class="name">insertItem</span> ( const <span class="type"><a href="qpixmap.html">QPixmap</a></span> &amp; <i>pixmap</i>, <span class="type">int</span> <i>index</i> = -1 )</h3>
<p>This is an overloaded function.</p>
<p>Inserts a new list box pixmap item with the pixmap <i>pixmap</i> into the list at position <i>index</i>.</p>
<p>If <i>index</i> is negative, <i>pixmap</i> is inserted at the end of the list.</p>
<p><b>See also </b><a href="q3listbox.html#insertStrList">insertStrList</a>().</p>
<!-- @@@insertItem -->
<!-- $$$insertItem$$$insertItemconstQPixmap&constQString&int -->
<h3 class="fn"><a name="insertItem-5"></a><span class="type">void</span> Q3ListBox::<span class="name">insertItem</span> ( const <span class="type"><a href="qpixmap.html">QPixmap</a></span> &amp; <i>pixmap</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i>, <span class="type">int</span> <i>index</i> = -1 )</h3>
<p>This is an overloaded function.</p>
<p>Inserts a new list box pixmap item with the pixmap <i>pixmap</i> and the text <i>text</i> into the list at position <i>index</i>.</p>
<p>If <i>index</i> is negative, <i>pixmap</i> is inserted at the end of the list.</p>
<p><b>See also </b><a href="q3listbox.html#insertStrList">insertStrList</a>().</p>
<!-- @@@insertItem -->
<!-- $$$insertStrList[overload1]$$$insertStrListconstchar**intint -->
<h3 class="fn"><a name="insertStrList"></a><span class="type">void</span> Q3ListBox::<span class="name">insertStrList</span> ( const <span class="type">char</span> ** <i>strings</i>, <span class="type">int</span> <i>numStrings</i> = -1, <span class="type">int</span> <i>index</i> = -1 )</h3>
<p>Inserts the <i>numStrings</i> strings of the array <i>strings</i> into the list at position <i>index</i>.</p>
<p>If <i>index</i> is negative, insertStrList() inserts <i>strings</i> at the end of the list. If <i>index</i> is too large, the operation is ignored.</p>
<p><b>Warning:</b> This function uses <tt>const char *</tt> rather than <a href="qstring.html">QString</a>, so we recommend against using it. It is provided so that legacy code will continue to work, and so that programs that certainly will not need to handle code outside a single 8-bit locale can use it. See <a href="q3listbox.html#insertStringList">insertStringList</a>() which uses real QStrings.</p>
<p><b>Warning:</b> This function is never significantly faster than a loop around <a href="q3listbox.html#insertItem">insertItem</a>().</p>
<p><b>See also </b><a href="q3listbox.html#insertItem">insertItem</a>() and <a href="q3listbox.html#insertStringList">insertStringList</a>().</p>
<!-- @@@insertStrList -->
<!-- $$$insertStringList[overload1]$$$insertStringListconstQStringList&int -->
<h3 class="fn"><a name="insertStringList"></a><span class="type">void</span> Q3ListBox::<span class="name">insertStringList</span> ( const <span class="type"><a href="qstringlist.html">QStringList</a></span> &amp; <i>list</i>, <span class="type">int</span> <i>index</i> = -1 )</h3>
<p>Inserts the string list <i>list</i> into the list at position <i>index</i>.</p>
<p>If <i>index</i> is negative, <i>list</i> is inserted at the end of the list. If <i>index</i> is too large, the operation is ignored.</p>
<p><b>Warning:</b> This function is never significantly faster than a loop around <a href="q3listbox.html#insertItem">insertItem</a>().</p>
<p><b>See also </b><a href="q3listbox.html#insertItem">insertItem</a>() and <a href="q3listbox.html#insertStrList">insertStrList</a>().</p>
<!-- @@@insertStringList -->
<!-- $$$invertSelection[overload1]$$$invertSelection -->
<h3 class="fn"><a name="invertSelection"></a><span class="type">void</span> Q3ListBox::<span class="name">invertSelection</span> ()<tt> [virtual slot]</tt></h3>
<p>Inverts the selection. Only works in <tt>Multi</tt> and <tt>Extended</tt> selection mode.</p>
<!-- @@@invertSelection -->
<!-- $$$isRubberSelecting[overload1]$$$isRubberSelecting -->
<h3 class="fn"><a name="isRubberSelecting"></a><span class="type">bool</span> Q3ListBox::<span class="name">isRubberSelecting</span> () const<tt> [protected]</tt></h3>
<p>Returns true if the user is selecting items using a rubber band rectangle; otherwise returns false.</p>
<!-- @@@isRubberSelecting -->
<!-- $$$isSelected[overload1]$$$isSelectedint -->
<h3 class="fn"><a name="isSelected"></a><span class="type">bool</span> Q3ListBox::<span class="name">isSelected</span> ( <span class="type">int</span> <i>i</i> ) const</h3>
<p>Returns true if item <i>i</i> is selected; otherwise returns false.</p>
<!-- @@@isSelected -->
<!-- $$$isSelected$$$isSelectedconstQ3ListBoxItem* -->
<h3 class="fn"><a name="isSelected-2"></a><span class="type">bool</span> Q3ListBox::<span class="name">isSelected</span> ( const <span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * <i>i</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>Returns true if item <i>i</i> is selected; otherwise returns false.</p>
<!-- @@@isSelected -->
<!-- $$$item[overload1]$$$itemint -->
<h3 class="fn"><a name="item"></a><span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * Q3ListBox::<span class="name">item</span> ( <span class="type">int</span> <i>index</i> ) const</h3>
<p>Returns a pointer to the item at position <i>index</i>, or 0 if <i>index</i> is out of bounds.</p>
<p><b>See also </b><a href="q3listbox.html#index">index</a>().</p>
<!-- @@@item -->
<!-- $$$itemAt[overload1]$$$itemAtconstQPoint& -->
<h3 class="fn"><a name="itemAt"></a><span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * Q3ListBox::<span class="name">itemAt</span> ( const <span class="type"><a href="qpoint.html">QPoint</a></span> &amp; <i>p</i> ) const</h3>
<p>Returns the item at point <i>p</i>, specified in viewport coordinates, or a 0 if there is no item at <i>p</i>.</p>
<p>Use <a href="q3scrollview.html#contentsToViewport">contentsToViewport</a>() to convert between widget coordinates and viewport coordinates.</p>
<!-- @@@itemAt -->
<!-- $$$itemHeight[overload1]$$$itemHeightint -->
<h3 class="fn"><a name="itemHeight"></a><span class="type">int</span> Q3ListBox::<span class="name">itemHeight</span> ( <span class="type">int</span> <i>index</i> = 0 ) const</h3>
<p>Returns the height in pixels of the item with index <i>index</i>. <i>index</i> defaults to 0.</p>
<p>If <i>index</i> is too large, this function returns 0.</p>
<!-- @@@itemHeight -->
<!-- $$$itemRect[overload1]$$$itemRectQ3ListBoxItem* -->
<h3 class="fn"><a name="itemRect"></a><span class="type"><a href="qrect.html">QRect</a></span> Q3ListBox::<span class="name">itemRect</span> ( <span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * <i>item</i> ) const</h3>
<p>Returns the rectangle on the screen that <i>item</i> occupies in <a href="q3scrollview.html#viewport">viewport</a>()'s coordinates, or an invalid rectangle if <i>item</i> is 0 or is not currently visible.</p>
<!-- @@@itemRect -->
<!-- $$$itemVisible[overload1]$$$itemVisibleint -->
<h3 class="fn"><a name="itemVisible"></a><span class="type">bool</span> Q3ListBox::<span class="name">itemVisible</span> ( <span class="type">int</span> <i>index</i> )</h3>
<p>Returns true if the item at position <i>index</i> is at least partly visible; otherwise returns false.</p>
<!-- @@@itemVisible -->
<!-- $$$itemVisible$$$itemVisibleconstQ3ListBoxItem* -->
<h3 class="fn"><a name="itemVisible-2"></a><span class="type">bool</span> Q3ListBox::<span class="name">itemVisible</span> ( const <span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * <i>item</i> )</h3>
<p>This is an overloaded function.</p>
<p>Returns true if <i>item</i> is at least partly visible; otherwise returns false.</p>
<!-- @@@itemVisible -->
<!-- $$$keyPressEvent[overload1]$$$keyPressEventQKeyEvent* -->
<h3 class="fn"><a name="keyPressEvent"></a><span class="type">void</span> Q3ListBox::<span class="name">keyPressEvent</span> ( <span class="type"><a href="qkeyevent.html">QKeyEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#keyPressEvent">QWidget::keyPressEvent</a>().</p>
<!-- @@@keyPressEvent -->
<!-- $$$maxItemWidth[overload1]$$$maxItemWidth -->
<h3 class="fn"><a name="maxItemWidth"></a><span class="type">long</span> Q3ListBox::<span class="name">maxItemWidth</span> () const</h3>
<p>Returns the width of the widest item in the list box.</p>
<!-- @@@maxItemWidth -->
<!-- $$$minimumSizeHint[overload1]$$$minimumSizeHint -->
<h3 class="fn"><a name="minimumSizeHint"></a><span class="type"><a href="qsize.html">QSize</a></span> Q3ListBox::<span class="name">minimumSizeHint</span> () const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#minimumSizeHint-prop">QWidget::minimumSizeHint</a>().</p>
<!-- @@@minimumSizeHint -->
<!-- $$$mouseButtonClicked[overload1]$$$mouseButtonClickedintQ3ListBoxItem*constQPoint& -->
<h3 class="fn"><a name="mouseButtonClicked"></a><span class="type">void</span> Q3ListBox::<span class="name">mouseButtonClicked</span> ( <span class="type">int</span> <i>button</i>, <span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * <i>item</i>, const <span class="type"><a href="qpoint.html">QPoint</a></span> &amp; <i>pos</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the user clicks mouse button <i>button</i>. If <i>item</i> is not 0, the cursor is on <i>item</i>. If <i>item</i> is 0, the mouse cursor isn't on any item.</p>
<p><i>pos</i> is the position of the mouse cursor in the global coordinate system (<a href="qmouseevent.html#globalPos">QMouseEvent::globalPos</a>()). (If the click's press and release differs by a pixel or two, <i>pos</i> is the position at release time.)</p>
<p>Note that you must not delete any <a href="q3listboxitem.html" class="compat">Q3ListBoxItem</a> objects in slots connected to this signal.</p>
<!-- @@@mouseButtonClicked -->
<!-- $$$mouseButtonPressed[overload1]$$$mouseButtonPressedintQ3ListBoxItem*constQPoint& -->
<h3 class="fn"><a name="mouseButtonPressed"></a><span class="type">void</span> Q3ListBox::<span class="name">mouseButtonPressed</span> ( <span class="type">int</span> <i>button</i>, <span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * <i>item</i>, const <span class="type"><a href="qpoint.html">QPoint</a></span> &amp; <i>pos</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the user presses mouse button <i>button</i>. If <i>item</i> is not 0, the cursor is on <i>item</i>. If <i>item</i> is 0, the mouse cursor isn't on any item.</p>
<p><i>pos</i> is the position of the mouse cursor in the global coordinate system (<a href="qmouseevent.html#globalPos">QMouseEvent::globalPos</a>()).</p>
<p>Note that you must not delete any <a href="q3listboxitem.html" class="compat">Q3ListBoxItem</a> objects in slots connected to this signal.</p>
<!-- @@@mouseButtonPressed -->
<!-- $$$mouseDoubleClickEvent[overload1]$$$mouseDoubleClickEventQMouseEvent* -->
<h3 class="fn"><a name="mouseDoubleClickEvent"></a><span class="type">void</span> Q3ListBox::<span class="name">mouseDoubleClickEvent</span> ( <span class="type"><a href="qmouseevent.html">QMouseEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#mouseDoubleClickEvent">QWidget::mouseDoubleClickEvent</a>().</p>
<!-- @@@mouseDoubleClickEvent -->
<!-- $$$mouseMoveEvent[overload1]$$$mouseMoveEventQMouseEvent* -->
<h3 class="fn"><a name="mouseMoveEvent"></a><span class="type">void</span> Q3ListBox::<span class="name">mouseMoveEvent</span> ( <span class="type"><a href="qmouseevent.html">QMouseEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#mouseMoveEvent">QWidget::mouseMoveEvent</a>().</p>
<!-- @@@mouseMoveEvent -->
<!-- $$$mousePressEvent[overload1]$$$mousePressEventQMouseEvent* -->
<h3 class="fn"><a name="mousePressEvent"></a><span class="type">void</span> Q3ListBox::<span class="name">mousePressEvent</span> ( <span class="type"><a href="qmouseevent.html">QMouseEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#mousePressEvent">QWidget::mousePressEvent</a>().</p>
<!-- @@@mousePressEvent -->
<!-- $$$mouseReleaseEvent[overload1]$$$mouseReleaseEventQMouseEvent* -->
<h3 class="fn"><a name="mouseReleaseEvent"></a><span class="type">void</span> Q3ListBox::<span class="name">mouseReleaseEvent</span> ( <span class="type"><a href="qmouseevent.html">QMouseEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#mouseReleaseEvent">QWidget::mouseReleaseEvent</a>().</p>
<!-- @@@mouseReleaseEvent -->
<!-- $$$numCols[overload1]$$$numCols -->
<h3 class="fn"><a name="numCols"></a><span class="type">int</span> Q3ListBox::<span class="name">numCols</span> () const</h3>
<p>Use <a href="q3listbox.html#numColumns-prop">numColumns</a>() instead.</p>
<!-- @@@numCols -->
<!-- $$$onItem[overload1]$$$onItemQ3ListBoxItem* -->
<h3 class="fn"><a name="onItem"></a><span class="type">void</span> Q3ListBox::<span class="name">onItem</span> ( <span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * <i>i</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the user moves the mouse cursor onto an item, similar to the <a href="qwidget.html#enterEvent">QWidget::enterEvent</a>() function. <i>i</i> is the <a href="q3listboxitem.html" class="compat">Q3ListBoxItem</a> that the mouse has moved on.</p>
<!-- @@@onItem -->
<!-- $$$onViewport[overload1]$$$onViewport -->
<h3 class="fn"><a name="onViewport"></a><span class="type">void</span> Q3ListBox::<span class="name">onViewport</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted when the user moves the mouse cursor from an item to an empty part of the list box.</p>
<!-- @@@onViewport -->
<!-- $$$paintCell[overload1]$$$paintCellQPainter*intint -->
<h3 class="fn"><a name="paintCell"></a><span class="type">void</span> Q3ListBox::<span class="name">paintCell</span> ( <span class="type"><a href="qpainter.html">QPainter</a></span> * <i>p</i>, <span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>col</i> )<tt> [virtual protected]</tt></h3>
<p>Provided for compatibility with the old <a href="q3listbox.html" class="compat">Q3ListBox</a>. We recommend using <a href="q3listboxitem.html#paint">Q3ListBoxItem::paint</a>() instead.</p>
<p>Repaints the cell at <i>row</i>, <i>col</i> using painter <i>p</i>.</p>
<!-- @@@paintCell -->
<!-- $$$pixmap[overload1]$$$pixmapint -->
<h3 class="fn"><a name="pixmap"></a>const <span class="type"><a href="qpixmap.html">QPixmap</a></span> * Q3ListBox::<span class="name">pixmap</span> ( <span class="type">int</span> <i>index</i> ) const</h3>
<p>Returns a pointer to the pixmap at position <i>index</i>, or 0 if there is no pixmap there.</p>
<p><b>See also </b><a href="q3listbox.html#text">text</a>().</p>
<!-- @@@pixmap -->
<!-- $$$pressed[overload1]$$$pressedQ3ListBoxItem* -->
<h3 class="fn"><a name="pressed"></a><span class="type">void</span> Q3ListBox::<span class="name">pressed</span> ( <span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * <i>item</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the user presses any mouse button. If <i>item</i> is not 0, the cursor is on <i>item</i>. If <i>item</i> is 0, the mouse cursor isn't on any item.</p>
<p>Note that you must not delete any <a href="q3listboxitem.html" class="compat">Q3ListBoxItem</a> objects in slots connected to this signal.</p>
<!-- @@@pressed -->
<!-- $$$pressed$$$pressedQ3ListBoxItem*constQPoint& -->
<h3 class="fn"><a name="pressed-2"></a><span class="type">void</span> Q3ListBox::<span class="name">pressed</span> ( <span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * <i>item</i>, const <span class="type"><a href="qpoint.html">QPoint</a></span> &amp; <i>pnt</i> )<tt> [signal]</tt></h3>
<p>This is an overloaded function.</p>
<p>This signal is emitted when the user presses any mouse button. If <i>item</i> is not 0, the cursor is on <i>item</i>. If <i>item</i> is 0, the mouse cursor isn't on any item.</p>
<p><i>pnt</i> is the position of the mouse cursor in the global coordinate system (<a href="qmouseevent.html#globalPos">QMouseEvent::globalPos</a>()).</p>
<p>Note that you must not delete any <a href="q3listboxitem.html" class="compat">Q3ListBoxItem</a> objects in slots connected to this signal.</p>
<p><b>See also </b><a href="q3listbox.html#mouseButtonPressed">mouseButtonPressed</a>(), <a href="q3listbox.html#rightButtonPressed">rightButtonPressed</a>(), and <a href="q3listbox.html#clicked">clicked</a>().</p>
<!-- @@@pressed -->
<!-- $$$removeItem[overload1]$$$removeItemint -->
<h3 class="fn"><a name="removeItem"></a><span class="type">void</span> Q3ListBox::<span class="name">removeItem</span> ( <span class="type">int</span> <i>index</i> )</h3>
<p>Removes and deletes the item at position <i>index</i>. If <i>index</i> is equal to <a href="q3listbox.html#currentItem-prop">currentItem</a>(), a new item becomes current and the <a href="q3listbox.html#currentChanged">currentChanged</a>() and <a href="q3listbox.html#highlighted">highlighted</a>() signals are emitted.</p>
<p><b>See also </b><a href="q3listbox.html#insertItem">insertItem</a>() and <a href="q3listbox.html#clear">clear</a>().</p>
<!-- @@@removeItem -->
<!-- $$$resizeEvent[overload1]$$$resizeEventQResizeEvent* -->
<h3 class="fn"><a name="resizeEvent"></a><span class="type">void</span> Q3ListBox::<span class="name">resizeEvent</span> ( <span class="type"><a href="qresizeevent.html">QResizeEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#resizeEvent">QWidget::resizeEvent</a>().</p>
<!-- @@@resizeEvent -->
<!-- $$$returnPressed[overload1]$$$returnPressedQ3ListBoxItem* -->
<h3 class="fn"><a name="returnPressed"></a><span class="type">void</span> Q3ListBox::<span class="name">returnPressed</span> ( <span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * <i>item</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when Enter or Return is pressed. The <i>item</i> passed in the argument is <a href="q3listbox.html#currentItem-prop">currentItem</a>().</p>
<!-- @@@returnPressed -->
<!-- $$$rightButtonClicked[overload1]$$$rightButtonClickedQ3ListBoxItem*constQPoint& -->
<h3 class="fn"><a name="rightButtonClicked"></a><span class="type">void</span> Q3ListBox::<span class="name">rightButtonClicked</span> ( <span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * <i>item</i>, const <span class="type"><a href="qpoint.html">QPoint</a></span> &amp; <i>point</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the right button is clicked. The <i>item</i> is the item that the button was clicked on (which could be 0 if no item was clicked on), and the <i>point</i> is where the click took place in global coordinates.</p>
<!-- @@@rightButtonClicked -->
<!-- $$$rightButtonPressed[overload1]$$$rightButtonPressedQ3ListBoxItem*constQPoint& -->
<h3 class="fn"><a name="rightButtonPressed"></a><span class="type">void</span> Q3ListBox::<span class="name">rightButtonPressed</span> ( <span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * <i>item</i>, const <span class="type"><a href="qpoint.html">QPoint</a></span> &amp; <i>point</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the right button is pressed. The <i>item</i> is the item that the button was pressed over (which could be 0 if no item was pressed over), and the <i>point</i> is where the press took place in global coordinates.</p>
<!-- @@@rightButtonPressed -->
<!-- $$$scrollBar[overload1]$$$scrollBar -->
<h3 class="fn"><a name="scrollBar"></a><span class="type">bool</span> Q3ListBox::<span class="name">scrollBar</span> () const</h3>
<p>Use <a href="q3scrollview.html#vScrollBarMode-prop">vScrollBarMode</a>() instead. Returns true if the vertical scrollbar mode is not <tt>AlwaysOff</tt>.</p>
<p><b>See also </b><a href="q3listbox.html#setScrollBar">setScrollBar</a>().</p>
<!-- @@@scrollBar -->
<!-- $$$selectAll[overload1]$$$selectAllbool -->
<h3 class="fn"><a name="selectAll"></a><span class="type">void</span> Q3ListBox::<span class="name">selectAll</span> ( <span class="type">bool</span> <i>select</i> )<tt> [virtual slot]</tt></h3>
<p>In <tt>Multi</tt> and <tt>Extended</tt> modes, this function sets all items to be selected if <i>select</i> is true, and to be unselected if <i>select</i> is false.</p>
<p>In <tt>Single</tt> and <tt>NoSelection</tt> modes, this function only changes the selection status of <a href="q3listbox.html#currentItem-prop">currentItem</a>().</p>
<!-- @@@selectAll -->
<!-- $$$selected[overload1]$$$selectedint -->
<h3 class="fn"><a name="selected"></a><span class="type">void</span> Q3ListBox::<span class="name">selected</span> ( <span class="type">int</span> <i>index</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when the user double-clicks on an item or presses Enter on the current item. <i>index</i> is the index of the selected item.</p>
<p><b>See also </b><a href="q3listbox.html#setSelected">setSelected</a>(), <a href="q3listbox.html#currentChanged">currentChanged</a>(), <a href="q3listbox.html#highlighted">highlighted</a>(), and <a href="q3listbox.html#selectionChanged">selectionChanged</a>().</p>
<!-- @@@selected -->
<!-- $$$selected$$$selectedQ3ListBoxItem* -->
<h3 class="fn"><a name="selected-2"></a><span class="type">void</span> Q3ListBox::<span class="name">selected</span> ( <span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * <i>item</i> )<tt> [signal]</tt></h3>
<p>This is an overloaded function.</p>
<p>This signal is emitted when the user double-clicks on an <i>item</i> or presses Enter on the current <i>item</i>.</p>
<p><b>See also </b><a href="q3listbox.html#currentChanged">currentChanged</a>(), <a href="q3listbox.html#highlighted">highlighted</a>(), and <a href="q3listbox.html#selectionChanged">selectionChanged</a>().</p>
<!-- @@@selected -->
<!-- $$$selected$$$selectedconstQString& -->
<h3 class="fn"><a name="selected-3"></a><span class="type">void</span> Q3ListBox::<span class="name">selected</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i> )<tt> [signal]</tt></h3>
<p>This is an overloaded function.</p>
<p>This signal is emitted when the user double-clicks on an item or presses Enter on the current item, and the item is (or has) a string. The argument is the <i>text</i> of the selected item.</p>
<p><b>See also </b><a href="q3listbox.html#currentChanged">currentChanged</a>(), <a href="q3listbox.html#highlighted">highlighted</a>(), and <a href="q3listbox.html#selectionChanged">selectionChanged</a>().</p>
<!-- @@@selected -->
<!-- $$$selectedItem[overload1]$$$selectedItem -->
<h3 class="fn"><a name="selectedItem"></a><span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * Q3ListBox::<span class="name">selectedItem</span> () const</h3>
<p>Returns the selected item if the list box is in single-selection mode and an item is selected.</p>
<p>If no items are selected or the list box is in another selection mode this function returns 0.</p>
<p><b>See also </b><a href="q3listbox.html#setSelected">setSelected</a>() and <a href="q3listbox.html#multiSelection-prop">setMultiSelection</a>().</p>
<!-- @@@selectedItem -->
<!-- $$$selectionChanged[overload1]$$$selectionChanged -->
<h3 class="fn"><a name="selectionChanged"></a><span class="type">void</span> Q3ListBox::<span class="name">selectionChanged</span> ()<tt> [signal]</tt></h3>
<p>This signal is emitted when the selection set of a list box changes. This signal is emitted in each selection mode. If the user selects five items by drag-selecting, <a href="q3listbox.html" class="compat">Q3ListBox</a> tries to emit just one selectionChanged() signal so the signal can be connected to computationally expensive slots.</p>
<p><b>See also </b><a href="q3listbox.html#selected">selected</a>() and <a href="q3listbox.html#currentItem-prop">currentItem</a>().</p>
<!-- @@@selectionChanged -->
<!-- $$$selectionChanged$$$selectionChangedQ3ListBoxItem* -->
<h3 class="fn"><a name="selectionChanged-2"></a><span class="type">void</span> Q3ListBox::<span class="name">selectionChanged</span> ( <span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * <i>item</i> )<tt> [signal]</tt></h3>
<p>This is an overloaded function.</p>
<p>This signal is emitted when the selection in a <a href="q3listbox.html#SelectionMode-enum">Single</a> selection list box changes. <i>item</i> is the newly selected list box item.</p>
<p><b>See also </b><a href="q3listbox.html#selected">selected</a>() and <a href="q3listbox.html#currentItem-prop">currentItem</a>().</p>
<!-- @@@selectionChanged -->
<!-- $$$setAutoBottomScrollBar[overload1]$$$setAutoBottomScrollBarbool -->
<h3 class="fn"><a name="setAutoBottomScrollBar"></a><span class="type">void</span> Q3ListBox::<span class="name">setAutoBottomScrollBar</span> ( <span class="type">bool</span> <i>enable</i> )</h3>
<p>Use <a href="q3scrollview.html#hScrollBarMode-prop">setHScrollBarMode</a>() instead.</p>
<p>If <i>enable</i> is true, pass <tt>Auto</tt> as the argument to <a href="q3scrollview.html#hScrollBarMode-prop">setHScrollBarMode</a>(); otherwise, pass <tt>AlwaysOff</tt>.</p>
<p><b>See also </b><a href="q3listbox.html#autoBottomScrollBar">autoBottomScrollBar</a>().</p>
<!-- @@@setAutoBottomScrollBar -->
<!-- $$$setAutoScroll[overload1]$$$setAutoScrollbool -->
<h3 class="fn"><a name="setAutoScroll"></a><span class="type">void</span> Q3ListBox::<span class="name">setAutoScroll</span> ( <span class="type">bool</span> <i>b</i> )</h3>
<p>Use setDragAutoScroll(<i>b</i>) instead.</p>
<p><b>See also </b><a href="q3listbox.html#autoScroll">autoScroll</a>().</p>
<!-- @@@setAutoScroll -->
<!-- $$$setAutoScrollBar[overload1]$$$setAutoScrollBarbool -->
<h3 class="fn"><a name="setAutoScrollBar"></a><span class="type">void</span> Q3ListBox::<span class="name">setAutoScrollBar</span> ( <span class="type">bool</span> <i>enable</i> )</h3>
<p>Use <a href="q3scrollview.html#vScrollBarMode-prop">setVScrollBarMode</a>() instead.</p>
<p>If <i>enable</i> is true, pass <tt>Auto</tt> as the argument to <a href="q3scrollview.html#vScrollBarMode-prop">setVScrollBarMode</a>(); otherwise, pass <tt>AlwaysOff</tt>.</p>
<p><b>See also </b><a href="q3listbox.html#autoScrollBar">autoScrollBar</a>().</p>
<!-- @@@setAutoScrollBar -->
<!-- $$$setAutoUpdate[overload1]$$$setAutoUpdatebool -->
<h3 class="fn"><a name="setAutoUpdate"></a><span class="type">void</span> Q3ListBox::<span class="name">setAutoUpdate</span> ( <span class="type">bool</span> <i>b</i> )</h3>
<p>Does nothing. Qt always updates automatically. The <i>b</i> parameter is ignored.</p>
<p><b>See also </b><a href="q3listbox.html#autoUpdate">autoUpdate</a>().</p>
<!-- @@@setAutoUpdate -->
<!-- $$$setBottomItem[overload1]$$$setBottomItemint -->
<h3 class="fn"><a name="setBottomItem"></a><span class="type">void</span> Q3ListBox::<span class="name">setBottomItem</span> ( <span class="type">int</span> <i>index</i> )<tt> [virtual]</tt></h3>
<p>Scrolls the list box so the item at position <i>index</i> in the list is displayed in the bottom row of the list box.</p>
<p><b>See also </b><a href="q3listbox.html#topItem-prop">setTopItem</a>().</p>
<!-- @@@setBottomItem -->
<!-- $$$setBottomScrollBar[overload1]$$$setBottomScrollBarbool -->
<h3 class="fn"><a name="setBottomScrollBar"></a><span class="type">void</span> Q3ListBox::<span class="name">setBottomScrollBar</span> ( <span class="type">bool</span> <i>enable</i> )</h3>
<p>Use <a href="q3scrollview.html#hScrollBarMode-prop">setHScrollBarMode</a>() instead.</p>
<p>If <i>enable</i> is true, pass <tt>AlwaysOn</tt> as the argument to <a href="q3scrollview.html#hScrollBarMode-prop">setHScrollBarMode</a>(); otherwise, pass <tt>AlwaysOff</tt>.</p>
<p><b>See also </b><a href="q3listbox.html#bottomScrollBar">bottomScrollBar</a>().</p>
<!-- @@@setBottomScrollBar -->
<!-- $$$setDragSelect[overload1]$$$setDragSelectbool -->
<h3 class="fn"><a name="setDragSelect"></a><span class="type">void</span> Q3ListBox::<span class="name">setDragSelect</span> ( <span class="type">bool</span> <i>b</i> )</h3>
<p>Does nothing. Dragging always selects. The <i>b</i> parameter is ignored.</p>
<p><b>See also </b><a href="q3listbox.html#dragSelect">dragSelect</a>().</p>
<!-- @@@setDragSelect -->
<!-- $$$setFixedVisibleLines[overload1]$$$setFixedVisibleLinesint -->
<h3 class="fn"><a name="setFixedVisibleLines"></a><span class="type">void</span> Q3ListBox::<span class="name">setFixedVisibleLines</span> ( <span class="type">int</span> <i>lines</i> )</h3>
<p>Use setRowMode(<i>lines</i>) instead.</p>
<!-- @@@setFixedVisibleLines -->
<!-- $$$setScrollBar[overload1]$$$setScrollBarbool -->
<h3 class="fn"><a name="setScrollBar"></a><span class="type">void</span> Q3ListBox::<span class="name">setScrollBar</span> ( <span class="type">bool</span> <i>enable</i> )</h3>
<p>Use <a href="q3scrollview.html#vScrollBarMode-prop">setVScrollBarMode</a>() instead.</p>
<p>If <i>enable</i> is true, pass <tt>AlwaysOn</tt> as the argument to <a href="q3scrollview.html#vScrollBarMode-prop">setVScrollBarMode</a>(); otherwise, pass <tt>AlwaysOff</tt>.</p>
<p><b>See also </b><a href="q3listbox.html#scrollBar">scrollBar</a>().</p>
<!-- @@@setScrollBar -->
<!-- $$$setSelected[overload1]$$$setSelectedQ3ListBoxItem*bool -->
<h3 class="fn"><a name="setSelected"></a><span class="type">void</span> Q3ListBox::<span class="name">setSelected</span> ( <span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * <i>item</i>, <span class="type">bool</span> <i>select</i> )<tt> [virtual]</tt></h3>
<p>Selects <i>item</i> if <i>select</i> is true or unselects it if <i>select</i> is false, and repaints the item appropriately.</p>
<p>If the list box is a <tt>Single</tt> selection list box and <i>select</i> is true, setSelected() calls <a href="q3listbox.html#currentItem-prop">setCurrentItem</a>().</p>
<p>If the list box is a <tt>Single</tt> selection list box, <i>select</i> is false, setSelected() calls <a href="q3listbox.html#clearSelection">clearSelection</a>().</p>
<p><b>See also </b><a href="q3listbox.html#selected">selected</a>(), <a href="q3listbox.html#multiSelection-prop">setMultiSelection</a>(), <a href="q3listbox.html#currentItem-prop">setCurrentItem</a>(), <a href="q3listbox.html#clearSelection">clearSelection</a>(), and <a href="q3listbox.html#currentItem-prop">currentItem</a>().</p>
<!-- @@@setSelected -->
<!-- $$$setSelected$$$setSelectedintbool -->
<h3 class="fn"><a name="setSelected-2"></a><span class="type">void</span> Q3ListBox::<span class="name">setSelected</span> ( <span class="type">int</span> <i>index</i>, <span class="type">bool</span> <i>select</i> )</h3>
<p>This is an overloaded function.</p>
<p>If <i>select</i> is true the item at position <i>index</i> is selected; otherwise the item is deselected.</p>
<!-- @@@setSelected -->
<!-- $$$setSmoothScrolling[overload1]$$$setSmoothScrollingbool -->
<h3 class="fn"><a name="setSmoothScrolling"></a><span class="type">void</span> Q3ListBox::<span class="name">setSmoothScrolling</span> ( <span class="type">bool</span> <i>b</i> )</h3>
<p>Does nothing. Qt always scrolls smoothly. The <i>b</i> parameter is ignored.</p>
<p><b>See also </b><a href="q3listbox.html#smoothScrolling">smoothScrolling</a>().</p>
<!-- @@@setSmoothScrolling -->
<!-- $$$showEvent[overload1]$$$showEventQShowEvent* -->
<h3 class="fn"><a name="showEvent"></a><span class="type">void</span> Q3ListBox::<span class="name">showEvent</span> ( <span class="type"><a href="qshowevent.html">QShowEvent</a></span> * )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#showEvent">QWidget::showEvent</a>().</p>
<!-- @@@showEvent -->
<!-- $$$sizeHint[overload1]$$$sizeHint -->
<h3 class="fn"><a name="sizeHint"></a><span class="type"><a href="qsize.html">QSize</a></span> Q3ListBox::<span class="name">sizeHint</span> () const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#sizeHint-prop">QWidget::sizeHint</a>().</p>
<!-- @@@sizeHint -->
<!-- $$$smoothScrolling[overload1]$$$smoothScrolling -->
<h3 class="fn"><a name="smoothScrolling"></a><span class="type">bool</span> Q3ListBox::<span class="name">smoothScrolling</span> () const</h3>
<p>Returns false. Qt always scrolls smoothly.</p>
<p><b>See also </b><a href="q3listbox.html#setSmoothScrolling">setSmoothScrolling</a>().</p>
<!-- @@@smoothScrolling -->
<!-- $$$sort[overload1]$$$sortbool -->
<h3 class="fn"><a name="sort"></a><span class="type">void</span> Q3ListBox::<span class="name">sort</span> ( <span class="type">bool</span> <i>ascending</i> = true )</h3>
<p>If <i>ascending</i> is true sorts the items in ascending order; otherwise sorts in descending order.</p>
<p>To compare the items, the text (<a href="q3listboxitem.html#text">Q3ListBoxItem::text</a>()) of the items is used.</p>
<!-- @@@sort -->
<!-- $$$takeItem[overload1]$$$takeItemconstQ3ListBoxItem* -->
<h3 class="fn"><a name="takeItem"></a><span class="type">void</span> Q3ListBox::<span class="name">takeItem</span> ( const <span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * <i>item</i> )</h3>
<p>Removes <i>item</i> from the list box and causes an update of the screen display. The item is not deleted. You should normally not need to call this function because Q3ListBoxItem::~Q3ListBoxItem() calls it. The normal way to delete an item is with <tt>delete</tt>.</p>
<p><b>See also </b><a href="q3listbox.html#insertItem">Q3ListBox::insertItem</a>().</p>
<!-- @@@takeItem -->
<!-- $$$text[overload1]$$$textint -->
<h3 class="fn"><a name="text"></a><span class="type"><a href="qstring.html">QString</a></span> Q3ListBox::<span class="name">text</span> ( <span class="type">int</span> <i>index</i> ) const</h3>
<p>Returns the text at position <i>index</i>, or an empty string if there is no text at that position.</p>
<p><b>See also </b><a href="q3listbox.html#pixmap">pixmap</a>().</p>
<!-- @@@text -->
<!-- $$$toggleCurrentItem[overload1]$$$toggleCurrentItem -->
<h3 class="fn"><a name="toggleCurrentItem"></a><span class="type">void</span> Q3ListBox::<span class="name">toggleCurrentItem</span> ()<tt> [protected]</tt></h3>
<p>Toggles the selection status of <a href="q3listbox.html#currentItem-prop">currentItem</a>() and repaints if the list box is a <tt>Multi</tt> selection list box.</p>
<p><b>See also </b><a href="q3listbox.html#multiSelection-prop">setMultiSelection</a>().</p>
<!-- @@@toggleCurrentItem -->
<!-- $$$totalHeight[overload1]$$$totalHeight -->
<h3 class="fn"><a name="totalHeight"></a><span class="type">int</span> Q3ListBox::<span class="name">totalHeight</span> () const<tt> [protected]</tt></h3>
<p>Use <a href="q3scrollview.html#contentsHeight-prop">contentsHeight</a>() instead.</p>
<!-- @@@totalHeight -->
<!-- $$$totalWidth[overload1]$$$totalWidth -->
<h3 class="fn"><a name="totalWidth"></a><span class="type">int</span> Q3ListBox::<span class="name">totalWidth</span> () const<tt> [protected]</tt></h3>
<p>Use <a href="q3scrollview.html#contentsWidth-prop">contentsWidth</a>() instead.</p>
<!-- @@@totalWidth -->
<!-- $$$triggerUpdate[overload1]$$$triggerUpdatebool -->
<h3 class="fn"><a name="triggerUpdate"></a><span class="type">void</span> Q3ListBox::<span class="name">triggerUpdate</span> ( <span class="type">bool</span> <i>doLayout</i> )</h3>
<p>Ensures that a single paint event will occur at the end of the current event loop iteration. If <i>doLayout</i> is true, the layout is also redone.</p>
<!-- @@@triggerUpdate -->
<!-- $$$updateCellWidth[overload1]$$$updateCellWidth -->
<h3 class="fn"><a name="updateCellWidth"></a><span class="type">void</span> Q3ListBox::<span class="name">updateCellWidth</span> ()<tt> [protected]</tt></h3>
<p>Does nothing. Qt automatically updates.</p>
<!-- @@@updateCellWidth -->
<!-- $$$updateItem[overload1]$$$updateItemint -->
<h3 class="fn"><a name="updateItem"></a><span class="type">void</span> Q3ListBox::<span class="name">updateItem</span> ( <span class="type">int</span> <i>index</i> )<tt> [protected]</tt></h3>
<p>Repaints the item at position <i>index</i> in the list.</p>
<!-- @@@updateItem -->
<!-- $$$updateItem$$$updateItemQ3ListBoxItem* -->
<h3 class="fn"><a name="updateItem-2"></a><span class="type">void</span> Q3ListBox::<span class="name">updateItem</span> ( <span class="type"><a href="q3listboxitem.html">Q3ListBoxItem</a></span> * <i>i</i> )<tt> [protected]</tt></h3>
<p>This is an overloaded function.</p>
<p>Repaints the <a href="q3listboxitem.html" class="compat">Q3ListBoxItem</a> <i>i</i>.</p>
<!-- @@@updateItem -->
<!-- $$$viewportPaintEvent[overload1]$$$viewportPaintEventQPaintEvent* -->
<h3 class="fn"><a name="viewportPaintEvent"></a><span class="type">void</span> Q3ListBox::<span class="name">viewportPaintEvent</span> ( <span class="type"><a href="qpaintevent.html">QPaintEvent</a></span> * <i>e</i> )<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="q3scrollview.html#viewportPaintEvent">Q3ScrollView::viewportPaintEvent</a>().</p>
<!-- @@@viewportPaintEvent -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
      subsidiaries. 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>
      Digia, Qt and their respective logos are trademarks of Digia Plc 
      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>