Sophie

Sophie

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

qtbase5-doc-5.12.6-2.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qtablewidget.cpp -->
  <title>QTableWidget Class | Qt Widgets 5.12.6</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.12</td><td ><a href="qtwidgets-index.html">Qt Widgets</a></td><td ><a href="qtwidgets-module.html">C++ Classes</a></td><td >QTableWidget</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtwidgets-index.html">Qt 5.12.6 Reference Documentation</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#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="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#reimplemented-protected-functions">Reimplemented Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QTableWidget Class</h1>
<!-- $$$QTableWidget-brief -->
<p>The <a href="qtablewidget.html">QTableWidget</a> class provides an item-based table view with a default model. <a href="#details">More...</a></p>
<!-- @@@QTableWidget -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QTableWidget&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += widgets</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qtableview.html">QTableView</a></td></tr></table></div><ul>
<li><a href="qtablewidget-members.html">List of all members, including inherited members</a></li>
<li><a href="qtablewidget-obsolete.html">Obsolete members</a></li>
</ul>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn"><b><a href="qtablewidget.html#columnCount-prop">columnCount</a></b> : int</li>
<li class="fn"><b><a href="qtablewidget.html#rowCount-prop">rowCount</a></b> : int</li>
</ul>
<ul>
<li class="fn">5 properties inherited from <a href="qtableview.html#properties">QTableView</a></li>
<li class="fn">16 properties inherited from <a href="qabstractitemview.html#properties">QAbstractItemView</a></li>
<li class="fn">3 properties inherited from <a href="qabstractscrollarea.html#properties">QAbstractScrollArea</a></li>
<li class="fn">6 properties inherited from <a href="qframe.html#properties">QFrame</a></li>
<li class="fn">59 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li class="fn">1 property inherited from <a href="../qtcore/qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#QTableWidget">QTableWidget</a></b>(QWidget *<i>parent</i> = nullptr)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#QTableWidget-1">QTableWidget</a></b>(int <i>rows</i>, int <i>columns</i>, QWidget *<i>parent</i> = nullptr)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#dtor.QTableWidget">~QTableWidget</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWidget *</td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#cellWidget">cellWidget</a></b>(int <i>row</i>, int <i>column</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#closePersistentEditor">closePersistentEditor</a></b>(QTableWidgetItem *<i>item</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#column">column</a></b>(const QTableWidgetItem *<i>item</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#columnCount">columnCount</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#currentColumn">currentColumn</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTableWidgetItem *</td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#currentItem">currentItem</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#currentRow">currentRow</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#editItem">editItem</a></b>(QTableWidgetItem *<i>item</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QTableWidgetItem *&gt; </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#findItems">findItems</a></b>(const QString &amp;<i>text</i>, Qt::MatchFlags <i>flags</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTableWidgetItem *</td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#horizontalHeaderItem">horizontalHeaderItem</a></b>(int <i>column</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#isPersistentEditorOpen">isPersistentEditorOpen</a></b>(QTableWidgetItem *<i>item</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTableWidgetItem *</td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#item">item</a></b>(int <i>row</i>, int <i>column</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTableWidgetItem *</td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#itemAt">itemAt</a></b>(const QPoint &amp;<i>point</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTableWidgetItem *</td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#itemAt-1">itemAt</a></b>(int <i>ax</i>, int <i>ay</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QTableWidgetItem *</td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#itemPrototype">itemPrototype</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#openPersistentEditor">openPersistentEditor</a></b>(QTableWidgetItem *<i>item</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#removeCellWidget">removeCellWidget</a></b>(int <i>row</i>, int <i>column</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#row">row</a></b>(const QTableWidgetItem *<i>item</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#rowCount">rowCount</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QTableWidgetItem *&gt; </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#selectedItems">selectedItems</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QTableWidgetSelectionRange&gt; </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#selectedRanges">selectedRanges</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#setCellWidget">setCellWidget</a></b>(int <i>row</i>, int <i>column</i>, QWidget *<i>widget</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#setColumnCount">setColumnCount</a></b>(int <i>columns</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#setCurrentCell">setCurrentCell</a></b>(int <i>row</i>, int <i>column</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#setCurrentCell-1">setCurrentCell</a></b>(int <i>row</i>, int <i>column</i>, QItemSelectionModel::SelectionFlags <i>command</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#setCurrentItem">setCurrentItem</a></b>(QTableWidgetItem *<i>item</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#setCurrentItem-1">setCurrentItem</a></b>(QTableWidgetItem *<i>item</i>, QItemSelectionModel::SelectionFlags <i>command</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#setHorizontalHeaderItem">setHorizontalHeaderItem</a></b>(int <i>column</i>, QTableWidgetItem *<i>item</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#setHorizontalHeaderLabels">setHorizontalHeaderLabels</a></b>(const QStringList &amp;<i>labels</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#setItem">setItem</a></b>(int <i>row</i>, int <i>column</i>, QTableWidgetItem *<i>item</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#setItemPrototype">setItemPrototype</a></b>(const QTableWidgetItem *<i>item</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#setRangeSelected">setRangeSelected</a></b>(const QTableWidgetSelectionRange &amp;<i>range</i>, bool <i>select</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.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="qtablewidget.html#setVerticalHeaderItem">setVerticalHeaderItem</a></b>(int <i>row</i>, QTableWidgetItem *<i>item</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#setVerticalHeaderLabels">setVerticalHeaderLabels</a></b>(const QStringList &amp;<i>labels</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#sortItems">sortItems</a></b>(int <i>column</i>, Qt::SortOrder <i>order</i> = Qt::AscendingOrder)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTableWidgetItem *</td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#takeHorizontalHeaderItem">takeHorizontalHeaderItem</a></b>(int <i>column</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTableWidgetItem *</td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#takeItem">takeItem</a></b>(int <i>row</i>, int <i>column</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTableWidgetItem *</td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#takeVerticalHeaderItem">takeVerticalHeaderItem</a></b>(int <i>row</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTableWidgetItem *</td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#verticalHeaderItem">verticalHeaderItem</a></b>(int <i>row</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#visualColumn">visualColumn</a></b>(int <i>logicalColumn</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QRect </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#visualItemRect">visualItemRect</a></b>(const QTableWidgetItem *<i>item</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#visualRow">visualRow</a></b>(int <i>logicalRow</i>) const</td></tr>
</table></div>
<ul>
<li class="fn">34 public functions inherited from <a href="qtableview.html#public-functions">QTableView</a></li>
<li class="fn">60 public functions inherited from <a href="qabstractitemview.html#public-functions">QAbstractItemView</a></li>
<li class="fn">20 public functions inherited from <a href="qabstractscrollarea.html#public-functions">QAbstractScrollArea</a></li>
<li class="fn">14 public functions inherited from <a href="qframe.html#public-functions">QFrame</a></li>
<li class="fn">214 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li class="fn">31 public functions inherited from <a href="../qtcore/qobject.html#public-functions">QObject</a></li>
<li class="fn">14 public functions inherited from <a href="../qtgui/qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<a name="public-slots"></a>
<h2 id="public-slots">Public Slots</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#clear">clear</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#clearContents">clearContents</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#insertColumn">insertColumn</a></b>(int <i>column</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#insertRow">insertRow</a></b>(int <i>row</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.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="qtablewidget.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="qtablewidget.html#scrollToItem">scrollToItem</a></b>(const QTableWidgetItem *<i>item</i>, QAbstractItemView::ScrollHint <i>hint</i> = EnsureVisible)</td></tr>
</table></div>
<ul>
<li class="fn">11 public slots inherited from <a href="qtableview.html#public-slots">QTableView</a></li>
<li class="fn">9 public slots inherited from <a href="qabstractitemview.html#public-slots">QAbstractItemView</a></li>
<li class="fn">19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
<li class="fn">1 public slot inherited from <a href="../qtcore/qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#cellActivated">cellActivated</a></b>(int <i>row</i>, int <i>column</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#cellChanged">cellChanged</a></b>(int <i>row</i>, int <i>column</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#cellClicked">cellClicked</a></b>(int <i>row</i>, int <i>column</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#cellDoubleClicked">cellDoubleClicked</a></b>(int <i>row</i>, int <i>column</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#cellEntered">cellEntered</a></b>(int <i>row</i>, int <i>column</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#cellPressed">cellPressed</a></b>(int <i>row</i>, int <i>column</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#currentCellChanged">currentCellChanged</a></b>(int <i>currentRow</i>, int <i>currentColumn</i>, int <i>previousRow</i>, int <i>previousColumn</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#currentItemChanged">currentItemChanged</a></b>(QTableWidgetItem *<i>current</i>, QTableWidgetItem *<i>previous</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#itemActivated">itemActivated</a></b>(QTableWidgetItem *<i>item</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#itemChanged">itemChanged</a></b>(QTableWidgetItem *<i>item</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#itemClicked">itemClicked</a></b>(QTableWidgetItem *<i>item</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#itemDoubleClicked">itemDoubleClicked</a></b>(QTableWidgetItem *<i>item</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#itemEntered">itemEntered</a></b>(QTableWidgetItem *<i>item</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#itemPressed">itemPressed</a></b>(QTableWidgetItem *<i>item</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#itemSelectionChanged">itemSelectionChanged</a></b>()</td></tr>
</table></div>
<ul>
<li class="fn">7 signals inherited from <a href="qabstractitemview.html#signals">QAbstractItemView</a></li>
<li class="fn">3 signals inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li class="fn">2 signals inherited from <a href="../qtcore/qobject.html#signals">QObject</a></li>
</ul>
<a name="static-public-members"></a>
<h2 id="static-public-members">Static Public Members</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> const QMetaObject </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#staticMetaObject-var">staticMetaObject</a></b></td></tr>
</table></div>
<ul>
<li class="fn">5 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li class="fn">9 static public members inherited from <a href="../qtcore/qobject.html#static-public-members">QObject</a></li>
</ul>
<a name="protected-functions"></a>
<h2 id="protected-functions">Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#dropMimeData">dropMimeData</a></b>(int <i>row</i>, int <i>column</i>, const QMimeData *<i>data</i>, Qt::DropAction <i>action</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QModelIndex </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#indexFromItem">indexFromItem</a></b>(const QTableWidgetItem *<i>item</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QTableWidgetItem *</td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#itemFromIndex">itemFromIndex</a></b>(const QModelIndex &amp;<i>index</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QTableWidgetItem *&gt; </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#items">items</a></b>(const QMimeData *<i>data</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QMimeData *</td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#mimeData">mimeData</a></b>(const QList&lt;QTableWidgetItem *&gt; <i>items</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QStringList </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#mimeTypes">mimeTypes</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual Qt::DropActions </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#supportedDropActions">supportedDropActions</a></b>() const</td></tr>
</table></div>
<a name="reimplemented-protected-functions"></a>
<h2 id="reimplemented-protected-functions">Reimplemented Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#dropEvent">dropEvent</a></b>(QDropEvent *<i>event</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qtablewidget.html#event">event</a></b>(QEvent *<i>e</i>) override</td></tr>
</table></div>
<ul>
<li class="fn">15 protected functions inherited from <a href="qtableview.html#protected-functions">QTableView</a></li>
<li class="fn">38 protected functions inherited from <a href="qabstractitemview.html#protected-functions">QAbstractItemView</a></li>
<li class="fn">20 protected functions inherited from <a href="qabstractscrollarea.html#protected-functions">QAbstractScrollArea</a></li>
<li class="fn">4 protected functions inherited from <a href="qframe.html#protected-functions">QFrame</a></li>
<li class="fn">35 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li class="fn">9 protected functions inherited from <a href="../qtcore/qobject.html#protected-functions">QObject</a></li>
<li class="fn">1 protected function inherited from <a href="../qtgui/qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">6 protected slots inherited from <a href="qtableview.html#protected-slots">QTableView</a></li>
<li class="fn">9 protected slots inherited from <a href="qabstractitemview.html#protected-slots">QAbstractItemView</a></li>
<li class="fn">1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<a name="details"></a>
<!-- $$$QTableWidget-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qtablewidget.html">QTableWidget</a> class provides an item-based table view with a default model.</p>
<p class="centerAlign"><img src="images/windows-tableview.png" alt="" /></p><p>Table widgets provide standard table display facilities for applications. The items in a <a href="qtablewidget.html">QTableWidget</a> are provided by <a href="qtablewidgetitem.html">QTableWidgetItem</a>.</p>
<p>If you want a table that uses your own data model you should use <a href="qtableview.html">QTableView</a> rather than this class.</p>
<p>Table widgets can be constructed with the required numbers of rows and columns:</p>
<pre class="cpp">

      tableWidget <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qtablewidget.html#QTableWidget">QTableWidget</a></span>(<span class="number">12</span><span class="operator">,</span> <span class="number">3</span><span class="operator">,</span> <span class="keyword">this</span>);

</pre>
<p>Alternatively, tables can be constructed without a given size and resized later:</p>
<pre class="cpp">

      tableWidget <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qtablewidget.html#QTableWidget">QTableWidget</a></span>(<span class="keyword">this</span>);
      tableWidget<span class="operator">-</span><span class="operator">&gt;</span>setRowCount(<span class="number">10</span>);
      tableWidget<span class="operator">-</span><span class="operator">&gt;</span>setColumnCount(<span class="number">5</span>);

</pre>
<p>Items are created outside the table (with no parent widget) and inserted into the table with <a href="qtablewidget.html#setItem">setItem</a>():</p>
<pre class="cpp">

      <span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> <span class="operator">*</span>newItem <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span>(tr(<span class="string">&quot;%1&quot;</span>)<span class="operator">.</span>arg(
          (row<span class="operator">+</span><span class="number">1</span>)<span class="operator">*</span>(column<span class="operator">+</span><span class="number">1</span>)));
      tableWidget<span class="operator">-</span><span class="operator">&gt;</span>setItem(row<span class="operator">,</span> column<span class="operator">,</span> newItem);

</pre>
<p>If you want to enable sorting in your table widget, do so after you have populated it with items, otherwise sorting may interfere with the insertion order (see <a href="qtablewidget.html#setItem">setItem</a>() for details).</p>
<p>Tables can be given both horizontal and vertical headers. The simplest way to create the headers is to supply a list of strings to the <a href="qtablewidget.html#setHorizontalHeaderLabels">setHorizontalHeaderLabels</a>() and <a href="qtablewidget.html#setVerticalHeaderLabels">setVerticalHeaderLabels</a>() functions. These will provide simple textual headers for the table's columns and rows. More sophisticated headers can be created from existing table items that are usually constructed outside the table. For example, we can construct a table item with an icon and aligned text, and use it as the header for a particular column:</p>
<pre class="cpp">

      <span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> <span class="operator">*</span>cubesHeaderItem <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span>(tr(<span class="string">&quot;Cubes&quot;</span>));
      cubesHeaderItem<span class="operator">-</span><span class="operator">&gt;</span>setIcon(<span class="type"><a href="../qtgui/qicon.html">QIcon</a></span>(<span class="type"><a href="../qtgui/qpixmap.html">QPixmap</a></span>(<span class="string">&quot;:/Images/cubed.png&quot;</span>)));
      cubesHeaderItem<span class="operator">-</span><span class="operator">&gt;</span>setTextAlignment(<span class="type">Qt</span><span class="operator">::</span>AlignVCenter);

</pre>
<p>The number of rows in the table can be found with <a href="qtablewidget.html#rowCount">rowCount</a>(), and the number of columns with <a href="qtablewidget.html#columnCount">columnCount</a>(). The table can be cleared with the <a href="qtablewidget.html#clear">clear</a>() function.</p>
</div>
<p><b>See also </b><a href="qtablewidgetitem.html">QTableWidgetItem</a>, <a href="qtableview.html">QTableView</a>, and <a href="model-view-programming.html">Model/View Programming</a>.</p>
<!-- @@@QTableWidget -->
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$columnCount-prop$$$columnCount$$$setColumnCountint -->
<h3 class="fn" id="columnCount-prop"><a name="columnCount-prop"></a><span class="name">columnCount</span> : <span class="type">int</span></h3>
<p>This property holds the number of columns in the table</p>
<p>By default, for a table constructed without row and column counts, this property contains a value of 0.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qtablewidget.html#columnCount">columnCount</a></b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qtablewidget.html#setColumnCount">setColumnCount</a></b></span>(int <i>columns</i>)</td></tr>
</table></div>
<!-- @@@columnCount -->
<!-- $$$rowCount-prop$$$rowCount$$$setRowCountint -->
<h3 class="fn" id="rowCount-prop"><a name="rowCount-prop"></a><span class="name">rowCount</span> : <span class="type">int</span></h3>
<p>This property holds the number of rows in the table</p>
<p>By default, for a table constructed without row and column counts, this property contains a value of 0.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qtablewidget.html#rowCount">rowCount</a></b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qtablewidget.html#setRowCount">setRowCount</a></b></span>(int <i>rows</i>)</td></tr>
</table></div>
<!-- @@@rowCount -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QTableWidget[overload1]$$$QTableWidgetQWidget* -->
<h3 class="fn" id="QTableWidget"><a name="QTableWidget"></a>QTableWidget::<span class="name">QTableWidget</span>(<span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<i>parent</i> = nullptr)</h3>
<p>Creates a new table view with the given <i>parent</i>.</p>
<!-- @@@QTableWidget -->
<!-- $$$QTableWidget$$$QTableWidgetintintQWidget* -->
<h3 class="fn" id="QTableWidget-1"><a name="QTableWidget-1"></a>QTableWidget::<span class="name">QTableWidget</span>(<span class="type">int</span> <i>rows</i>, <span class="type">int</span> <i>columns</i>, <span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<i>parent</i> = nullptr)</h3>
<p>Creates a new table view with the given <i>rows</i> and <i>columns</i>, and with the given <i>parent</i>.</p>
<!-- @@@QTableWidget -->
<!-- $$$~QTableWidget[overload1]$$$~QTableWidget -->
<h3 class="fn" id="dtor.QTableWidget"><a name="dtor.QTableWidget"></a><code>[virtual] </code>QTableWidget::<span class="name">~QTableWidget</span>()</h3>
<p>Destroys this <a href="qtablewidget.html">QTableWidget</a>.</p>
<!-- @@@~QTableWidget -->
<!-- $$$cellActivated[overload1]$$$cellActivatedintint -->
<h3 class="fn" id="cellActivated"><a name="cellActivated"></a><code>[signal] </code><span class="type">void</span> QTableWidget::<span class="name">cellActivated</span>(<span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>column</i>)</h3>
<p>This signal is emitted when the cell specified by <i>row</i> and <i>column</i> has been activated</p>
<p>This function was introduced in  Qt 4.1.</p>
<!-- @@@cellActivated -->
<!-- $$$cellChanged[overload1]$$$cellChangedintint -->
<h3 class="fn" id="cellChanged"><a name="cellChanged"></a><code>[signal] </code><span class="type">void</span> QTableWidget::<span class="name">cellChanged</span>(<span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>column</i>)</h3>
<p>This signal is emitted whenever the data of the item in the cell specified by <i>row</i> and <i>column</i> has changed.</p>
<p>This function was introduced in  Qt 4.1.</p>
<!-- @@@cellChanged -->
<!-- $$$cellClicked[overload1]$$$cellClickedintint -->
<h3 class="fn" id="cellClicked"><a name="cellClicked"></a><code>[signal] </code><span class="type">void</span> QTableWidget::<span class="name">cellClicked</span>(<span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>column</i>)</h3>
<p>This signal is emitted whenever a cell in the table is clicked. The <i>row</i> and <i>column</i> specified is the cell that was clicked.</p>
<p>This function was introduced in  Qt 4.1.</p>
<!-- @@@cellClicked -->
<!-- $$$cellDoubleClicked[overload1]$$$cellDoubleClickedintint -->
<h3 class="fn" id="cellDoubleClicked"><a name="cellDoubleClicked"></a><code>[signal] </code><span class="type">void</span> QTableWidget::<span class="name">cellDoubleClicked</span>(<span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>column</i>)</h3>
<p>This signal is emitted whenever a cell in the table is double clicked. The <i>row</i> and <i>column</i> specified is the cell that was double clicked.</p>
<p>This function was introduced in  Qt 4.1.</p>
<!-- @@@cellDoubleClicked -->
<!-- $$$cellEntered[overload1]$$$cellEnteredintint -->
<h3 class="fn" id="cellEntered"><a name="cellEntered"></a><code>[signal] </code><span class="type">void</span> QTableWidget::<span class="name">cellEntered</span>(<span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>column</i>)</h3>
<p>This signal is emitted when the mouse cursor enters a cell. The cell is specified by <i>row</i> and <i>column</i>.</p>
<p>This signal is only emitted when <a href="qwidget.html#mouseTracking-prop">mouseTracking</a> is turned on, or when a mouse button is pressed while moving into an item.</p>
<p>This function was introduced in  Qt 4.1.</p>
<!-- @@@cellEntered -->
<!-- $$$cellPressed[overload1]$$$cellPressedintint -->
<h3 class="fn" id="cellPressed"><a name="cellPressed"></a><code>[signal] </code><span class="type">void</span> QTableWidget::<span class="name">cellPressed</span>(<span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>column</i>)</h3>
<p>This signal is emitted whenever a cell in the table is pressed. The <i>row</i> and <i>column</i> specified is the cell that was pressed.</p>
<p>This function was introduced in  Qt 4.1.</p>
<!-- @@@cellPressed -->
<!-- $$$cellWidget[overload1]$$$cellWidgetintint -->
<h3 class="fn" id="cellWidget"><a name="cellWidget"></a><span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *QTableWidget::<span class="name">cellWidget</span>(<span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>column</i>) const</h3>
<p>Returns the widget displayed in the cell in the given <i>row</i> and <i>column</i>.</p>
<p><b>Note: </b>The table takes ownership of the widget.</p><p>This function was introduced in  Qt 4.1.</p>
<p><b>See also </b><a href="qtablewidget.html#setCellWidget">setCellWidget</a>().</p>
<!-- @@@cellWidget -->
<!-- $$$clear[overload1]$$$clear -->
<h3 class="fn" id="clear"><a name="clear"></a><code>[slot] </code><span class="type">void</span> QTableWidget::<span class="name">clear</span>()</h3>
<p>Removes all items in the view. This will also remove all selections and headers. If you don't want to remove the headers, use <a href="qtablewidget.html#clearContents">QTableWidget::clearContents</a>(). The table dimensions stay the same.</p>
<!-- @@@clear -->
<!-- $$$clearContents[overload1]$$$clearContents -->
<h3 class="fn" id="clearContents"><a name="clearContents"></a><code>[slot] </code><span class="type">void</span> QTableWidget::<span class="name">clearContents</span>()</h3>
<p>Removes all items not in the headers from the view. This will also remove all selections. The table dimensions stay the same.</p>
<p>This function was introduced in  Qt 4.2.</p>
<!-- @@@clearContents -->
<!-- $$$closePersistentEditor[overload1]$$$closePersistentEditorQTableWidgetItem* -->
<h3 class="fn" id="closePersistentEditor"><a name="closePersistentEditor"></a><span class="type">void</span> QTableWidget::<span class="name">closePersistentEditor</span>(<span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *<i>item</i>)</h3>
<p>Closes the persistent editor for <i>item</i>.</p>
<p><b>See also </b><a href="qtablewidget.html#openPersistentEditor">openPersistentEditor</a>() and <a href="qtablewidget.html#isPersistentEditorOpen">isPersistentEditorOpen</a>().</p>
<!-- @@@closePersistentEditor -->
<!-- $$$column[overload1]$$$columnconstQTableWidgetItem* -->
<h3 class="fn" id="column"><a name="column"></a><span class="type">int</span> QTableWidget::<span class="name">column</span>(const <span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *<i>item</i>) const</h3>
<p>Returns the column for the <i>item</i>.</p>
<!-- @@@column -->
<!-- $$$columnCount -->
<h3 class="fn" id="columnCount"><a name="columnCount"></a><span class="type">int</span> QTableWidget::<span class="name">columnCount</span>() const</h3>
<p>Returns the number of columns.</p>
<p><b>Note:</b> Getter function for property <a href="qtablewidget.html#columnCount-prop">columnCount</a>. </p><p><b>See also </b><a href="qtablewidget.html#setColumnCount">setColumnCount</a>().</p>
<!-- @@@columnCount -->
<!-- $$$currentCellChanged[overload1]$$$currentCellChangedintintintint -->
<h3 class="fn" id="currentCellChanged"><a name="currentCellChanged"></a><code>[signal] </code><span class="type">void</span> QTableWidget::<span class="name">currentCellChanged</span>(<span class="type">int</span> <i>currentRow</i>, <span class="type">int</span> <i>currentColumn</i>, <span class="type">int</span> <i>previousRow</i>, <span class="type">int</span> <i>previousColumn</i>)</h3>
<p>This signal is emitted whenever the current cell changes. The cell specified by <i>previousRow</i> and <i>previousColumn</i> is the cell that previously had the focus, the cell specified by <i>currentRow</i> and <i>currentColumn</i> is the new current cell.</p>
<p>This function was introduced in  Qt 4.1.</p>
<!-- @@@currentCellChanged -->
<!-- $$$currentColumn[overload1]$$$currentColumn -->
<h3 class="fn" id="currentColumn"><a name="currentColumn"></a><span class="type">int</span> QTableWidget::<span class="name">currentColumn</span>() const</h3>
<p>Returns the column of the current item.</p>
<p><b>See also </b><a href="qtablewidget.html#currentRow">currentRow</a>() and <a href="qtablewidget.html#setCurrentCell">setCurrentCell</a>().</p>
<!-- @@@currentColumn -->
<!-- $$$currentItem[overload1]$$$currentItem -->
<h3 class="fn" id="currentItem"><a name="currentItem"></a><span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *QTableWidget::<span class="name">currentItem</span>() const</h3>
<p>Returns the current item.</p>
<p><b>See also </b><a href="qtablewidget.html#setCurrentItem">setCurrentItem</a>().</p>
<!-- @@@currentItem -->
<!-- $$$currentItemChanged[overload1]$$$currentItemChangedQTableWidgetItem*QTableWidgetItem* -->
<h3 class="fn" id="currentItemChanged"><a name="currentItemChanged"></a><code>[signal] </code><span class="type">void</span> QTableWidget::<span class="name">currentItemChanged</span>(<span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *<i>current</i>, <span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *<i>previous</i>)</h3>
<p>This signal is emitted whenever the current item changes. The <i>previous</i> item is the item that previously had the focus, <i>current</i> is the new current item.</p>
<!-- @@@currentItemChanged -->
<!-- $$$currentRow[overload1]$$$currentRow -->
<h3 class="fn" id="currentRow"><a name="currentRow"></a><span class="type">int</span> QTableWidget::<span class="name">currentRow</span>() const</h3>
<p>Returns the row of the current item.</p>
<p><b>See also </b><a href="qtablewidget.html#currentColumn">currentColumn</a>() and <a href="qtablewidget.html#setCurrentCell">setCurrentCell</a>().</p>
<!-- @@@currentRow -->
<!-- $$$dropEvent[overload1]$$$dropEventQDropEvent* -->
<h3 class="fn" id="dropEvent"><a name="dropEvent"></a><code>[override virtual protected] </code><span class="type">void</span> QTableWidget::<span class="name">dropEvent</span>(<span class="type"><a href="../qtgui/qdropevent.html">QDropEvent</a></span> *<i>event</i>)</h3>
<p>Reimplemented from <a href="qabstractitemview.html#dropEvent">QAbstractItemView::dropEvent</a>().</p>
<!-- @@@dropEvent -->
<!-- $$$dropMimeData[overload1]$$$dropMimeDataintintconstQMimeData*Qt::DropAction -->
<h3 class="fn" id="dropMimeData"><a name="dropMimeData"></a><code>[virtual protected] </code><span class="type">bool</span> QTableWidget::<span class="name">dropMimeData</span>(<span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>column</i>, const <span class="type"><a href="../qtcore/qmimedata.html">QMimeData</a></span> *<i>data</i>, <span class="type"><a href="../qtcore/qt.html#DropAction-enum">Qt::DropAction</a></span> <i>action</i>)</h3>
<p>Handles the <i>data</i> supplied by a drag and drop operation that ended with the given <i>action</i> in the given <i>row</i> and <i>column</i>. Returns <code>true</code> if the data and action can be handled by the model; otherwise returns <code>false</code>.</p>
<p><b>See also </b><a href="qtablewidget.html#supportedDropActions">supportedDropActions</a>().</p>
<!-- @@@dropMimeData -->
<!-- $$$editItem[overload1]$$$editItemQTableWidgetItem* -->
<h3 class="fn" id="editItem"><a name="editItem"></a><span class="type">void</span> QTableWidget::<span class="name">editItem</span>(<span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *<i>item</i>)</h3>
<p>Starts editing the <i>item</i> if it is editable.</p>
<!-- @@@editItem -->
<!-- $$$event[overload1]$$$eventQEvent* -->
<h3 class="fn" id="event"><a name="event"></a><code>[override virtual protected] </code><span class="type">bool</span> QTableWidget::<span class="name">event</span>(<span class="type"><a href="../qtcore/qevent.html">QEvent</a></span> *<i>e</i>)</h3>
<p>Reimplemented from <a href="qabstractitemview.html#event">QAbstractItemView::event</a>().</p>
<!-- @@@event -->
<!-- $$$findItems[overload1]$$$findItemsconstQString&Qt::MatchFlags -->
<h3 class="fn" id="findItems"><a name="findItems"></a><span class="type"><a href="../qtcore/qlist.html">QList</a></span>&lt;<span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *&gt; QTableWidget::<span class="name">findItems</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>text</i>, <span class="type"><a href="../qtcore/qt.html#MatchFlag-enum">Qt::MatchFlags</a></span> <i>flags</i>) const</h3>
<p>Finds items that matches the <i>text</i> using the given <i>flags</i>.</p>
<!-- @@@findItems -->
<!-- $$$horizontalHeaderItem[overload1]$$$horizontalHeaderItemint -->
<h3 class="fn" id="horizontalHeaderItem"><a name="horizontalHeaderItem"></a><span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *QTableWidget::<span class="name">horizontalHeaderItem</span>(<span class="type">int</span> <i>column</i>) const</h3>
<p>Returns the horizontal header item for column, <i>column</i>, if one has been set; otherwise returns <code>nullptr</code>.</p>
<p><b>See also </b><a href="qtablewidget.html#setHorizontalHeaderItem">setHorizontalHeaderItem</a>().</p>
<!-- @@@horizontalHeaderItem -->
<!-- $$$indexFromItem[overload1]$$$indexFromItemconstQTableWidgetItem* -->
<h3 class="fn" id="indexFromItem"><a name="indexFromItem"></a><code>[protected] </code><span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> QTableWidget::<span class="name">indexFromItem</span>(const <span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *<i>item</i>) const</h3>
<p>Returns the <a href="../qtcore/qmodelindex.html">QModelIndex</a> associated with the given <i>item</i>.</p>
<p><b>Note: </b>In Qt versions prior to 5.10, this function took a non-<code>const</code> <i>item</i>.</p><!-- @@@indexFromItem -->
<!-- $$$insertColumn[overload1]$$$insertColumnint -->
<h3 class="fn" id="insertColumn"><a name="insertColumn"></a><code>[slot] </code><span class="type">void</span> QTableWidget::<span class="name">insertColumn</span>(<span class="type">int</span> <i>column</i>)</h3>
<p>Inserts an empty column into the table at <i>column</i>.</p>
<!-- @@@insertColumn -->
<!-- $$$insertRow[overload1]$$$insertRowint -->
<h3 class="fn" id="insertRow"><a name="insertRow"></a><code>[slot] </code><span class="type">void</span> QTableWidget::<span class="name">insertRow</span>(<span class="type">int</span> <i>row</i>)</h3>
<p>Inserts an empty row into the table at <i>row</i>.</p>
<!-- @@@insertRow -->
<!-- $$$isPersistentEditorOpen[overload1]$$$isPersistentEditorOpenQTableWidgetItem* -->
<h3 class="fn" id="isPersistentEditorOpen"><a name="isPersistentEditorOpen"></a><span class="type">bool</span> QTableWidget::<span class="name">isPersistentEditorOpen</span>(<span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *<i>item</i>) const</h3>
<p>Returns whether a persistent editor is open for item <i>item</i>.</p>
<p>This function was introduced in  Qt 5.10.</p>
<p><b>See also </b><a href="qtablewidget.html#openPersistentEditor">openPersistentEditor</a>() and <a href="qtablewidget.html#closePersistentEditor">closePersistentEditor</a>().</p>
<!-- @@@isPersistentEditorOpen -->
<!-- $$$item[overload1]$$$itemintint -->
<h3 class="fn" id="item"><a name="item"></a><span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *QTableWidget::<span class="name">item</span>(<span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>column</i>) const</h3>
<p>Returns the item for the given <i>row</i> and <i>column</i> if one has been set; otherwise returns <code>nullptr</code>.</p>
<p><b>See also </b><a href="qtablewidget.html#setItem">setItem</a>().</p>
<!-- @@@item -->
<!-- $$$itemActivated[overload1]$$$itemActivatedQTableWidgetItem* -->
<h3 class="fn" id="itemActivated"><a name="itemActivated"></a><code>[signal] </code><span class="type">void</span> QTableWidget::<span class="name">itemActivated</span>(<span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *<i>item</i>)</h3>
<p>This signal is emitted when the specified <i>item</i> has been activated</p>
<!-- @@@itemActivated -->
<!-- $$$itemAt[overload1]$$$itemAtconstQPoint& -->
<h3 class="fn" id="itemAt"><a name="itemAt"></a><span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *QTableWidget::<span class="name">itemAt</span>(const <span class="type"><a href="../qtcore/qpoint.html">QPoint</a></span> &amp;<i>point</i>) const</h3>
<p>Returns a pointer to the item at the given <i>point</i>, or returns <code>nullptr</code> if <i>point</i> is not covered by an item in the table widget.</p>
<p><b>See also </b><a href="qtablewidget.html#item">item</a>().</p>
<!-- @@@itemAt -->
<!-- $$$itemAt$$$itemAtintint -->
<h3 class="fn" id="itemAt-1"><a name="itemAt-1"></a><span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *QTableWidget::<span class="name">itemAt</span>(<span class="type">int</span> <i>ax</i>, <span class="type">int</span> <i>ay</i>) const</h3>
<p>Returns the item at the position equivalent to <a href="../qtcore/qpoint.html">QPoint</a>(<i>ax</i>, <i>ay</i>) in the table widget's coordinate system, or returns <code>nullptr</code> if the specified point is not covered by an item in the table widget.</p>
<p><b>See also </b><a href="qtablewidget.html#item">item</a>().</p>
<!-- @@@itemAt -->
<!-- $$$itemChanged[overload1]$$$itemChangedQTableWidgetItem* -->
<h3 class="fn" id="itemChanged"><a name="itemChanged"></a><code>[signal] </code><span class="type">void</span> QTableWidget::<span class="name">itemChanged</span>(<span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *<i>item</i>)</h3>
<p>This signal is emitted whenever the data of <i>item</i> has changed.</p>
<!-- @@@itemChanged -->
<!-- $$$itemClicked[overload1]$$$itemClickedQTableWidgetItem* -->
<h3 class="fn" id="itemClicked"><a name="itemClicked"></a><code>[signal] </code><span class="type">void</span> QTableWidget::<span class="name">itemClicked</span>(<span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *<i>item</i>)</h3>
<p>This signal is emitted whenever an item in the table is clicked. The <i>item</i> specified is the item that was clicked.</p>
<!-- @@@itemClicked -->
<!-- $$$itemDoubleClicked[overload1]$$$itemDoubleClickedQTableWidgetItem* -->
<h3 class="fn" id="itemDoubleClicked"><a name="itemDoubleClicked"></a><code>[signal] </code><span class="type">void</span> QTableWidget::<span class="name">itemDoubleClicked</span>(<span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *<i>item</i>)</h3>
<p>This signal is emitted whenever an item in the table is double clicked. The <i>item</i> specified is the item that was double clicked.</p>
<!-- @@@itemDoubleClicked -->
<!-- $$$itemEntered[overload1]$$$itemEnteredQTableWidgetItem* -->
<h3 class="fn" id="itemEntered"><a name="itemEntered"></a><code>[signal] </code><span class="type">void</span> QTableWidget::<span class="name">itemEntered</span>(<span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *<i>item</i>)</h3>
<p>This signal is emitted when the mouse cursor enters an item. The <i>item</i> is the item entered.</p>
<p>This signal is only emitted when <a href="qwidget.html#mouseTracking-prop">mouseTracking</a> is turned on, or when a mouse button is pressed while moving into an item.</p>
<!-- @@@itemEntered -->
<!-- $$$itemFromIndex[overload1]$$$itemFromIndexconstQModelIndex& -->
<h3 class="fn" id="itemFromIndex"><a name="itemFromIndex"></a><code>[protected] </code><span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *QTableWidget::<span class="name">itemFromIndex</span>(const <span class="type"><a href="../qtcore/qmodelindex.html">QModelIndex</a></span> &amp;<i>index</i>) const</h3>
<p>Returns a pointer to the <a href="qtablewidgetitem.html">QTableWidgetItem</a> associated with the given <i>index</i>.</p>
<!-- @@@itemFromIndex -->
<!-- $$$itemPressed[overload1]$$$itemPressedQTableWidgetItem* -->
<h3 class="fn" id="itemPressed"><a name="itemPressed"></a><code>[signal] </code><span class="type">void</span> QTableWidget::<span class="name">itemPressed</span>(<span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *<i>item</i>)</h3>
<p>This signal is emitted whenever an item in the table is pressed. The <i>item</i> specified is the item that was pressed.</p>
<!-- @@@itemPressed -->
<!-- $$$itemPrototype[overload1]$$$itemPrototype -->
<h3 class="fn" id="itemPrototype"><a name="itemPrototype"></a>const <span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *QTableWidget::<span class="name">itemPrototype</span>() const</h3>
<p>Returns the item prototype used by the table.</p>
<p><b>See also </b><a href="qtablewidget.html#setItemPrototype">setItemPrototype</a>().</p>
<!-- @@@itemPrototype -->
<!-- $$$itemSelectionChanged[overload1]$$$itemSelectionChanged -->
<h3 class="fn" id="itemSelectionChanged"><a name="itemSelectionChanged"></a><code>[signal] </code><span class="type">void</span> QTableWidget::<span class="name">itemSelectionChanged</span>()</h3>
<p>This signal is emitted whenever the selection changes.</p>
<p><b>See also </b><a href="qtablewidget.html#selectedItems">selectedItems</a>() and <a href="qtablewidgetitem.html#isSelected">QTableWidgetItem::isSelected</a>().</p>
<!-- @@@itemSelectionChanged -->
<!-- $$$items[overload1]$$$itemsconstQMimeData* -->
<h3 class="fn" id="items"><a name="items"></a><code>[protected] </code><span class="type"><a href="../qtcore/qlist.html">QList</a></span>&lt;<span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *&gt; QTableWidget::<span class="name">items</span>(const <span class="type"><a href="../qtcore/qmimedata.html">QMimeData</a></span> *<i>data</i>) const</h3>
<p>Returns a list of pointers to the items contained in the <i>data</i> object. If the object was not created by a <a href="qtreewidget.html">QTreeWidget</a> in the same process, the list is empty.</p>
<!-- @@@items -->
<!-- $$$mimeData[overload1]$$$mimeDataconstQList<QTableWidgetItem*> -->
<h3 class="fn" id="mimeData"><a name="mimeData"></a><code>[virtual protected] </code><span class="type"><a href="../qtcore/qmimedata.html">QMimeData</a></span> *QTableWidget::<span class="name">mimeData</span>(const <span class="type"><a href="../qtcore/qlist.html">QList</a></span>&lt;<span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *&gt; <i>items</i>) const</h3>
<p>Returns an object that contains a serialized description of the specified <i>items</i>. The format used to describe the items is obtained from the <a href="qtablewidget.html#mimeTypes">mimeTypes</a>() function.</p>
<p>If the list of items is empty, 0 is returned rather than a serialized empty list.</p>
<!-- @@@mimeData -->
<!-- $$$mimeTypes[overload1]$$$mimeTypes -->
<h3 class="fn" id="mimeTypes"><a name="mimeTypes"></a><code>[virtual protected] </code><span class="type"><a href="../qtcore/qstringlist.html">QStringList</a></span> QTableWidget::<span class="name">mimeTypes</span>() const</h3>
<p>Returns a list of MIME types that can be used to describe a list of tablewidget items.</p>
<p><b>See also </b><a href="qtablewidget.html#mimeData">mimeData</a>().</p>
<!-- @@@mimeTypes -->
<!-- $$$openPersistentEditor[overload1]$$$openPersistentEditorQTableWidgetItem* -->
<h3 class="fn" id="openPersistentEditor"><a name="openPersistentEditor"></a><span class="type">void</span> QTableWidget::<span class="name">openPersistentEditor</span>(<span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *<i>item</i>)</h3>
<p>Opens an editor for the give <i>item</i>. The editor remains open after editing.</p>
<p><b>See also </b><a href="qtablewidget.html#closePersistentEditor">closePersistentEditor</a>() and <a href="qtablewidget.html#isPersistentEditorOpen">isPersistentEditorOpen</a>().</p>
<!-- @@@openPersistentEditor -->
<!-- $$$removeCellWidget[overload1]$$$removeCellWidgetintint -->
<h3 class="fn" id="removeCellWidget"><a name="removeCellWidget"></a><span class="type">void</span> QTableWidget::<span class="name">removeCellWidget</span>(<span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>column</i>)</h3>
<p>Removes the widget set on the cell indicated by <i>row</i> and <i>column</i>.</p>
<p>This function was introduced in  Qt 4.3.</p>
<!-- @@@removeCellWidget -->
<!-- $$$removeColumn[overload1]$$$removeColumnint -->
<h3 class="fn" id="removeColumn"><a name="removeColumn"></a><code>[slot] </code><span class="type">void</span> QTableWidget::<span class="name">removeColumn</span>(<span class="type">int</span> <i>column</i>)</h3>
<p>Removes the column <i>column</i> and all its items from the table.</p>
<!-- @@@removeColumn -->
<!-- $$$removeRow[overload1]$$$removeRowint -->
<h3 class="fn" id="removeRow"><a name="removeRow"></a><code>[slot] </code><span class="type">void</span> QTableWidget::<span class="name">removeRow</span>(<span class="type">int</span> <i>row</i>)</h3>
<p>Removes the row <i>row</i> and all its items from the table.</p>
<!-- @@@removeRow -->
<!-- $$$row[overload1]$$$rowconstQTableWidgetItem* -->
<h3 class="fn" id="row"><a name="row"></a><span class="type">int</span> QTableWidget::<span class="name">row</span>(const <span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *<i>item</i>) const</h3>
<p>Returns the row for the <i>item</i>.</p>
<!-- @@@row -->
<!-- $$$rowCount -->
<h3 class="fn" id="rowCount"><a name="rowCount"></a><span class="type">int</span> QTableWidget::<span class="name">rowCount</span>() const</h3>
<p>Returns the number of rows.</p>
<p><b>Note:</b> Getter function for property <a href="qtablewidget.html#rowCount-prop">rowCount</a>. </p><p><b>See also </b><a href="qtablewidget.html#setRowCount">setRowCount</a>().</p>
<!-- @@@rowCount -->
<!-- $$$scrollToItem[overload1]$$$scrollToItemconstQTableWidgetItem*QAbstractItemView::ScrollHint -->
<h3 class="fn" id="scrollToItem"><a name="scrollToItem"></a><code>[slot] </code><span class="type">void</span> QTableWidget::<span class="name">scrollToItem</span>(const <span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *<i>item</i>, <span class="type"><a href="qabstractitemview.html#ScrollHint-enum">QAbstractItemView::ScrollHint</a></span> <i>hint</i> = EnsureVisible)</h3>
<p>Scrolls the view if necessary to ensure that the <i>item</i> is visible. The <i>hint</i> parameter specifies more precisely where the <i>item</i> should be located after the operation.</p>
<!-- @@@scrollToItem -->
<!-- $$$selectedItems[overload1]$$$selectedItems -->
<h3 class="fn" id="selectedItems"><a name="selectedItems"></a><span class="type"><a href="../qtcore/qlist.html">QList</a></span>&lt;<span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *&gt; QTableWidget::<span class="name">selectedItems</span>() const</h3>
<p>Returns a list of all selected items.</p>
<p>This function returns a list of pointers to the contents of the selected cells. Use the <a href="qtableview.html#selectedIndexes">selectedIndexes</a>() function to retrieve the complete selection <i>including</i> empty cells.</p>
<p><b>See also </b><a href="qtableview.html#selectedIndexes">selectedIndexes</a>().</p>
<!-- @@@selectedItems -->
<!-- $$$selectedRanges[overload1]$$$selectedRanges -->
<h3 class="fn" id="selectedRanges"><a name="selectedRanges"></a><span class="type"><a href="../qtcore/qlist.html">QList</a></span>&lt;<span class="type"><a href="qtablewidgetselectionrange.html">QTableWidgetSelectionRange</a></span>&gt; QTableWidget::<span class="name">selectedRanges</span>() const</h3>
<p>Returns a list of all selected ranges.</p>
<p><b>See also </b><a href="qtablewidgetselectionrange.html">QTableWidgetSelectionRange</a>.</p>
<!-- @@@selectedRanges -->
<!-- $$$setCellWidget[overload1]$$$setCellWidgetintintQWidget* -->
<h3 class="fn" id="setCellWidget"><a name="setCellWidget"></a><span class="type">void</span> QTableWidget::<span class="name">setCellWidget</span>(<span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>column</i>, <span class="type"><a href="qwidget.html#QWidget">QWidget</a></span> *<i>widget</i>)</h3>
<p>Sets the given <i>widget</i> to be displayed in the cell in the given <i>row</i> and <i>column</i>, passing the ownership of the widget to the table.</p>
<p>If cell widget A is replaced with cell widget B, cell widget A will be deleted. For example, in the code snippet below, the <a href="qlineedit.html">QLineEdit</a> object will be deleted.</p>
<pre class="cpp">

  setCellWidget(row<span class="operator">,</span> column<span class="operator">,</span> <span class="keyword">new</span> <span class="type"><a href="qlineedit.html">QLineEdit</a></span>);
  <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
  setCellWidget(row<span class="operator">,</span> column<span class="operator">,</span> <span class="keyword">new</span> <span class="type"><a href="qtextedit.html">QTextEdit</a></span>);

</pre>
<p>This function was introduced in  Qt 4.1.</p>
<p><b>See also </b><a href="qtablewidget.html#cellWidget">cellWidget</a>().</p>
<!-- @@@setCellWidget -->
<!-- $$$setColumnCount -->
<h3 class="fn" id="setColumnCount"><a name="setColumnCount"></a><span class="type">void</span> QTableWidget::<span class="name">setColumnCount</span>(<span class="type">int</span> <i>columns</i>)</h3>
<p>Sets the number of columns in this table's model to <i>columns</i>. If this is less than <a href="qtablewidget.html#columnCount">columnCount</a>(), the data in the unwanted columns is discarded.</p>
<p><b>Note:</b> Setter function for property <a href="qtablewidget.html#columnCount-prop">columnCount</a>. </p><p><b>See also </b><a href="qtablewidget.html#columnCount">columnCount</a>() and <a href="qtablewidget.html#setRowCount">setRowCount</a>().</p>
<!-- @@@setColumnCount -->
<!-- $$$setCurrentCell[overload1]$$$setCurrentCellintint -->
<h3 class="fn" id="setCurrentCell"><a name="setCurrentCell"></a><span class="type">void</span> QTableWidget::<span class="name">setCurrentCell</span>(<span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>column</i>)</h3>
<p>Sets the current cell to be the cell at position (<i>row</i>, <i>column</i>).</p>
<p>Depending on the current <a href="qabstractitemview.html#SelectionMode-enum">selection mode</a>, the cell may also be selected.</p>
<p>This function was introduced in  Qt 4.1.</p>
<p><b>See also </b><a href="qtablewidget.html#setCurrentItem">setCurrentItem</a>(), <a href="qtablewidget.html#currentRow">currentRow</a>(), and <a href="qtablewidget.html#currentColumn">currentColumn</a>().</p>
<!-- @@@setCurrentCell -->
<!-- $$$setCurrentCell$$$setCurrentCellintintQItemSelectionModel::SelectionFlags -->
<h3 class="fn" id="setCurrentCell-1"><a name="setCurrentCell-1"></a><span class="type">void</span> QTableWidget::<span class="name">setCurrentCell</span>(<span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>column</i>, <span class="type"><a href="../qtcore/qitemselectionmodel.html#SelectionFlag-enum">QItemSelectionModel::SelectionFlags</a></span> <i>command</i>)</h3>
<p>Sets the current cell to be the cell at position (<i>row</i>, <i>column</i>), using the given <i>command</i>.</p>
<p>This function was introduced in  Qt 4.4.</p>
<p><b>See also </b><a href="qtablewidget.html#setCurrentItem">setCurrentItem</a>(), <a href="qtablewidget.html#currentRow">currentRow</a>(), and <a href="qtablewidget.html#currentColumn">currentColumn</a>().</p>
<!-- @@@setCurrentCell -->
<!-- $$$setCurrentItem[overload1]$$$setCurrentItemQTableWidgetItem* -->
<h3 class="fn" id="setCurrentItem"><a name="setCurrentItem"></a><span class="type">void</span> QTableWidget::<span class="name">setCurrentItem</span>(<span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *<i>item</i>)</h3>
<p>Sets the current item to <i>item</i>.</p>
<p>Unless the selection mode is <a href="qabstractitemview.html#SelectionMode-enum">NoSelection</a>, the item is also selected.</p>
<p><b>See also </b><a href="qtablewidget.html#currentItem">currentItem</a>() and <a href="qtablewidget.html#setCurrentCell">setCurrentCell</a>().</p>
<!-- @@@setCurrentItem -->
<!-- $$$setCurrentItem$$$setCurrentItemQTableWidgetItem*QItemSelectionModel::SelectionFlags -->
<h3 class="fn" id="setCurrentItem-1"><a name="setCurrentItem-1"></a><span class="type">void</span> QTableWidget::<span class="name">setCurrentItem</span>(<span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *<i>item</i>, <span class="type"><a href="../qtcore/qitemselectionmodel.html#SelectionFlag-enum">QItemSelectionModel::SelectionFlags</a></span> <i>command</i>)</h3>
<p>Sets the current item to be <i>item</i>, using the given <i>command</i>.</p>
<p>This function was introduced in  Qt 4.4.</p>
<p><b>See also </b><a href="qtablewidget.html#currentItem">currentItem</a>() and <a href="qtablewidget.html#setCurrentCell">setCurrentCell</a>().</p>
<!-- @@@setCurrentItem -->
<!-- $$$setHorizontalHeaderItem[overload1]$$$setHorizontalHeaderItemintQTableWidgetItem* -->
<h3 class="fn" id="setHorizontalHeaderItem"><a name="setHorizontalHeaderItem"></a><span class="type">void</span> QTableWidget::<span class="name">setHorizontalHeaderItem</span>(<span class="type">int</span> <i>column</i>, <span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *<i>item</i>)</h3>
<p>Sets the horizontal header item for column <i>column</i> to <i>item</i>. If necessary, the column count is increased to fit the item. The previous header item (if there was one) is deleted.</p>
<p><b>See also </b><a href="qtablewidget.html#horizontalHeaderItem">horizontalHeaderItem</a>().</p>
<!-- @@@setHorizontalHeaderItem -->
<!-- $$$setHorizontalHeaderLabels[overload1]$$$setHorizontalHeaderLabelsconstQStringList& -->
<h3 class="fn" id="setHorizontalHeaderLabels"><a name="setHorizontalHeaderLabels"></a><span class="type">void</span> QTableWidget::<span class="name">setHorizontalHeaderLabels</span>(const <span class="type"><a href="../qtcore/qstringlist.html">QStringList</a></span> &amp;<i>labels</i>)</h3>
<p>Sets the horizontal header labels using <i>labels</i>.</p>
<!-- @@@setHorizontalHeaderLabels -->
<!-- $$$setItem[overload1]$$$setItemintintQTableWidgetItem* -->
<h3 class="fn" id="setItem"><a name="setItem"></a><span class="type">void</span> QTableWidget::<span class="name">setItem</span>(<span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>column</i>, <span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *<i>item</i>)</h3>
<p>Sets the item for the given <i>row</i> and <i>column</i> to <i>item</i>.</p>
<p>The table takes ownership of the item.</p>
<p>Note that if sorting is enabled (see <a href="qtableview.html#sortingEnabled-prop">sortingEnabled</a>) and <i>column</i> is the current sort column, the <i>row</i> will be moved to the sorted position determined by <i>item</i>.</p>
<p>If you want to set several items of a particular row (say, by calling setItem() in a loop), you may want to turn off sorting before doing so, and turn it back on afterwards; this will allow you to use the same <i>row</i> argument for all items in the same row (i.e&#x2e; setItem() will not move the row).</p>
<p><b>See also </b><a href="qtablewidget.html#item">item</a>() and <a href="qtablewidget.html#takeItem">takeItem</a>().</p>
<!-- @@@setItem -->
<!-- $$$setItemPrototype[overload1]$$$setItemPrototypeconstQTableWidgetItem* -->
<h3 class="fn" id="setItemPrototype"><a name="setItemPrototype"></a><span class="type">void</span> QTableWidget::<span class="name">setItemPrototype</span>(const <span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *<i>item</i>)</h3>
<p>Sets the item prototype for the table to the specified <i>item</i>.</p>
<p>The table widget will use the item prototype clone function when it needs to create a new table item. For example when the user is editing in an empty cell. This is useful when you have a <a href="qtablewidgetitem.html">QTableWidgetItem</a> subclass and want to make sure that <a href="qtablewidget.html">QTableWidget</a> creates instances of your subclass.</p>
<p>The table takes ownership of the prototype.</p>
<p><b>See also </b><a href="qtablewidget.html#itemPrototype">itemPrototype</a>().</p>
<!-- @@@setItemPrototype -->
<!-- $$$setRangeSelected[overload1]$$$setRangeSelectedconstQTableWidgetSelectionRange&bool -->
<h3 class="fn" id="setRangeSelected"><a name="setRangeSelected"></a><span class="type">void</span> QTableWidget::<span class="name">setRangeSelected</span>(const <span class="type"><a href="qtablewidgetselectionrange.html">QTableWidgetSelectionRange</a></span> &amp;<i>range</i>, <span class="type">bool</span> <i>select</i>)</h3>
<p>Selects or deselects the <i>range</i> depending on <i>select</i>.</p>
<!-- @@@setRangeSelected -->
<!-- $$$setRowCount -->
<h3 class="fn" id="setRowCount"><a name="setRowCount"></a><span class="type">void</span> QTableWidget::<span class="name">setRowCount</span>(<span class="type">int</span> <i>rows</i>)</h3>
<p>Sets the number of rows in this table's model to <i>rows</i>. If this is less than <a href="qtablewidget.html#rowCount">rowCount</a>(), the data in the unwanted rows is discarded.</p>
<p><b>Note:</b> Setter function for property <a href="qtablewidget.html#rowCount-prop">rowCount</a>. </p><p><b>See also </b><a href="qtablewidget.html#rowCount">rowCount</a>() and <a href="qtablewidget.html#setColumnCount">setColumnCount</a>().</p>
<!-- @@@setRowCount -->
<!-- $$$setVerticalHeaderItem[overload1]$$$setVerticalHeaderItemintQTableWidgetItem* -->
<h3 class="fn" id="setVerticalHeaderItem"><a name="setVerticalHeaderItem"></a><span class="type">void</span> QTableWidget::<span class="name">setVerticalHeaderItem</span>(<span class="type">int</span> <i>row</i>, <span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *<i>item</i>)</h3>
<p>Sets the vertical header item for row <i>row</i> to <i>item</i>.</p>
<p><b>See also </b><a href="qtablewidget.html#verticalHeaderItem">verticalHeaderItem</a>().</p>
<!-- @@@setVerticalHeaderItem -->
<!-- $$$setVerticalHeaderLabels[overload1]$$$setVerticalHeaderLabelsconstQStringList& -->
<h3 class="fn" id="setVerticalHeaderLabels"><a name="setVerticalHeaderLabels"></a><span class="type">void</span> QTableWidget::<span class="name">setVerticalHeaderLabels</span>(const <span class="type"><a href="../qtcore/qstringlist.html">QStringList</a></span> &amp;<i>labels</i>)</h3>
<p>Sets the vertical header labels using <i>labels</i>.</p>
<!-- @@@setVerticalHeaderLabels -->
<!-- $$$sortItems[overload1]$$$sortItemsintQt::SortOrder -->
<h3 class="fn" id="sortItems"><a name="sortItems"></a><span class="type">void</span> QTableWidget::<span class="name">sortItems</span>(<span class="type">int</span> <i>column</i>, <span class="type"><a href="../qtcore/qt.html#SortOrder-enum">Qt::SortOrder</a></span> <i>order</i> = Qt::AscendingOrder)</h3>
<p>Sorts all the rows in the table widget based on <i>column</i> and <i>order</i>.</p>
<!-- @@@sortItems -->
<!-- $$$supportedDropActions[overload1]$$$supportedDropActions -->
<h3 class="fn" id="supportedDropActions"><a name="supportedDropActions"></a><code>[virtual protected] </code><span class="type"><a href="../qtcore/qt.html#DropAction-enum">Qt::DropActions</a></span> QTableWidget::<span class="name">supportedDropActions</span>() const</h3>
<p>Returns the drop actions supported by this view.</p>
<p><b>See also </b><a href="../qtcore/qt.html#DropAction-enum">Qt::DropActions</a>.</p>
<!-- @@@supportedDropActions -->
<!-- $$$takeHorizontalHeaderItem[overload1]$$$takeHorizontalHeaderItemint -->
<h3 class="fn" id="takeHorizontalHeaderItem"><a name="takeHorizontalHeaderItem"></a><span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *QTableWidget::<span class="name">takeHorizontalHeaderItem</span>(<span class="type">int</span> <i>column</i>)</h3>
<p>Removes the horizontal header item at <i>column</i> from the header without deleting it.</p>
<p>This function was introduced in  Qt 4.1.</p>
<!-- @@@takeHorizontalHeaderItem -->
<!-- $$$takeItem[overload1]$$$takeItemintint -->
<h3 class="fn" id="takeItem"><a name="takeItem"></a><span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *QTableWidget::<span class="name">takeItem</span>(<span class="type">int</span> <i>row</i>, <span class="type">int</span> <i>column</i>)</h3>
<p>Removes the item at <i>row</i> and <i>column</i> from the table without deleting it.</p>
<!-- @@@takeItem -->
<!-- $$$takeVerticalHeaderItem[overload1]$$$takeVerticalHeaderItemint -->
<h3 class="fn" id="takeVerticalHeaderItem"><a name="takeVerticalHeaderItem"></a><span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *QTableWidget::<span class="name">takeVerticalHeaderItem</span>(<span class="type">int</span> <i>row</i>)</h3>
<p>Removes the vertical header item at <i>row</i> from the header without deleting it.</p>
<p>This function was introduced in  Qt 4.1.</p>
<!-- @@@takeVerticalHeaderItem -->
<!-- $$$verticalHeaderItem[overload1]$$$verticalHeaderItemint -->
<h3 class="fn" id="verticalHeaderItem"><a name="verticalHeaderItem"></a><span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *QTableWidget::<span class="name">verticalHeaderItem</span>(<span class="type">int</span> <i>row</i>) const</h3>
<p>Returns the vertical header item for row <i>row</i>.</p>
<p><b>See also </b><a href="qtablewidget.html#setVerticalHeaderItem">setVerticalHeaderItem</a>().</p>
<!-- @@@verticalHeaderItem -->
<!-- $$$visualColumn[overload1]$$$visualColumnint -->
<h3 class="fn" id="visualColumn"><a name="visualColumn"></a><span class="type">int</span> QTableWidget::<span class="name">visualColumn</span>(<span class="type">int</span> <i>logicalColumn</i>) const</h3>
<p>Returns the visual column of the given <i>logicalColumn</i>.</p>
<!-- @@@visualColumn -->
<!-- $$$visualItemRect[overload1]$$$visualItemRectconstQTableWidgetItem* -->
<h3 class="fn" id="visualItemRect"><a name="visualItemRect"></a><span class="type"><a href="../qtcore/qrect.html">QRect</a></span> QTableWidget::<span class="name">visualItemRect</span>(const <span class="type"><a href="qtablewidgetitem.html">QTableWidgetItem</a></span> *<i>item</i>) const</h3>
<p>Returns the rectangle on the viewport occupied by the item at <i>item</i>.</p>
<!-- @@@visualItemRect -->
<!-- $$$visualRow[overload1]$$$visualRowint -->
<h3 class="fn" id="visualRow"><a name="visualRow"></a><span class="type">int</span> QTableWidget::<span class="name">visualRow</span>(<span class="type">int</span> <i>logicalRow</i>) const</h3>
<p>Returns the visual row of the given <i>logicalRow</i>.</p>
<!-- @@@visualRow -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>