1
<?xml version="1.0" encoding="iso-8859-1"?>
3
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/gui/kernel/qlayoutitem.cpp -->
7
<title>Qt 4.0: QWidgetItem Class Reference</title>
8
<style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
9
a:link { color: #004faf; text-decoration: none }
10
a:visited { color: #672967; text-decoration: none }
11
td.postheader { font-family: sans-serif }
12
tr.address { font-family: sans-serif }
13
body { background: #ffffff; color: black; }</style>
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
19
<td width="1"> </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="mainclasses.html"><font color="#004faf">Main Classes</font></a> · <a href="annotated.html"><font color="#004faf">Annotated</font></a> · <a href="groups.html"><font color="#004faf">Grouped Classes</font></a> · <a href="functions.html"><font color="#004faf">Functions</font></a></td>
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">QWidgetItem Class Reference</h1>
21
<p>The QWidgetItem class is a layout item that represents a widget. <a href="#details">More...</a></p>
22
<pre>#include <QWidgetItem></pre><p>Part of the <a href="qtgui.html">QtGui</a> module.</p>
23
<p>Inherits <a href="qlayoutitem.html">QLayoutItem</a>.</p>
25
<li><a href="qwidgetitem-members.html">List of all members, including inherited members</a></li>
27
<a name="public-functions"></a>
28
<h3>Public Functions</h3>
30
<li><div class="fn"/><b><a href="qwidgetitem.html#QWidgetItem">QWidgetItem</a></b> ( QWidget * <i>widget</i> )</li>
31
<li><div class="fn"/>virtual bool <b><a href="qwidgetitem.html#isEmpty">isEmpty</a></b> () const</li>
32
<li><div class="fn"/>virtual QWidget * <b><a href="qwidgetitem.html#widget">widget</a></b> ()</li>
35
<li><div class="fn"/>16 public functions inherited from <a href="qlayoutitem.html#public-functions">QLayoutItem</a></li>
37
<a name="details"></a>
39
<h2>Detailed Description</h2>
40
<p>The QWidgetItem class is a layout item that represents a widget.</p>
41
<p>Normally, you don't need to use this class directly. Qt's built-in layout managers provide the following functions for manipulating widgets in layouts:</p>
42
<table align="center" cellpadding="2" cellspacing="1" border="0">
43
<tr valign="top" bgcolor="#a2c511"><th>Class</th><th>Functions</th></tr>
44
<tr valign="top" bgcolor="#f0f0f0"><td><a href="qboxlayout.html">QBoxLayout</a></td><td><a href="qboxlayout.html#addWidget">addWidget()</a>, <a href="qboxlayout.html#insertWidget">insertWidget()</a>, <a href="qboxlayout.html#setStretchFactor">setStretchFactor()</a></td></tr>
45
<tr valign="top" bgcolor="#e0e0e0"><td><a href="qgridlayout.html">QGridLayout</a></td><td><a href="qgridlayout.html#addWidget">addWidget()</a></td></tr>
46
<tr valign="top" bgcolor="#f0f0f0"><td><a href="qstackedlayout.html">QStackedLayout</a></td><td><a href="qstackedlayout.html#addWidget">addWidget()</a>, <a href="qstackedlayout.html#insertWidget">insertWidget()</a>, <a href="qstackedlayout.html#currentWidget">currentWidget()</a>, <a href="qstackedlayout.html#setCurrentWidget">setCurrentWidget()</a>, <a href="qstackedlayout.html#widget">widget()</a></td></tr>
48
<p>See also <a href="qlayout.html">QLayout</a>, <a href="qspaceritem.html">QSpacerItem</a>, and <a href="qlayoutitem.html#widget">QLayoutItem::widget</a>().</p>
50
<h2>Member Function Documentation</h2>
51
<h3 class="fn"><a name="QWidgetItem"></a>QWidgetItem::QWidgetItem ( <a href="qwidget.html">QWidget</a> * <i>widget</i> )</h3>
52
<p>Creates an item containing the given <i>widget</i>.</p>
53
<h3 class="fn"><a name="isEmpty"></a>bool QWidgetItem::isEmpty () const <tt> [virtual]</tt></h3>
54
<p>Returns true if the widget is hidden; otherwise returns false.</p>
55
<p>Reimplemented from <a href="qlayoutitem.html#isEmpty">QLayoutItem</a>.</p>
56
<p>See also <a href="qwidget.html#isHidden">QWidget::isHidden</a>().</p>
57
<h3 class="fn"><a name="widget"></a><a href="qwidget.html">QWidget</a> * QWidgetItem::widget () <tt> [virtual]</tt></h3>
58
<p>Returns the widget managed by this item.</p>
59
<p>Reimplemented from <a href="qlayoutitem.html#widget">QLayoutItem</a>.</p>
60
<p /><address><hr /><div align="center">
61
<table width="100%" cellspacing="0" border="0"><tr class="address">
62
<td width="30%">Copyright © 2005 <a href="trolltech.html">Trolltech</a></td>
63
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
64
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
65
</tr></table></div></address></body>