Sophie

Sophie

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

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" />
<!-- qstandarditemmodel.cpp -->
  <title>Qt 4.8: QStandardItem Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

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

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtgui.html">QtGui</a></li>
<li>QStandardItem</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="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#related-non-members">Related Non-Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#subclassing">Subclassing</a></li>
</ul>
</div>
<h1 class="title">QStandardItem Class Reference</h1>
<!-- $$$QStandardItem-brief -->
<p>The QStandardItem class provides an item for use with the <a href="qstandarditemmodel.html">QStandardItemModel</a> class. <a href="#details">More...</a></p>
<!-- @@@QStandardItem -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QStandardItem&gt;</span></pre><p>This class was introduced in Qt 4.2.</p>
<ul>
<li><a href="qstandarditem-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"> enum </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#ItemType-enum">ItemType</a></b> { Type, UserType }</td></tr>
</table>
<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="qstandarditem.html#QStandardItem">QStandardItem</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#QStandardItem-2">QStandardItem</a></b> ( const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#QStandardItem-3">QStandardItem</a></b> ( const QIcon &amp; <i>icon</i>, const QString &amp; <i>text</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#QStandardItem-4">QStandardItem</a></b> ( int <i>rows</i>, int <i>columns</i> = 1 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#dtor.QStandardItem">~QStandardItem</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#accessibleDescription">accessibleDescription</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#accessibleText">accessibleText</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#appendColumn">appendColumn</a></b> ( const QList&lt;QStandardItem *&gt; &amp; <i>items</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#appendRow">appendRow</a></b> ( const QList&lt;QStandardItem *&gt; &amp; <i>items</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#appendRow-2">appendRow</a></b> ( QStandardItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#appendRows">appendRows</a></b> ( const QList&lt;QStandardItem *&gt; &amp; <i>items</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QBrush </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#background">background</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::CheckState </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#checkState">checkState</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStandardItem * </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#child">child</a></b> ( int <i>row</i>, int <i>column</i> = 0 ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QStandardItem * </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#clone">clone</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#column">column</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#columnCount">columnCount</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QVariant </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#data">data</a></b> ( int <i>role</i> = Qt::UserRole + 1 ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::ItemFlags </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#flags">flags</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QFont </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#font">font</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QBrush </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#foreground">foreground</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#hasChildren">hasChildren</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QIcon </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#icon">icon</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QModelIndex </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#index">index</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#insertColumn">insertColumn</a></b> ( int <i>column</i>, const QList&lt;QStandardItem *&gt; &amp; <i>items</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#insertColumns">insertColumns</a></b> ( int <i>column</i>, int <i>count</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#insertRow">insertRow</a></b> ( int <i>row</i>, const QList&lt;QStandardItem *&gt; &amp; <i>items</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#insertRow-2">insertRow</a></b> ( int <i>row</i>, QStandardItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#insertRows">insertRows</a></b> ( int <i>row</i>, const QList&lt;QStandardItem *&gt; &amp; <i>items</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#insertRows-2">insertRows</a></b> ( int <i>row</i>, int <i>count</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#isCheckable">isCheckable</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#isDragEnabled">isDragEnabled</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#isDropEnabled">isDropEnabled</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#isEditable">isEditable</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#isEnabled">isEnabled</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#isSelectable">isSelectable</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#isTristate">isTristate</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStandardItemModel * </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#model">model</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStandardItem * </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#parent">parent</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#read">read</a></b> ( QDataStream &amp; <i>in</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#removeColumn">removeColumn</a></b> ( int <i>column</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#removeColumns">removeColumns</a></b> ( int <i>column</i>, int <i>count</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#removeRow">removeRow</a></b> ( int <i>row</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#removeRows">removeRows</a></b> ( int <i>row</i>, int <i>count</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#row">row</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#rowCount">rowCount</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#setAccessibleDescription">setAccessibleDescription</a></b> ( const QString &amp; <i>accessibleDescription</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#setAccessibleText">setAccessibleText</a></b> ( const QString &amp; <i>accessibleText</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#setBackground">setBackground</a></b> ( const QBrush &amp; <i>brush</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#setCheckState">setCheckState</a></b> ( Qt::CheckState <i>state</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#setCheckable">setCheckable</a></b> ( bool <i>checkable</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#setChild">setChild</a></b> ( int <i>row</i>, int <i>column</i>, QStandardItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#setChild-2">setChild</a></b> ( int <i>row</i>, QStandardItem * <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#setColumnCount">setColumnCount</a></b> ( int <i>columns</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#setData">setData</a></b> ( const QVariant &amp; <i>value</i>, int <i>role</i> = Qt::UserRole + 1 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#setDragEnabled">setDragEnabled</a></b> ( bool <i>dragEnabled</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#setDropEnabled">setDropEnabled</a></b> ( bool <i>dropEnabled</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#setEditable">setEditable</a></b> ( bool <i>editable</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#setEnabled">setEnabled</a></b> ( bool <i>enabled</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#setFlags">setFlags</a></b> ( Qt::ItemFlags <i>flags</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#setFont">setFont</a></b> ( const QFont &amp; <i>font</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#setForeground">setForeground</a></b> ( const QBrush &amp; <i>brush</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#setIcon">setIcon</a></b> ( const QIcon &amp; <i>icon</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#setRowCount">setRowCount</a></b> ( int <i>rows</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#setSelectable">setSelectable</a></b> ( bool <i>selectable</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#setSizeHint">setSizeHint</a></b> ( const QSize &amp; <i>size</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#setStatusTip">setStatusTip</a></b> ( const QString &amp; <i>statusTip</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#setText">setText</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="qstandarditem.html#setTextAlignment">setTextAlignment</a></b> ( Qt::Alignment <i>alignment</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#setToolTip">setToolTip</a></b> ( const QString &amp; <i>toolTip</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#setTristate">setTristate</a></b> ( bool <i>tristate</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#setWhatsThis">setWhatsThis</a></b> ( const QString &amp; <i>whatsThis</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QSize </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#sizeHint">sizeHint</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#sortChildren">sortChildren</a></b> ( int <i>column</i>, Qt::SortOrder <i>order</i> = Qt::AscendingOrder )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#statusTip">statusTip</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStandardItem * </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#takeChild">takeChild</a></b> ( int <i>row</i>, int <i>column</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QStandardItem *&gt; </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#takeColumn">takeColumn</a></b> ( int <i>column</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QStandardItem *&gt; </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#takeRow">takeRow</a></b> ( int <i>row</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#text">text</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Qt::Alignment </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#textAlignment">textAlignment</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#toolTip">toolTip</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#type">type</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#whatsThis">whatsThis</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#write">write</a></b> ( QDataStream &amp; <i>out</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#operator-lt">operator&lt;</a></b> ( const QStandardItem &amp; <i>other</i> ) const</td></tr>
</table>
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#QStandardItem-5">QStandardItem</a></b> ( const QStandardItem &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#emitDataChanged">emitDataChanged</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStandardItem &amp; </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#operator-eq">operator=</a></b> ( const QStandardItem &amp; <i>other</i> )</td></tr>
</table>
<a name="related-non-members"></a>
<h2>Related Non-Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QDataStream &amp; </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#operator-lt-lt-52">operator&lt;&lt;</a></b> ( QDataStream &amp; <i>out</i>, const QStandardItem &amp; <i>item</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDataStream &amp; </td><td class="memItemRight bottomAlign"><b><a href="qstandarditem.html#operator-gt-gt-34">operator&gt;&gt;</a></b> ( QDataStream &amp; <i>in</i>, QStandardItem &amp; <i>item</i> )</td></tr>
</table>
<a name="details"></a>
<!-- $$$QStandardItem-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QStandardItem class provides an item for use with the <a href="qstandarditemmodel.html">QStandardItemModel</a> class.</p>
<p>Items usually contain text, icons, or checkboxes.</p>
<p>Each item can have its own background brush which is set with the <a href="qstandarditem.html#setBackground">setBackground</a>() function. The current background brush can be found with <a href="qstandarditem.html#background">background</a>(). The text label for each item can be rendered with its own font and brush. These are specified with the <a href="qstandarditem.html#setFont">setFont</a>() and <a href="qstandarditem.html#setForeground">setForeground</a>() functions, and read with <a href="qstandarditem.html#font">font</a>() and <a href="qstandarditem.html#foreground">foreground</a>().</p>
<p>By default, items are enabled, editable, selectable, checkable, and can be used both as the source of a drag and drop operation and as a drop target. Each item's flags can be changed by calling <a href="qstandarditem.html#setFlags">setFlags</a>(). Checkable items can be checked and unchecked with the <a href="qstandarditem.html#setCheckState">setCheckState</a>() function. The corresponding <a href="qstandarditem.html#checkState">checkState</a>() function indicates whether the item is currently checked.</p>
<p>You can store application-specific data in an item by calling <a href="qstandarditem.html#setData">setData</a>().</p>
<p>Each item can have a two-dimensional table of child items. This makes it possible to build hierarchies of items. The typical hierarchy is the tree, in which case the child table is a table with a single column (a list).</p>
<p>The dimensions of the child table can be set with <a href="qstandarditem.html#setRowCount">setRowCount</a>() and <a href="qstandarditem.html#setColumnCount">setColumnCount</a>(). Items can be positioned in the child table with <a href="qstandarditem.html#setChild">setChild</a>(). Get a pointer to a child item with <a href="qstandarditem.html#child">child</a>(). New rows and columns of children can also be inserted with <a href="qstandarditem.html#insertRow">insertRow</a>() and <a href="qstandarditem.html#insertColumn">insertColumn</a>(), or appended with <a href="qstandarditem.html#appendRow">appendRow</a>() and <a href="qstandarditem.html#appendColumn">appendColumn</a>(). When using the append and insert functions, the dimensions of the child table will grow as needed.</p>
<p>An existing row of children can be removed with <a href="qstandarditem.html#removeRow">removeRow</a>() or <a href="qstandarditem.html#takeRow">takeRow</a>(); correspondingly, a column can be removed with <a href="qstandarditem.html#removeColumn">removeColumn</a>() or <a href="qstandarditem.html#takeColumn">takeColumn</a>().</p>
<p>An item's children can be sorted by calling <a href="qstandarditem.html#sortChildren">sortChildren</a>().</p>
<a name="subclassing"></a>
<h3>Subclassing</h3>
<p>When subclassing QStandardItem to provide custom items, it is possible to define new types for them so that they can be distinguished from the base class. The <a href="qstandarditem.html#type">type</a>() function should be reimplemented to return a new type value equal to or greater than <a href="qstandarditem.html#ItemType-enum">UserType</a>.</p>
<p>Reimplement <a href="qstandarditem.html#data">data</a>() and <a href="qstandarditem.html#setData">setData</a>() if you want to perform custom handling of data queries and/or control how an item's data is represented.</p>
<p>Reimplement <a href="qstandarditem.html#clone">clone</a>() if you want <a href="qstandarditemmodel.html">QStandardItemModel</a> to be able to create instances of your custom item class on demand (see <a href="qstandarditemmodel.html#setItemPrototype">QStandardItemModel::setItemPrototype</a>()).</p>
<p>Reimplement <a href="qstandarditem.html#read">read</a>() and <a href="qstandarditem.html#write">write</a>() if you want to control how items are represented in their serialized form.</p>
<p>Reimplement <a href="qstandarditem.html#operator-lt">operator&lt;</a>() if you want to control the semantics of item comparison. <a href="qstandarditem.html#operator-lt">operator&lt;</a>() determines the sorted order when sorting items with <a href="qstandarditem.html#sortChildren">sortChildren</a>() or with <a href="qstandarditemmodel.html#sort">QStandardItemModel::sort</a>().</p>
</div>
<p><b>See also </b><a href="qstandarditemmodel.html">QStandardItemModel</a>, <a href="model-view-programming.html#item-view-convenience-classes">Item View Convenience Classes</a>, and <a href="model-view-programming.html">Model/View Programming</a>.</p>
<!-- @@@QStandardItem -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$ItemType$$$Type$$$UserType -->
<h3 class="fn"><a name="ItemType-enum"></a>enum QStandardItem::<span class="name">ItemType</span></h3>
<p>This enum describes the types that are used to describe standard items.</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>QStandardItem::Type</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The default type for standard items.</td></tr>
<tr><td class="topAlign"><tt>QStandardItem::UserType</tt></td><td class="topAlign"><tt>1000</tt></td><td class="topAlign">The minimum value for custom types. Values below UserType are reserved by Qt.</td></tr>
</table>
<p>You can define new user types in <a href="qstandarditem.html">QStandardItem</a> subclasses to ensure that custom items are treated specially; for example, when items are sorted.</p>
<p><b>See also </b><a href="qstandarditem.html#type">type</a>().</p>
<!-- @@@ItemType -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QStandardItem[overload1]$$$QStandardItem -->
<h3 class="fn"><a name="QStandardItem"></a>QStandardItem::<span class="name">QStandardItem</span> ()</h3>
<p>Constructs an item.</p>
<!-- @@@QStandardItem -->
<!-- $$$QStandardItem$$$QStandardItemconstQString& -->
<h3 class="fn"><a name="QStandardItem-2"></a>QStandardItem::<span class="name">QStandardItem</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i> )</h3>
<p>Constructs an item with the given <i>text</i>.</p>
<!-- @@@QStandardItem -->
<!-- $$$QStandardItem$$$QStandardItemconstQIcon&constQString& -->
<h3 class="fn"><a name="QStandardItem-3"></a>QStandardItem::<span class="name">QStandardItem</span> ( const <span class="type"><a href="qicon.html">QIcon</a></span> &amp; <i>icon</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i> )</h3>
<p>Constructs an item with the given <i>icon</i> and <i>text</i>.</p>
<!-- @@@QStandardItem -->
<!-- $$$QStandardItem$$$QStandardItemintint -->
<h3 class="fn"><a name="QStandardItem-4"></a>QStandardItem::<span class="name">QStandardItem</span> ( <span class="type">int</span> <i>rows</i>, <span class="type">int</span> <i>columns</i> = 1 )</h3>
<p>Constructs an item with <i>rows</i> rows and <i>columns</i> columns of child items.</p>
<!-- @@@QStandardItem -->
<!-- $$$QStandardItem$$$QStandardItemconstQStandardItem& -->
<h3 class="fn"><a name="QStandardItem-5"></a>QStandardItem::<span class="name">QStandardItem</span> ( const <span class="type">QStandardItem</span> &amp; <i>other</i> )<tt> [protected]</tt></h3>
<p>Constructs a copy of <i>other</i>. Note that <a href="qstandarditem.html#model">model</a>() is not copied.</p>
<p>This function is useful when reimplementing <a href="qstandarditem.html#clone">clone</a>().</p>
<!-- @@@QStandardItem -->
<!-- $$$~QStandardItem[overload1]$$$~QStandardItem -->
<h3 class="fn"><a name="dtor.QStandardItem"></a>QStandardItem::<span class="name">~QStandardItem</span> ()<tt> [virtual]</tt></h3>
<p>Destructs the item. This causes the item's children to be destructed as well.</p>
<!-- @@@~QStandardItem -->
<!-- $$$accessibleDescription[overload1]$$$accessibleDescription -->
<h3 class="fn"><a name="accessibleDescription"></a><span class="type"><a href="qstring.html">QString</a></span> QStandardItem::<span class="name">accessibleDescription</span> () const</h3>
<p>Returns the item's accessible description.</p>
<p>The accessible description is used by assistive technologies (i.e&#x2e; for users who cannot use conventional means of interaction).</p>
<p><b>See also </b><a href="qstandarditem.html#setAccessibleDescription">setAccessibleDescription</a>() and <a href="qstandarditem.html#accessibleText">accessibleText</a>().</p>
<!-- @@@accessibleDescription -->
<!-- $$$accessibleText[overload1]$$$accessibleText -->
<h3 class="fn"><a name="accessibleText"></a><span class="type"><a href="qstring.html">QString</a></span> QStandardItem::<span class="name">accessibleText</span> () const</h3>
<p>Returns the item's accessible text.</p>
<p>The accessible text is used by assistive technologies (i.e&#x2e; for users who cannot use conventional means of interaction).</p>
<p><b>See also </b><a href="qstandarditem.html#setAccessibleText">setAccessibleText</a>() and <a href="qstandarditem.html#accessibleDescription">accessibleDescription</a>().</p>
<!-- @@@accessibleText -->
<!-- $$$appendColumn[overload1]$$$appendColumnconstQList<QStandardItem*>& -->
<h3 class="fn"><a name="appendColumn"></a><span class="type">void</span> QStandardItem::<span class="name">appendColumn</span> ( const <span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type">QStandardItem</span> *&gt; &amp; <i>items</i> )</h3>
<p>Appends a column containing <i>items</i>. If necessary, the row count is increased to the size of <i>items</i>.</p>
<p><b>See also </b><a href="qstandarditem.html#insertColumn">insertColumn</a>().</p>
<!-- @@@appendColumn -->
<!-- $$$appendRow[overload1]$$$appendRowconstQList<QStandardItem*>& -->
<h3 class="fn"><a name="appendRow"></a><span class="type">void</span> QStandardItem::<span class="name">appendRow</span> ( const <span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type">QStandardItem</span> *&gt; &amp; <i>items</i> )</h3>
<p>Appends a row containing <i>items</i>. If necessary, the column count is increased to the size of <i>items</i>.</p>
<p><b>See also </b><a href="qstandarditem.html#insertRow">insertRow</a>().</p>
<!-- @@@appendRow -->
<!-- $$$appendRow$$$appendRowQStandardItem* -->
<h3 class="fn"><a name="appendRow-2"></a><span class="type">void</span> QStandardItem::<span class="name">appendRow</span> ( <span class="type">QStandardItem</span> * <i>item</i> )</h3>
<p>This is an overloaded function.</p>
<p>Appends a row containing <i>item</i>.</p>
<p>When building a list or a tree that has only one column, this function provides a convenient way to append a single new item.</p>
<!-- @@@appendRow -->
<!-- $$$appendRows[overload1]$$$appendRowsconstQList<QStandardItem*>& -->
<h3 class="fn"><a name="appendRows"></a><span class="type">void</span> QStandardItem::<span class="name">appendRows</span> ( const <span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type">QStandardItem</span> *&gt; &amp; <i>items</i> )</h3>
<p>Appends rows containing <i>items</i>. The column count will not change.</p>
<p><b>See also </b><a href="qstandarditem.html#insertRow">insertRow</a>().</p>
<!-- @@@appendRows -->
<!-- $$$background[overload1]$$$background -->
<h3 class="fn"><a name="background"></a><span class="type"><a href="qbrush.html">QBrush</a></span> QStandardItem::<span class="name">background</span> () const</h3>
<p>Returns the brush used to render the item's background.</p>
<p><b>See also </b><a href="qstandarditem.html#foreground">foreground</a>() and <a href="qstandarditem.html#setBackground">setBackground</a>().</p>
<!-- @@@background -->
<!-- $$$checkState[overload1]$$$checkState -->
<h3 class="fn"><a name="checkState"></a><span class="type"><a href="qt.html#CheckState-enum">Qt::CheckState</a></span> QStandardItem::<span class="name">checkState</span> () const</h3>
<p>Returns the checked state of the item.</p>
<p><b>See also </b><a href="qstandarditem.html#setCheckState">setCheckState</a>() and <a href="qstandarditem.html#isCheckable">isCheckable</a>().</p>
<!-- @@@checkState -->
<!-- $$$child[overload1]$$$childintint -->
<h3 class="fn"><a name="child"></a><span class="type">QStandardItem</span> * QStandardItem::<span class="name">child</span> ( <span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>column</i> = 0 ) const</h3>
<p>Returns the child item at (<i>row</i>, <i>column</i>) if one has been set; otherwise returns 0.</p>
<p><b>See also </b><a href="qstandarditem.html#setChild">setChild</a>(), <a href="qstandarditem.html#takeChild">takeChild</a>(), and <a href="qstandarditem.html#parent">parent</a>().</p>
<!-- @@@child -->
<!-- $$$clone[overload1]$$$clone -->
<h3 class="fn"><a name="clone"></a><span class="type">QStandardItem</span> * QStandardItem::<span class="name">clone</span> () const<tt> [virtual]</tt></h3>
<p>Returns a copy of this item. The item's children are not copied.</p>
<p>When subclassing <a href="qstandarditem.html">QStandardItem</a>, you can reimplement this function to provide <a href="qstandarditemmodel.html">QStandardItemModel</a> with a factory that it can use to create new items on demand.</p>
<p><b>See also </b><a href="qstandarditemmodel.html#setItemPrototype">QStandardItemModel::setItemPrototype</a>() and <a href="qstandarditem.html#operator-eq">operator=</a>().</p>
<!-- @@@clone -->
<!-- $$$column[overload1]$$$column -->
<h3 class="fn"><a name="column"></a><span class="type">int</span> QStandardItem::<span class="name">column</span> () const</h3>
<p>Returns the column where the item is located in its parent's child table, or -1 if the item has no parent.</p>
<p><b>See also </b><a href="qstandarditem.html#row">row</a>() and <a href="qstandarditem.html#parent">parent</a>().</p>
<!-- @@@column -->
<!-- $$$columnCount[overload1]$$$columnCount -->
<h3 class="fn"><a name="columnCount"></a><span class="type">int</span> QStandardItem::<span class="name">columnCount</span> () const</h3>
<p>Returns the number of child item columns that the item has.</p>
<p><b>See also </b><a href="qstandarditem.html#setColumnCount">setColumnCount</a>() and <a href="qstandarditem.html#rowCount">rowCount</a>().</p>
<!-- @@@columnCount -->
<!-- $$$data[overload1]$$$dataint -->
<h3 class="fn"><a name="data"></a><span class="type"><a href="qvariant.html">QVariant</a></span> QStandardItem::<span class="name">data</span> ( <span class="type">int</span> <i>role</i> = Qt::UserRole + 1 ) const<tt> [virtual]</tt></h3>
<p>Returns the item's data for the given <i>role</i>, or an invalid <a href="qvariant.html">QVariant</a> if there is no data for the role.</p>
<p><b>Note:</b> The default implementation treats <a href="qt.html#ItemDataRole-enum">Qt::EditRole</a> and <a href="qt.html#ItemDataRole-enum">Qt::DisplayRole</a> as referring to the same data.</p>
<p><b>See also </b><a href="qstandarditem.html#setData">setData</a>().</p>
<!-- @@@data -->
<!-- $$$emitDataChanged[overload1]$$$emitDataChanged -->
<h3 class="fn"><a name="emitDataChanged"></a><span class="type">void</span> QStandardItem::<span class="name">emitDataChanged</span> ()<tt> [protected]</tt></h3>
<p>Causes the model associated with this item to emit a <a href="qabstractitemmodel.html#dataChanged">dataChanged</a>() signal for this item.</p>
<p>You normally only need to call this function if you have subclassed <a href="qstandarditem.html">QStandardItem</a> and reimplemented <a href="qstandarditem.html#data">data</a>() and/or <a href="qstandarditem.html#setData">setData</a>().</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also </b><a href="qstandarditem.html#setData">setData</a>().</p>
<!-- @@@emitDataChanged -->
<!-- $$$flags[overload1]$$$flags -->
<h3 class="fn"><a name="flags"></a><span class="type"><a href="qt.html#ItemFlag-enum">Qt::ItemFlags</a></span> QStandardItem::<span class="name">flags</span> () const</h3>
<p>Returns the item flags for the item.</p>
<p>The item flags determine how the user can interact with the item.</p>
<p>By default, items are enabled, editable, selectable, checkable, and can be used both as the source of a drag and drop operation and as a drop target.</p>
<p><b>See also </b><a href="qstandarditem.html#setFlags">setFlags</a>().</p>
<!-- @@@flags -->
<!-- $$$font[overload1]$$$font -->
<h3 class="fn"><a name="font"></a><span class="type"><a href="qfont.html">QFont</a></span> QStandardItem::<span class="name">font</span> () const</h3>
<p>Returns the font used to render the item's text.</p>
<p><b>See also </b><a href="qstandarditem.html#setFont">setFont</a>().</p>
<!-- @@@font -->
<!-- $$$foreground[overload1]$$$foreground -->
<h3 class="fn"><a name="foreground"></a><span class="type"><a href="qbrush.html">QBrush</a></span> QStandardItem::<span class="name">foreground</span> () const</h3>
<p>Returns the brush used to render the item's foreground (e.g&#x2e; text).</p>
<p><b>See also </b><a href="qstandarditem.html#setForeground">setForeground</a>() and <a href="qstandarditem.html#background">background</a>().</p>
<!-- @@@foreground -->
<!-- $$$hasChildren[overload1]$$$hasChildren -->
<h3 class="fn"><a name="hasChildren"></a><span class="type">bool</span> QStandardItem::<span class="name">hasChildren</span> () const</h3>
<p>Returns true if this item has any children; otherwise returns false.</p>
<p><b>See also </b><a href="qstandarditem.html#rowCount">rowCount</a>(), <a href="qstandarditem.html#columnCount">columnCount</a>(), and <a href="qstandarditem.html#child">child</a>().</p>
<!-- @@@hasChildren -->
<!-- $$$icon[overload1]$$$icon -->
<h3 class="fn"><a name="icon"></a><span class="type"><a href="qicon.html">QIcon</a></span> QStandardItem::<span class="name">icon</span> () const</h3>
<p>Returns the item's icon.</p>
<p><b>See also </b><a href="qstandarditem.html#setIcon">setIcon</a>() and <a href="qabstractitemview.html#iconSize-prop">iconSize</a>.</p>
<!-- @@@icon -->
<!-- $$$index[overload1]$$$index -->
<h3 class="fn"><a name="index"></a><span class="type"><a href="qmodelindex.html">QModelIndex</a></span> QStandardItem::<span class="name">index</span> () const</h3>
<p>Returns the <a href="qmodelindex.html">QModelIndex</a> associated with this item.</p>
<p>When you need to invoke item functionality in a <a href="qmodelindex.html">QModelIndex</a>-based API (e.g&#x2e; <a href="qabstractitemview.html">QAbstractItemView</a>), you can call this function to obtain an index that corresponds to the item's location in the model.</p>
<p>If the item is not associated with a model, an invalid <a href="qmodelindex.html">QModelIndex</a> is returned.</p>
<p><b>See also </b><a href="qstandarditem.html#model">model</a>() and <a href="qstandarditemmodel.html#itemFromIndex">QStandardItemModel::itemFromIndex</a>().</p>
<!-- @@@index -->
<!-- $$$insertColumn[overload1]$$$insertColumnintconstQList<QStandardItem*>& -->
<h3 class="fn"><a name="insertColumn"></a><span class="type">void</span> QStandardItem::<span class="name">insertColumn</span> ( <span class="type">int</span> <i>column</i>, const <span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type">QStandardItem</span> *&gt; &amp; <i>items</i> )</h3>
<p>Inserts a column at <i>column</i> containing <i>items</i>. If necessary, the row count is increased to the size of <i>items</i>.</p>
<p><b>See also </b><a href="qstandarditem.html#insertColumns">insertColumns</a>() and <a href="qstandarditem.html#insertRow">insertRow</a>().</p>
<!-- @@@insertColumn -->
<!-- $$$insertColumns[overload1]$$$insertColumnsintint -->
<h3 class="fn"><a name="insertColumns"></a><span class="type">void</span> QStandardItem::<span class="name">insertColumns</span> ( <span class="type">int</span> <i>column</i>, <span class="type">int</span> <i>count</i> )</h3>
<p>Inserts <i>count</i> columns of child items at column <i>column</i>.</p>
<p><b>See also </b><a href="qstandarditem.html#insertColumn">insertColumn</a>() and <a href="qstandarditem.html#insertRows">insertRows</a>().</p>
<!-- @@@insertColumns -->
<!-- $$$insertRow[overload1]$$$insertRowintconstQList<QStandardItem*>& -->
<h3 class="fn"><a name="insertRow"></a><span class="type">void</span> QStandardItem::<span class="name">insertRow</span> ( <span class="type">int</span> <i>row</i>, const <span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type">QStandardItem</span> *&gt; &amp; <i>items</i> )</h3>
<p>Inserts a row at <i>row</i> containing <i>items</i>. If necessary, the column count is increased to the size of <i>items</i>.</p>
<p><b>See also </b><a href="qstandarditem.html#insertRows">insertRows</a>() and <a href="qstandarditem.html#insertColumn">insertColumn</a>().</p>
<!-- @@@insertRow -->
<!-- $$$insertRow$$$insertRowintQStandardItem* -->
<h3 class="fn"><a name="insertRow-2"></a><span class="type">void</span> QStandardItem::<span class="name">insertRow</span> ( <span class="type">int</span> <i>row</i>, <span class="type">QStandardItem</span> * <i>item</i> )</h3>
<p>This is an overloaded function.</p>
<p>Inserts a row at <i>row</i> containing <i>item</i>.</p>
<p>When building a list or a tree that has only one column, this function provides a convenient way to insert a single new item.</p>
<!-- @@@insertRow -->
<!-- $$$insertRows[overload1]$$$insertRowsintconstQList<QStandardItem*>& -->
<h3 class="fn"><a name="insertRows"></a><span class="type">void</span> QStandardItem::<span class="name">insertRows</span> ( <span class="type">int</span> <i>row</i>, const <span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type">QStandardItem</span> *&gt; &amp; <i>items</i> )</h3>
<p>Inserts <i>items</i> at <i>row</i>. The column count wont be changed.</p>
<p><b>See also </b><a href="qstandarditem.html#insertRow">insertRow</a>() and <a href="qstandarditem.html#insertColumn">insertColumn</a>().</p>
<!-- @@@insertRows -->
<!-- $$$insertRows$$$insertRowsintint -->
<h3 class="fn"><a name="insertRows-2"></a><span class="type">void</span> QStandardItem::<span class="name">insertRows</span> ( <span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>count</i> )</h3>
<p>Inserts <i>count</i> rows of child items at row <i>row</i>.</p>
<p><b>See also </b><a href="qstandarditem.html#insertRow">insertRow</a>() and <a href="qstandarditem.html#insertColumns">insertColumns</a>().</p>
<!-- @@@insertRows -->
<!-- $$$isCheckable[overload1]$$$isCheckable -->
<h3 class="fn"><a name="isCheckable"></a><span class="type">bool</span> QStandardItem::<span class="name">isCheckable</span> () const</h3>
<p>Returns whether the item is user-checkable.</p>
<p>The default value is false.</p>
<p><b>See also </b><a href="qstandarditem.html#setCheckable">setCheckable</a>(), <a href="qstandarditem.html#checkState">checkState</a>(), and <a href="qstandarditem.html#isTristate">isTristate</a>().</p>
<!-- @@@isCheckable -->
<!-- $$$isDragEnabled[overload1]$$$isDragEnabled -->
<h3 class="fn"><a name="isDragEnabled"></a><span class="type">bool</span> QStandardItem::<span class="name">isDragEnabled</span> () const</h3>
<p>Returns whether the item is drag enabled. An item that is drag enabled can be dragged by the user.</p>
<p>The default value is true.</p>
<p>Note that item dragging must be enabled in the view for dragging to work; see <a href="qabstractitemview.html#dragEnabled-prop">QAbstractItemView::dragEnabled</a>.</p>
<p><b>See also </b><a href="qstandarditem.html#setDragEnabled">setDragEnabled</a>(), <a href="qstandarditem.html#isDropEnabled">isDropEnabled</a>(), and <a href="qstandarditem.html#flags">flags</a>().</p>
<!-- @@@isDragEnabled -->
<!-- $$$isDropEnabled[overload1]$$$isDropEnabled -->
<h3 class="fn"><a name="isDropEnabled"></a><span class="type">bool</span> QStandardItem::<span class="name">isDropEnabled</span> () const</h3>
<p>Returns whether the item is drop enabled. When an item is drop enabled, it can be used as a drop target.</p>
<p>The default value is true.</p>
<p><b>See also </b><a href="qstandarditem.html#setDropEnabled">setDropEnabled</a>(), <a href="qstandarditem.html#isDragEnabled">isDragEnabled</a>(), and <a href="qstandarditem.html#flags">flags</a>().</p>
<!-- @@@isDropEnabled -->
<!-- $$$isEditable[overload1]$$$isEditable -->
<h3 class="fn"><a name="isEditable"></a><span class="type">bool</span> QStandardItem::<span class="name">isEditable</span> () const</h3>
<p>Returns whether the item can be edited by the user.</p>
<p>When an item is editable (and enabled), the user can edit the item by invoking one of the view's edit triggers; see <a href="qabstractitemview.html#editTriggers-prop">QAbstractItemView::editTriggers</a>.</p>
<p>The default value is true.</p>
<p><b>See also </b><a href="qstandarditem.html#setEditable">setEditable</a>() and <a href="qstandarditem.html#flags">flags</a>().</p>
<!-- @@@isEditable -->
<!-- $$$isEnabled[overload1]$$$isEnabled -->
<h3 class="fn"><a name="isEnabled"></a><span class="type">bool</span> QStandardItem::<span class="name">isEnabled</span> () const</h3>
<p>Returns whether the item is enabled.</p>
<p>When an item is enabled, the user can interact with it. The possible types of interaction are specified by the other item flags, such as <a href="qstandarditem.html#isEditable">isEditable</a>() and <a href="qstandarditem.html#isSelectable">isSelectable</a>().</p>
<p>The default value is true.</p>
<p><b>See also </b><a href="qstandarditem.html#setEnabled">setEnabled</a>() and <a href="qstandarditem.html#flags">flags</a>().</p>
<!-- @@@isEnabled -->
<!-- $$$isSelectable[overload1]$$$isSelectable -->
<h3 class="fn"><a name="isSelectable"></a><span class="type">bool</span> QStandardItem::<span class="name">isSelectable</span> () const</h3>
<p>Returns whether the item is selectable by the user.</p>
<p>The default value is true.</p>
<p><b>See also </b><a href="qstandarditem.html#setSelectable">setSelectable</a>() and <a href="qstandarditem.html#flags">flags</a>().</p>
<!-- @@@isSelectable -->
<!-- $$$isTristate[overload1]$$$isTristate -->
<h3 class="fn"><a name="isTristate"></a><span class="type">bool</span> QStandardItem::<span class="name">isTristate</span> () const</h3>
<p>Returns whether the item is tristate; that is, if it's checkable with three separate states.</p>
<p>The default value is false.</p>
<p><b>See also </b><a href="qstandarditem.html#setTristate">setTristate</a>(), <a href="qstandarditem.html#isCheckable">isCheckable</a>(), and <a href="qstandarditem.html#checkState">checkState</a>().</p>
<!-- @@@isTristate -->
<!-- $$$model[overload1]$$$model -->
<h3 class="fn"><a name="model"></a><span class="type"><a href="qstandarditemmodel.html">QStandardItemModel</a></span> * QStandardItem::<span class="name">model</span> () const</h3>
<p>Returns the <a href="qstandarditemmodel.html">QStandardItemModel</a> that this item belongs to.</p>
<p>If the item is not a child of another item that belongs to the model, this function returns 0.</p>
<p><b>See also </b><a href="qstandarditem.html#index">index</a>().</p>
<!-- @@@model -->
<!-- $$$parent[overload1]$$$parent -->
<h3 class="fn"><a name="parent"></a><span class="type">QStandardItem</span> * QStandardItem::<span class="name">parent</span> () const</h3>
<p>Returns the item's parent item, or 0 if the item has no parent.</p>
<p><b>See also </b><a href="qstandarditem.html#child">child</a>().</p>
<!-- @@@parent -->
<!-- $$$read[overload1]$$$readQDataStream& -->
<h3 class="fn"><a name="read"></a><span class="type">void</span> QStandardItem::<span class="name">read</span> ( <span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <i>in</i> )<tt> [virtual]</tt></h3>
<p>Reads the item from stream <i>in</i>. Only the data and flags of the item are read, not the child items.</p>
<p><b>See also </b><a href="qstandarditem.html#write">write</a>().</p>
<!-- @@@read -->
<!-- $$$removeColumn[overload1]$$$removeColumnint -->
<h3 class="fn"><a name="removeColumn"></a><span class="type">void</span> QStandardItem::<span class="name">removeColumn</span> ( <span class="type">int</span> <i>column</i> )</h3>
<p>Removes the given <i>column</i>. The items that were in the column are deleted.</p>
<p><b>See also </b><a href="qstandarditem.html#takeColumn">takeColumn</a>(), <a href="qstandarditem.html#removeColumns">removeColumns</a>(), and <a href="qstandarditem.html#removeRow">removeRow</a>().</p>
<!-- @@@removeColumn -->
<!-- $$$removeColumns[overload1]$$$removeColumnsintint -->
<h3 class="fn"><a name="removeColumns"></a><span class="type">void</span> QStandardItem::<span class="name">removeColumns</span> ( <span class="type">int</span> <i>column</i>, <span class="type">int</span> <i>count</i> )</h3>
<p>Removes <i>count</i> columns at column <i>column</i>. The items that were in those columns are deleted.</p>
<p><b>See also </b><a href="qstandarditem.html#removeColumn">removeColumn</a>() and <a href="qstandarditem.html#removeRows">removeRows</a>().</p>
<!-- @@@removeColumns -->
<!-- $$$removeRow[overload1]$$$removeRowint -->
<h3 class="fn"><a name="removeRow"></a><span class="type">void</span> QStandardItem::<span class="name">removeRow</span> ( <span class="type">int</span> <i>row</i> )</h3>
<p>Removes the given <i>row</i>. The items that were in the row are deleted.</p>
<p><b>See also </b><a href="qstandarditem.html#takeRow">takeRow</a>(), <a href="qstandarditem.html#removeRows">removeRows</a>(), and <a href="qstandarditem.html#removeColumn">removeColumn</a>().</p>
<!-- @@@removeRow -->
<!-- $$$removeRows[overload1]$$$removeRowsintint -->
<h3 class="fn"><a name="removeRows"></a><span class="type">void</span> QStandardItem::<span class="name">removeRows</span> ( <span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>count</i> )</h3>
<p>Removes <i>count</i> rows at row <i>row</i>. The items that were in those rows are deleted.</p>
<p><b>See also </b><a href="qstandarditem.html#removeRow">removeRow</a>() and <a href="qstandarditem.html#removeColumn">removeColumn</a>().</p>
<!-- @@@removeRows -->
<!-- $$$row[overload1]$$$row -->
<h3 class="fn"><a name="row"></a><span class="type">int</span> QStandardItem::<span class="name">row</span> () const</h3>
<p>Returns the row where the item is located in its parent's child table, or -1 if the item has no parent.</p>
<p><b>See also </b><a href="qstandarditem.html#column">column</a>() and <a href="qstandarditem.html#parent">parent</a>().</p>
<!-- @@@row -->
<!-- $$$rowCount[overload1]$$$rowCount -->
<h3 class="fn"><a name="rowCount"></a><span class="type">int</span> QStandardItem::<span class="name">rowCount</span> () const</h3>
<p>Returns the number of child item rows that the item has.</p>
<p><b>See also </b><a href="qstandarditem.html#setRowCount">setRowCount</a>() and <a href="qstandarditem.html#columnCount">columnCount</a>().</p>
<!-- @@@rowCount -->
<!-- $$$setAccessibleDescription[overload1]$$$setAccessibleDescriptionconstQString& -->
<h3 class="fn"><a name="setAccessibleDescription"></a><span class="type">void</span> QStandardItem::<span class="name">setAccessibleDescription</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>accessibleDescription</i> )</h3>
<p>Sets the item's accessible description to the string specified by <i>accessibleDescription</i>.</p>
<p>The accessible description is used by assistive technologies (i.e&#x2e; for users who cannot use conventional means of interaction).</p>
<p><b>See also </b><a href="qstandarditem.html#accessibleDescription">accessibleDescription</a>() and <a href="qstandarditem.html#setAccessibleText">setAccessibleText</a>().</p>
<!-- @@@setAccessibleDescription -->
<!-- $$$setAccessibleText[overload1]$$$setAccessibleTextconstQString& -->
<h3 class="fn"><a name="setAccessibleText"></a><span class="type">void</span> QStandardItem::<span class="name">setAccessibleText</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>accessibleText</i> )</h3>
<p>Sets the item's accessible text to the string specified by <i>accessibleText</i>.</p>
<p>The accessible text is used by assistive technologies (i.e&#x2e; for users who cannot use conventional means of interaction).</p>
<p><b>See also </b><a href="qstandarditem.html#accessibleText">accessibleText</a>() and <a href="qstandarditem.html#setAccessibleDescription">setAccessibleDescription</a>().</p>
<!-- @@@setAccessibleText -->
<!-- $$$setBackground[overload1]$$$setBackgroundconstQBrush& -->
<h3 class="fn"><a name="setBackground"></a><span class="type">void</span> QStandardItem::<span class="name">setBackground</span> ( const <span class="type"><a href="qbrush.html">QBrush</a></span> &amp; <i>brush</i> )</h3>
<p>Sets the item's background brush to the specified <i>brush</i>.</p>
<p><b>See also </b><a href="qstandarditem.html#background">background</a>() and <a href="qstandarditem.html#setForeground">setForeground</a>().</p>
<!-- @@@setBackground -->
<!-- $$$setCheckState[overload1]$$$setCheckStateQt::CheckState -->
<h3 class="fn"><a name="setCheckState"></a><span class="type">void</span> QStandardItem::<span class="name">setCheckState</span> ( <span class="type"><a href="qt.html#CheckState-enum">Qt::CheckState</a></span> <i>state</i> )</h3>
<p>Sets the check state of the item to be <i>state</i>.</p>
<p><b>See also </b><a href="qstandarditem.html#checkState">checkState</a>() and <a href="qstandarditem.html#setCheckable">setCheckable</a>().</p>
<!-- @@@setCheckState -->
<!-- $$$setCheckable[overload1]$$$setCheckablebool -->
<h3 class="fn"><a name="setCheckable"></a><span class="type">void</span> QStandardItem::<span class="name">setCheckable</span> ( <span class="type">bool</span> <i>checkable</i> )</h3>
<p>Sets whether the item is user-checkable. If <i>checkable</i> is true, the item can be checked by the user; otherwise, the user cannot check the item.</p>
<p>The item delegate will render a checkable item with a check box next to the item's text.</p>
<p><b>See also </b><a href="qstandarditem.html#isCheckable">isCheckable</a>(), <a href="qstandarditem.html#setCheckState">setCheckState</a>(), and <a href="qstandarditem.html#setTristate">setTristate</a>().</p>
<!-- @@@setCheckable -->
<!-- $$$setChild[overload1]$$$setChildintintQStandardItem* -->
<h3 class="fn"><a name="setChild"></a><span class="type">void</span> QStandardItem::<span class="name">setChild</span> ( <span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>column</i>, <span class="type">QStandardItem</span> * <i>item</i> )</h3>
<p>Sets the child item at (<i>row</i>, <i>column</i>) to <i>item</i>. This item (the parent item) takes ownership of <i>item</i>. If necessary, the row count and column count are increased to fit the item.</p>
<p><b>See also </b><a href="qstandarditem.html#child">child</a>().</p>
<!-- @@@setChild -->
<!-- $$$setChild$$$setChildintQStandardItem* -->
<h3 class="fn"><a name="setChild-2"></a><span class="type">void</span> QStandardItem::<span class="name">setChild</span> ( <span class="type">int</span> <i>row</i>, <span class="type">QStandardItem</span> * <i>item</i> )</h3>
<p>This is an overloaded function.</p>
<p>Sets the child at <i>row</i> to <i>item</i>.</p>
<!-- @@@setChild -->
<!-- $$$setColumnCount[overload1]$$$setColumnCountint -->
<h3 class="fn"><a name="setColumnCount"></a><span class="type">void</span> QStandardItem::<span class="name">setColumnCount</span> ( <span class="type">int</span> <i>columns</i> )</h3>
<p>Sets the number of child item columns to <i>columns</i>. If this is less than <a href="qstandarditem.html#columnCount">columnCount</a>(), the data in the unwanted columns is discarded.</p>
<p><b>See also </b><a href="qstandarditem.html#columnCount">columnCount</a>() and <a href="qstandarditem.html#setRowCount">setRowCount</a>().</p>
<!-- @@@setColumnCount -->
<!-- $$$setData[overload1]$$$setDataconstQVariant&int -->
<h3 class="fn"><a name="setData"></a><span class="type">void</span> QStandardItem::<span class="name">setData</span> ( const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>value</i>, <span class="type">int</span> <i>role</i> = Qt::UserRole + 1 )<tt> [virtual]</tt></h3>
<p>Sets the item's data for the given <i>role</i> to the specified <i>value</i>.</p>
<p>If you subclass <a href="qstandarditem.html">QStandardItem</a> and reimplement this function, your reimplementation should call <a href="qstandarditem.html#emitDataChanged">emitDataChanged</a>() if you do not call the base implementation of setData(). This will ensure that e.g&#x2e; views using the model are notified of the changes.</p>
<p><b>Note:</b> The default implementation treats <a href="qt.html#ItemDataRole-enum">Qt::EditRole</a> and <a href="qt.html#ItemDataRole-enum">Qt::DisplayRole</a> as referring to the same data.</p>
<p><b>See also </b><a href="qt.html#ItemDataRole-enum">Qt::ItemDataRole</a>, <a href="qstandarditem.html#data">data</a>(), and <a href="qstandarditem.html#setFlags">setFlags</a>().</p>
<!-- @@@setData -->
<!-- $$$setDragEnabled[overload1]$$$setDragEnabledbool -->
<h3 class="fn"><a name="setDragEnabled"></a><span class="type">void</span> QStandardItem::<span class="name">setDragEnabled</span> ( <span class="type">bool</span> <i>dragEnabled</i> )</h3>
<p>Sets whether the item is drag enabled. If <i>dragEnabled</i> is true, the item can be dragged by the user; otherwise, the user cannot drag the item.</p>
<p>Note that you also need to ensure that item dragging is enabled in the view; see <a href="qabstractitemview.html#dragEnabled-prop">QAbstractItemView::dragEnabled</a>.</p>
<p><b>See also </b><a href="qstandarditem.html#isDragEnabled">isDragEnabled</a>(), <a href="qstandarditem.html#setDropEnabled">setDropEnabled</a>(), and <a href="qstandarditem.html#setFlags">setFlags</a>().</p>
<!-- @@@setDragEnabled -->
<!-- $$$setDropEnabled[overload1]$$$setDropEnabledbool -->
<h3 class="fn"><a name="setDropEnabled"></a><span class="type">void</span> QStandardItem::<span class="name">setDropEnabled</span> ( <span class="type">bool</span> <i>dropEnabled</i> )</h3>
<p>Sets whether the item is drop enabled. If <i>dropEnabled</i> is true, the item can be used as a drop target; otherwise, it cannot.</p>
<p>Note that you also need to ensure that drops are enabled in the view; see <a href="qwidget.html#acceptDrops-prop">QWidget::acceptDrops</a>(); and that the model supports the desired drop actions; see <a href="qabstractitemmodel.html#supportedDropActions">QAbstractItemModel::supportedDropActions</a>().</p>
<p><b>See also </b><a href="qstandarditem.html#isDropEnabled">isDropEnabled</a>(), <a href="qstandarditem.html#setDragEnabled">setDragEnabled</a>(), and <a href="qstandarditem.html#setFlags">setFlags</a>().</p>
<!-- @@@setDropEnabled -->
<!-- $$$setEditable[overload1]$$$setEditablebool -->
<h3 class="fn"><a name="setEditable"></a><span class="type">void</span> QStandardItem::<span class="name">setEditable</span> ( <span class="type">bool</span> <i>editable</i> )</h3>
<p>Sets whether the item is editable. If <i>editable</i> is true, the item can be edited by the user; otherwise, the user cannot edit the item.</p>
<p>How the user can edit items in a view is determined by the view's edit triggers; see <a href="qabstractitemview.html#editTriggers-prop">QAbstractItemView::editTriggers</a>.</p>
<p><b>See also </b><a href="qstandarditem.html#isEditable">isEditable</a>() and <a href="qstandarditem.html#setFlags">setFlags</a>().</p>
<!-- @@@setEditable -->
<!-- $$$setEnabled[overload1]$$$setEnabledbool -->
<h3 class="fn"><a name="setEnabled"></a><span class="type">void</span> QStandardItem::<span class="name">setEnabled</span> ( <span class="type">bool</span> <i>enabled</i> )</h3>
<p>Sets whether the item is enabled. If <i>enabled</i> is true, the item is enabled, meaning that the user can interact with the item; if <i>enabled</i> is false, the user cannot interact with the item.</p>
<p>This flag takes precedence over the other item flags; e.g&#x2e; if an item is not enabled, it cannot be selected by the user, even if the <a href="qt.html#ItemFlag-enum">Qt::ItemIsSelectable</a> flag has been set.</p>
<p><b>See also </b><a href="qstandarditem.html#isEnabled">isEnabled</a>(), <a href="qt.html#ItemFlag-enum">Qt::ItemIsEnabled</a>, and <a href="qstandarditem.html#setFlags">setFlags</a>().</p>
<!-- @@@setEnabled -->
<!-- $$$setFlags[overload1]$$$setFlagsQt::ItemFlags -->
<h3 class="fn"><a name="setFlags"></a><span class="type">void</span> QStandardItem::<span class="name">setFlags</span> ( <span class="type"><a href="qt.html#ItemFlag-enum">Qt::ItemFlags</a></span> <i>flags</i> )</h3>
<p>Sets the item flags for the item to <i>flags</i>.</p>
<p>The item flags determine how the user can interact with the item. This is often used to disable an item.</p>
<p><b>See also </b><a href="qstandarditem.html#flags">flags</a>() and <a href="qstandarditem.html#setData">setData</a>().</p>
<!-- @@@setFlags -->
<!-- $$$setFont[overload1]$$$setFontconstQFont& -->
<h3 class="fn"><a name="setFont"></a><span class="type">void</span> QStandardItem::<span class="name">setFont</span> ( const <span class="type"><a href="qfont.html">QFont</a></span> &amp; <i>font</i> )</h3>
<p>Sets the font used to display the item's text to the given <i>font</i>.</p>
<p><b>See also </b><a href="qstandarditem.html#font">font</a>(), <a href="qstandarditem.html#setText">setText</a>(), and <a href="qstandarditem.html#setForeground">setForeground</a>().</p>
<!-- @@@setFont -->
<!-- $$$setForeground[overload1]$$$setForegroundconstQBrush& -->
<h3 class="fn"><a name="setForeground"></a><span class="type">void</span> QStandardItem::<span class="name">setForeground</span> ( const <span class="type"><a href="qbrush.html">QBrush</a></span> &amp; <i>brush</i> )</h3>
<p>Sets the brush used to display the item's foreground (e.g&#x2e; text) to the given <i>brush</i>.</p>
<p><b>See also </b><a href="qstandarditem.html#foreground">foreground</a>(), <a href="qstandarditem.html#setBackground">setBackground</a>(), and <a href="qstandarditem.html#setFont">setFont</a>().</p>
<!-- @@@setForeground -->
<!-- $$$setIcon[overload1]$$$setIconconstQIcon& -->
<h3 class="fn"><a name="setIcon"></a><span class="type">void</span> QStandardItem::<span class="name">setIcon</span> ( const <span class="type"><a href="qicon.html">QIcon</a></span> &amp; <i>icon</i> )</h3>
<p>Sets the item's icon to the <i>icon</i> specified.</p>
<p><b>See also </b><a href="qstandarditem.html#icon">icon</a>().</p>
<!-- @@@setIcon -->
<!-- $$$setRowCount[overload1]$$$setRowCountint -->
<h3 class="fn"><a name="setRowCount"></a><span class="type">void</span> QStandardItem::<span class="name">setRowCount</span> ( <span class="type">int</span> <i>rows</i> )</h3>
<p>Sets the number of child item rows to <i>rows</i>. If this is less than <a href="qstandarditem.html#rowCount">rowCount</a>(), the data in the unwanted rows is discarded.</p>
<p><b>See also </b><a href="qstandarditem.html#rowCount">rowCount</a>() and <a href="qstandarditem.html#setColumnCount">setColumnCount</a>().</p>
<!-- @@@setRowCount -->
<!-- $$$setSelectable[overload1]$$$setSelectablebool -->
<h3 class="fn"><a name="setSelectable"></a><span class="type">void</span> QStandardItem::<span class="name">setSelectable</span> ( <span class="type">bool</span> <i>selectable</i> )</h3>
<p>Sets whether the item is selectable. If <i>selectable</i> is true, the item can be selected by the user; otherwise, the user cannot select the item.</p>
<p>You can control the selection behavior and mode by manipulating their view properties; see <a href="qabstractitemview.html#selectionMode-prop">QAbstractItemView::selectionMode</a> and <a href="qabstractitemview.html#selectionBehavior-prop">QAbstractItemView::selectionBehavior</a>.</p>
<p><b>See also </b><a href="qstandarditem.html#isSelectable">isSelectable</a>() and <a href="qstandarditem.html#setFlags">setFlags</a>().</p>
<!-- @@@setSelectable -->
<!-- $$$setSizeHint[overload1]$$$setSizeHintconstQSize& -->
<h3 class="fn"><a name="setSizeHint"></a><span class="type">void</span> QStandardItem::<span class="name">setSizeHint</span> ( const <span class="type"><a href="qsize.html">QSize</a></span> &amp; <i>size</i> )</h3>
<p>Sets the size hint for the item to be <i>size</i>. If no size hint is set, the item delegate will compute the size hint based on the item data.</p>
<p><b>See also </b><a href="qstandarditem.html#sizeHint">sizeHint</a>().</p>
<!-- @@@setSizeHint -->
<!-- $$$setStatusTip[overload1]$$$setStatusTipconstQString& -->
<h3 class="fn"><a name="setStatusTip"></a><span class="type">void</span> QStandardItem::<span class="name">setStatusTip</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>statusTip</i> )</h3>
<p>Sets the item's status tip to the string specified by <i>statusTip</i>.</p>
<p><b>See also </b><a href="qstandarditem.html#statusTip">statusTip</a>(), <a href="qstandarditem.html#setToolTip">setToolTip</a>(), and <a href="qstandarditem.html#setWhatsThis">setWhatsThis</a>().</p>
<!-- @@@setStatusTip -->
<!-- $$$setText[overload1]$$$setTextconstQString& -->
<h3 class="fn"><a name="setText"></a><span class="type">void</span> QStandardItem::<span class="name">setText</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>text</i> )</h3>
<p>Sets the item's text to the <i>text</i> specified.</p>
<p><b>See also </b><a href="qstandarditem.html#text">text</a>(), <a href="qstandarditem.html#setFont">setFont</a>(), and <a href="qstandarditem.html#setForeground">setForeground</a>().</p>
<!-- @@@setText -->
<!-- $$$setTextAlignment[overload1]$$$setTextAlignmentQt::Alignment -->
<h3 class="fn"><a name="setTextAlignment"></a><span class="type">void</span> QStandardItem::<span class="name">setTextAlignment</span> ( <span class="type"><a href="qt.html#AlignmentFlag-enum">Qt::Alignment</a></span> <i>alignment</i> )</h3>
<p>Sets the text alignment for the item's text to the <i>alignment</i> specified.</p>
<p><b>See also </b><a href="qstandarditem.html#textAlignment">textAlignment</a>().</p>
<!-- @@@setTextAlignment -->
<!-- $$$setToolTip[overload1]$$$setToolTipconstQString& -->
<h3 class="fn"><a name="setToolTip"></a><span class="type">void</span> QStandardItem::<span class="name">setToolTip</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>toolTip</i> )</h3>
<p>Sets the item's tooltip to the string specified by <i>toolTip</i>.</p>
<p><b>See also </b><a href="qstandarditem.html#toolTip">toolTip</a>(), <a href="qstandarditem.html#setStatusTip">setStatusTip</a>(), and <a href="qstandarditem.html#setWhatsThis">setWhatsThis</a>().</p>
<!-- @@@setToolTip -->
<!-- $$$setTristate[overload1]$$$setTristatebool -->
<h3 class="fn"><a name="setTristate"></a><span class="type">void</span> QStandardItem::<span class="name">setTristate</span> ( <span class="type">bool</span> <i>tristate</i> )</h3>
<p>Sets whether the item is tristate. If <i>tristate</i> is true, the item is checkable with three separate states; otherwise, the item is checkable with two states. (Note that this also requires that the item is checkable; see <a href="qstandarditem.html#isCheckable">isCheckable</a>().)</p>
<p><b>See also </b><a href="qstandarditem.html#isTristate">isTristate</a>(), <a href="qstandarditem.html#setCheckable">setCheckable</a>(), and <a href="qstandarditem.html#setCheckState">setCheckState</a>().</p>
<!-- @@@setTristate -->
<!-- $$$setWhatsThis[overload1]$$$setWhatsThisconstQString& -->
<h3 class="fn"><a name="setWhatsThis"></a><span class="type">void</span> QStandardItem::<span class="name">setWhatsThis</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>whatsThis</i> )</h3>
<p>Sets the item's &quot;What's This?&quot; help to the string specified by <i>whatsThis</i>.</p>
<p><b>See also </b><a href="qstandarditem.html#whatsThis">whatsThis</a>(), <a href="qstandarditem.html#setStatusTip">setStatusTip</a>(), and <a href="qstandarditem.html#setToolTip">setToolTip</a>().</p>
<!-- @@@setWhatsThis -->
<!-- $$$sizeHint[overload1]$$$sizeHint -->
<h3 class="fn"><a name="sizeHint"></a><span class="type"><a href="qsize.html">QSize</a></span> QStandardItem::<span class="name">sizeHint</span> () const</h3>
<p>Returns the size hint set for the item, or an invalid <a href="qsize.html">QSize</a> if no size hint has been set.</p>
<p>If no size hint has been set, the item delegate will compute the size hint based on the item data.</p>
<p><b>See also </b><a href="qstandarditem.html#setSizeHint">setSizeHint</a>().</p>
<!-- @@@sizeHint -->
<!-- $$$sortChildren[overload1]$$$sortChildrenintQt::SortOrder -->
<h3 class="fn"><a name="sortChildren"></a><span class="type">void</span> QStandardItem::<span class="name">sortChildren</span> ( <span class="type">int</span> <i>column</i>, <span class="type"><a href="qt.html#SortOrder-enum">Qt::SortOrder</a></span> <i>order</i> = Qt::AscendingOrder )</h3>
<p>Sorts the children of the item using the given <i>order</i>, by the values in the given <i>column</i>.</p>
<p><b>Note:</b> This function is recursive, therefore it sorts the children of the item, its grandchildren, etc.</p>
<p><b>See also </b><a href="qstandarditem.html#operator-lt">operator&lt;</a>().</p>
<!-- @@@sortChildren -->
<!-- $$$statusTip[overload1]$$$statusTip -->
<h3 class="fn"><a name="statusTip"></a><span class="type"><a href="qstring.html">QString</a></span> QStandardItem::<span class="name">statusTip</span> () const</h3>
<p>Returns the item's status tip.</p>
<p><b>See also </b><a href="qstandarditem.html#setStatusTip">setStatusTip</a>(), <a href="qstandarditem.html#toolTip">toolTip</a>(), and <a href="qstandarditem.html#whatsThis">whatsThis</a>().</p>
<!-- @@@statusTip -->
<!-- $$$takeChild[overload1]$$$takeChildintint -->
<h3 class="fn"><a name="takeChild"></a><span class="type">QStandardItem</span> * QStandardItem::<span class="name">takeChild</span> ( <span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>column</i> = 0 )</h3>
<p>Removes the child item at (<i>row</i>, <i>column</i>) without deleting it, and returns a pointer to the item. If there was no child at the given location, then this function returns 0.</p>
<p>Note that this function, unlike <a href="qstandarditem.html#takeRow">takeRow</a>() and <a href="qstandarditem.html#takeColumn">takeColumn</a>(), does not affect the dimensions of the child table.</p>
<p><b>See also </b><a href="qstandarditem.html#child">child</a>(), <a href="qstandarditem.html#takeRow">takeRow</a>(), and <a href="qstandarditem.html#takeColumn">takeColumn</a>().</p>
<!-- @@@takeChild -->
<!-- $$$takeColumn[overload1]$$$takeColumnint -->
<h3 class="fn"><a name="takeColumn"></a><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type">QStandardItem</span> *&gt; QStandardItem::<span class="name">takeColumn</span> ( <span class="type">int</span> <i>column</i> )</h3>
<p>Removes <i>column</i> without deleting the column items, and returns a list of pointers to the removed items. For items in the column that have not been set, the corresponding pointers in the list will be 0.</p>
<p><b>See also </b><a href="qstandarditem.html#removeColumn">removeColumn</a>(), <a href="qstandarditem.html#insertColumn">insertColumn</a>(), and <a href="qstandarditem.html#takeRow">takeRow</a>().</p>
<!-- @@@takeColumn -->
<!-- $$$takeRow[overload1]$$$takeRowint -->
<h3 class="fn"><a name="takeRow"></a><span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type">QStandardItem</span> *&gt; QStandardItem::<span class="name">takeRow</span> ( <span class="type">int</span> <i>row</i> )</h3>
<p>Removes <i>row</i> without deleting the row items, and returns a list of pointers to the removed items. For items in the row that have not been set, the corresponding pointers in the list will be 0.</p>
<p><b>See also </b><a href="qstandarditem.html#removeRow">removeRow</a>(), <a href="qstandarditem.html#insertRow">insertRow</a>(), and <a href="qstandarditem.html#takeColumn">takeColumn</a>().</p>
<!-- @@@takeRow -->
<!-- $$$text[overload1]$$$text -->
<h3 class="fn"><a name="text"></a><span class="type"><a href="qstring.html">QString</a></span> QStandardItem::<span class="name">text</span> () const</h3>
<p>Returns the item's text. This is the text that's presented to the user in a view.</p>
<p><b>See also </b><a href="qstandarditem.html#setText">setText</a>().</p>
<!-- @@@text -->
<!-- $$$textAlignment[overload1]$$$textAlignment -->
<h3 class="fn"><a name="textAlignment"></a><span class="type"><a href="qt.html#AlignmentFlag-enum">Qt::Alignment</a></span> QStandardItem::<span class="name">textAlignment</span> () const</h3>
<p>Returns the text alignment for the item's text.</p>
<p><b>See also </b><a href="qstandarditem.html#setTextAlignment">setTextAlignment</a>().</p>
<!-- @@@textAlignment -->
<!-- $$$toolTip[overload1]$$$toolTip -->
<h3 class="fn"><a name="toolTip"></a><span class="type"><a href="qstring.html">QString</a></span> QStandardItem::<span class="name">toolTip</span> () const</h3>
<p>Returns the item's tooltip.</p>
<p><b>See also </b><a href="qstandarditem.html#setToolTip">setToolTip</a>(), <a href="qstandarditem.html#statusTip">statusTip</a>(), and <a href="qstandarditem.html#whatsThis">whatsThis</a>().</p>
<!-- @@@toolTip -->
<!-- $$$type[overload1]$$$type -->
<h3 class="fn"><a name="type"></a><span class="type">int</span> QStandardItem::<span class="name">type</span> () const<tt> [virtual]</tt></h3>
<p>Returns the type of this item. The type is used to distinguish custom items from the base class. When subclassing <a href="qstandarditem.html">QStandardItem</a>, you should reimplement this function and return a new value greater than or equal to <a href="qstandarditem.html#ItemType-enum">UserType</a>.</p>
<p><b>See also </b><a href="qstandarditem.html#ItemType-enum">QStandardItem::Type</a>.</p>
<!-- @@@type -->
<!-- $$$whatsThis[overload1]$$$whatsThis -->
<h3 class="fn"><a name="whatsThis"></a><span class="type"><a href="qstring.html">QString</a></span> QStandardItem::<span class="name">whatsThis</span> () const</h3>
<p>Returns the item's &quot;What's This?&quot; help.</p>
<p><b>See also </b><a href="qstandarditem.html#setWhatsThis">setWhatsThis</a>(), <a href="qstandarditem.html#toolTip">toolTip</a>(), and <a href="qstandarditem.html#statusTip">statusTip</a>().</p>
<!-- @@@whatsThis -->
<!-- $$$write[overload1]$$$writeQDataStream& -->
<h3 class="fn"><a name="write"></a><span class="type">void</span> QStandardItem::<span class="name">write</span> ( <span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <i>out</i> ) const<tt> [virtual]</tt></h3>
<p>Writes the item to stream <i>out</i>. Only the data and flags of the item are written, not the child items.</p>
<p><b>See also </b><a href="qstandarditem.html#read">read</a>().</p>
<!-- @@@write -->
<!-- $$$operator<[overload1]$$$operator<constQStandardItem& -->
<h3 class="fn"><a name="operator-lt"></a><span class="type">bool</span> QStandardItem::<span class="name">operator&lt;</span> ( const <span class="type">QStandardItem</span> &amp; <i>other</i> ) const<tt> [virtual]</tt></h3>
<p>Returns true if this item is less than <i>other</i>; otherwise returns false.</p>
<p>The default implementation uses the data for the item's sort role (see <a href="qstandarditemmodel.html#sortRole-prop">QStandardItemModel::sortRole</a>) to perform the comparison if the item belongs to a model; otherwise, the data for the item's <a href="qt.html#ItemDataRole-enum">Qt::DisplayRole</a> (<a href="qstandarditem.html#text">text</a>()) is used to perform the comparison.</p>
<p><a href="qstandarditem.html#sortChildren">sortChildren</a>() and <a href="qstandarditemmodel.html#sort">QStandardItemModel::sort</a>() use this function when sorting items. If you want custom sorting, you can subclass <a href="qstandarditem.html">QStandardItem</a> and reimplement this function.</p>
<!-- @@@operator< -->
<!-- $$$operator=[overload1]$$$operator=constQStandardItem& -->
<h3 class="fn"><a name="operator-eq"></a><span class="type">QStandardItem</span> &amp; QStandardItem::<span class="name">operator=</span> ( const <span class="type">QStandardItem</span> &amp; <i>other</i> )<tt> [protected]</tt></h3>
<p>Assigns <i>other</i>'s data and flags to this item. Note that <a href="qstandarditem.html#type">type</a>() and <a href="qstandarditem.html#model">model</a>() are not copied.</p>
<p>This function is useful when reimplementing <a href="qstandarditem.html#clone">clone</a>().</p>
<!-- @@@operator= -->
</div>
<div class="relnonmem">
<h2>Related Non-Members</h2>
<!-- $$$operator<<$$$operator<<QDataStream&constQStandardItem& -->
<h3 class="fn"><a name="operator-lt-lt-52"></a><span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <span class="name">operator&lt;&lt;</span> ( <span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <i>out</i>, const <span class="type">QStandardItem</span> &amp; <i>item</i> )</h3>
<p>Writes the <a href="qstandarditem.html">QStandardItem</a> <i>item</i> to stream <i>out</i>.</p>
<p>This operator uses <a href="qstandarditem.html#write">QStandardItem::write</a>().</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="datastreamformat.html">Serializing Qt Data Types</a>.</p>
<!-- @@@operator<< -->
<!-- $$$operator>>$$$operator>>QDataStream&QStandardItem& -->
<h3 class="fn"><a name="operator-gt-gt-34"></a><span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <span class="name">operator&gt;&gt;</span> ( <span class="type"><a href="qdatastream.html">QDataStream</a></span> &amp; <i>in</i>, <span class="type">QStandardItem</span> &amp; <i>item</i> )</h3>
<p>Reads a <a href="qstandarditem.html">QStandardItem</a> from stream <i>in</i> into <i>item</i>.</p>
<p>This operator uses <a href="qstandarditem.html#read">QStandardItem::read</a>().</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also </b><a href="datastreamformat.html">Serializing Qt Data Types</a>.</p>
<!-- @@@operator>> -->
</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>