~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/qgraphicswidget.html

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<!DOCTYPE html
3
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
 
<!-- /fasttmp/mkdist-qt-4.5.2-1245473805/qt-x11-opensource-src-4.5.2/src/gui/graphicsview/qgraphicswidget.cpp -->
 
5
<!-- qgraphicswidget.cpp -->
6
6
<head>
7
 
  <title>Qt 4.5: QGraphicsWidget Class Reference</title>
 
7
  <title>Qt 4.6: QGraphicsWidget Class Reference</title>
8
8
  <link href="classic.css" rel="stylesheet" type="text/css" />
9
9
</head>
10
10
<body>
 
11
<a name="//apple_ref/cpp/cl//QGraphicsWidget" />
11
12
<table border="0" cellpadding="0" cellspacing="0" width="100%">
12
13
<tr>
13
 
<td align="left" valign="top" width="32"><a href="http://qtsoftware.com/products/qt"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
14
 
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="namespaces.html"><font color="#004faf">All&nbsp;Namespaces</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
15
 
<td align="right" valign="top" width="230"></td></tr></table><h1 class="title">QGraphicsWidget Class Reference<br /><span class="small-subtitle">[<a href="qtgui.html">QtGui</a> module]</span>
 
14
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
 
15
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td><td class="searchBar" align="right" valign="center"><form action="http://www.google.com/cse" id="cse-search-box"><div><input type="hidden" name="cx" value="000136343326384750312:dhbxnqlakyu" /><input type="hidden" name="ie" value="UTF-8" /><input type="text" name="q" size="31" /><input type="submit" name="sa" value="Search" /></div></form></td>
 
16
</tr></table><h1 class="title">QGraphicsWidget Class Reference<br /><span class="small-subtitle">[<a href="qtgui.html">QtGui</a> module]</span>
16
17
</h1>
17
18
<p>The QGraphicsWidget class is the base class for all widget items in a <a href="qgraphicsscene.html">QGraphicsScene</a>. <a href="#details">More...</a></p>
18
 
<pre> #include &lt;QGraphicsWidget&gt;</pre><p>Inherits <a href="qobject.html">QObject</a>, <a href="qgraphicsitem.html">QGraphicsItem</a>, and <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a>.</p>
19
 
<p>Inherited by <a href="qgraphicsproxywidget.html">QGraphicsProxyWidget</a>.</p>
 
19
<pre> #include &lt;QGraphicsWidget&gt;</pre><p>Inherits <a href="qgraphicsobject.html">QGraphicsObject</a> and <a href="qgraphicslayoutitem.html">QGraphicsLayoutItem</a>.</p>
 
20
<p>Inherited by <a href="qgraphicsproxywidget.html">QGraphicsProxyWidget</a> and <a href="qgraphicswebview.html">QGraphicsWebView</a>.</p>
20
21
<p>This class was introduced in Qt 4.4.</p>
21
22
<ul>
22
23
<li><a href="qgraphicswidget-members.html">List of all members, including inherited members</a></li>
23
24
</ul>
 
25
<hr />
24
26
<a name="properties"></a>
25
 
<h3>Properties</h3>
26
 
<p><table width="100%" border="0" cellpadding="0" cellspacing="0">
 
27
<h2>Properties</h2>
 
28
<p><table class="propsummary" width="100%" border="0" cellpadding="0" cellspacing="0">
27
29
<tr><td width="45%" valign="top"><ul>
28
 
<li><div class="fn"></div><b><a href="qgraphicswidget.html#enabled-prop">enabled</a></b> : const bool</li>
29
 
<li><div class="fn"></div><b><a href="qgraphicswidget.html#focusPolicy-prop">focusPolicy</a></b> : Qt::FocusPolicy</li>
30
 
<li><div class="fn"></div><b><a href="qgraphicswidget.html#font-prop">font</a></b> : QFont</li>
31
 
<li><div class="fn"></div><b><a href="qgraphicswidget.html#geometry-prop">geometry</a></b> : QRectF</li>
32
 
<li><div class="fn"></div><b><a href="qgraphicswidget.html#layoutDirection-prop">layoutDirection</a></b> : Qt::LayoutDirection</li>
33
 
<li><div class="fn"></div><b><a href="qgraphicswidget.html#opacity-prop">opacity</a></b> : const qreal</li>
 
30
<li><div class="fn"><b><a href="qgraphicswidget.html#focusPolicy-prop">focusPolicy</a></b> : Qt::FocusPolicy</div></li>
 
31
<li><div class="fn"><b><a href="qgraphicswidget.html#font-prop">font</a></b> : QFont</div></li>
 
32
<li><div class="fn"><b><a href="qgraphicswidget.html#geometry-prop">geometry</a></b> : QRectF</div></li>
 
33
<li><div class="fn"><b><a href="qgraphicswidget.html#layoutDirection-prop">layoutDirection</a></b> : Qt::LayoutDirection</div></li>
34
34
</ul></td><td valign="top"><ul>
35
 
<li><div class="fn"></div><b><a href="qgraphicswidget.html#palette-prop">palette</a></b> : QPalette</li>
36
 
<li><div class="fn"></div><b><a href="qgraphicswidget.html#pos-prop">pos</a></b> : const QPointF</li>
37
 
<li><div class="fn"></div><b><a href="qgraphicswidget.html#size-prop">size</a></b> : QSizeF</li>
38
 
<li><div class="fn"></div><b><a href="qgraphicswidget.html#visible-prop">visible</a></b> : const bool</li>
39
 
<li><div class="fn"></div><b><a href="qgraphicswidget.html#windowFlags-prop">windowFlags</a></b> : Qt::WindowFlags</li>
40
 
<li><div class="fn"></div><b><a href="qgraphicswidget.html#windowTitle-prop">windowTitle</a></b> : QString</li>
 
35
<li><div class="fn"><b><a href="qgraphicswidget.html#palette-prop">palette</a></b> : QPalette</div></li>
 
36
<li><div class="fn"><b><a href="qgraphicswidget.html#size-prop">size</a></b> : QSizeF</div></li>
 
37
<li><div class="fn"><b><a href="qgraphicswidget.html#windowFlags-prop">windowFlags</a></b> : Qt::WindowFlags</div></li>
 
38
<li><div class="fn"><b><a href="qgraphicswidget.html#windowTitle-prop">windowTitle</a></b> : QString</div></li>
41
39
</ul>
42
40
</td></tr>
43
41
</table></p>
44
42
<ul>
45
 
<li><div class="fn"></div>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
 
43
<li><div bar="2" class="fn"></div>12 properties inherited from <a href="qgraphicsobject.html#properties">QGraphicsObject</a></li>
 
44
<li><div bar="2" class="fn"></div>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
46
45
</ul>
 
46
<hr />
47
47
<a name="public-functions"></a>
48
 
<h3>Public Functions</h3>
49
 
<ul>
50
 
<li><div class="fn"></div><b><a href="qgraphicswidget.html#QGraphicsWidget">QGraphicsWidget</a></b> ( QGraphicsItem * <i>parent</i> = 0, Qt::WindowFlags <i>wFlags</i> = 0 )</li>
51
 
<li><div class="fn"></div><b><a href="qgraphicswidget.html#dtor.QGraphicsWidget">~QGraphicsWidget</a></b> ()</li>
52
 
<li><div class="fn"></div>QList&lt;QAction *&gt; <b><a href="qgraphicswidget.html#actions">actions</a></b> () const</li>
53
 
<li><div class="fn"></div>void <b><a href="qgraphicswidget.html#addAction">addAction</a></b> ( QAction * <i>action</i> )</li>
54
 
<li><div class="fn"></div>void <b><a href="qgraphicswidget.html#addActions">addActions</a></b> ( QList&lt;QAction *&gt; <i>actions</i> )</li>
55
 
<li><div class="fn"></div>void <b><a href="qgraphicswidget.html#adjustSize">adjustSize</a></b> ()</li>
56
 
<li><div class="fn"></div>const QObjectList &amp; <b><a href="qgraphicswidget.html#children">children</a></b> () const</li>
57
 
<li><div class="fn"></div>Qt::FocusPolicy <b><a href="qgraphicswidget.html#focusPolicy-prop">focusPolicy</a></b> () const</li>
58
 
<li><div class="fn"></div>QGraphicsWidget * <b><a href="qgraphicswidget.html#focusWidget">focusWidget</a></b> () const</li>
59
 
<li><div class="fn"></div>QFont <b><a href="qgraphicswidget.html#font-prop">font</a></b> () const</li>
60
 
<li><div class="fn"></div>virtual void <b><a href="qgraphicswidget.html#getContentsMargins">getContentsMargins</a></b> ( qreal * <i>left</i>, qreal * <i>top</i>, qreal * <i>right</i>, qreal * <i>bottom</i> ) const</li>
61
 
<li><div class="fn"></div>void <b><a href="qgraphicswidget.html#getWindowFrameMargins">getWindowFrameMargins</a></b> ( qreal * <i>left</i>, qreal * <i>top</i>, qreal * <i>right</i>, qreal * <i>bottom</i> ) const</li>
62
 
<li><div class="fn"></div>int <b><a href="qgraphicswidget.html#grabShortcut">grabShortcut</a></b> ( const QKeySequence &amp; <i>sequence</i>, Qt::ShortcutContext <i>context</i> = Qt::WindowShortcut )</li>
63
 
<li><div class="fn"></div>void <b><a href="qgraphicswidget.html#insertAction">insertAction</a></b> ( QAction * <i>before</i>, QAction * <i>action</i> )</li>
64
 
<li><div class="fn"></div>void <b><a href="qgraphicswidget.html#insertActions">insertActions</a></b> ( QAction * <i>before</i>, QList&lt;QAction *&gt; <i>actions</i> )</li>
65
 
<li><div class="fn"></div>bool <b><a href="qgraphicswidget.html#isActiveWindow">isActiveWindow</a></b> () const</li>
66
 
<li><div class="fn"></div>QGraphicsLayout * <b><a href="qgraphicswidget.html#layout">layout</a></b> () const</li>
67
 
<li><div class="fn"></div>Qt::LayoutDirection <b><a href="qgraphicswidget.html#layoutDirection-prop">layoutDirection</a></b> () const</li>
68
 
<li><div class="fn"></div>virtual void <b><a href="qgraphicswidget.html#paintWindowFrame">paintWindowFrame</a></b> ( QPainter * <i>painter</i>, const QStyleOptionGraphicsItem * <i>option</i>, QWidget * <i>widget</i> = 0 )</li>
69
 
<li><div class="fn"></div>QPalette <b><a href="qgraphicswidget.html#palette-prop">palette</a></b> () const</li>
70
 
<li><div class="fn"></div>QRectF <b><a href="qgraphicswidget.html#rect">rect</a></b> () const</li>
71
 
<li><div class="fn"></div>void <b><a href="qgraphicswidget.html#releaseShortcut">releaseShortcut</a></b> ( int <i>id</i> )</li>
72
 
<li><div class="fn"></div>void <b><a href="qgraphicswidget.html#removeAction">removeAction</a></b> ( QAction * <i>action</i> )</li>
73
 
<li><div class="fn"></div>void <b><a href="qgraphicswidget.html#size-prop">resize</a></b> ( const QSizeF &amp; <i>size</i> )</li>
74
 
<li><div class="fn"></div>void <b><a href="qgraphicswidget.html#size-prop">resize</a></b> ( qreal <i>w</i>, qreal <i>h</i> )</li>
75
 
<li><div class="fn"></div>void <b><a href="qgraphicswidget.html#setAttribute">setAttribute</a></b> ( Qt::WidgetAttribute <i>attribute</i>, bool <i>on</i> = true )</li>
76
 
<li><div class="fn"></div>void <b><a href="qgraphicswidget.html#setContentsMargins">setContentsMargins</a></b> ( qreal <i>left</i>, qreal <i>top</i>, qreal <i>right</i>, qreal <i>bottom</i> )</li>
77
 
<li><div class="fn"></div>void <b><a href="qgraphicswidget.html#focusPolicy-prop">setFocusPolicy</a></b> ( Qt::FocusPolicy <i>policy</i> )</li>
78
 
<li><div class="fn"></div>void <b><a href="qgraphicswidget.html#font-prop">setFont</a></b> ( const QFont &amp; <i>font</i> )</li>
79
 
<li><div class="fn"></div>virtual void <b><a href="qgraphicswidget.html#geometry-prop">setGeometry</a></b> ( const QRectF &amp; <i>rect</i> )</li>
80
 
<li><div class="fn"></div>void <b><a href="qgraphicswidget.html#geometry-prop">setGeometry</a></b> ( qreal <i>x</i>, qreal <i>y</i>, qreal <i>w</i>, qreal <i>h</i> )</li>
81
 
<li><div class="fn"></div>void <b><a href="qgraphicswidget.html#setLayout">setLayout</a></b> ( QGraphicsLayout * <i>layout</i> )</li>
82
 
<li><div class="fn"></div>void <b><a href="qgraphicswidget.html#layoutDirection-prop">setLayoutDirection</a></b> ( Qt::LayoutDirection <i>direction</i> )</li>
83
 
<li><div class="fn"></div>void <b><a href="qgraphicswidget.html#palette-prop">setPalette</a></b> ( const QPalette &amp; <i>palette</i> )</li>
84
 
<li><div class="fn"></div>void <b><a href="qgraphicswidget.html#setShortcutAutoRepeat">setShortcutAutoRepeat</a></b> ( int <i>id</i>, bool <i>enabled</i> = true )</li>
85
 
<li><div class="fn"></div>void <b><a href="qgraphicswidget.html#setShortcutEnabled">setShortcutEnabled</a></b> ( int <i>id</i>, bool <i>enabled</i> = true )</li>
86
 
<li><div class="fn"></div>void <b><a href="qgraphicswidget.html#setStyle">setStyle</a></b> ( QStyle * <i>style</i> )</li>
87
 
<li><div class="fn"></div>void <b><a href="qgraphicswidget.html#windowFlags-prop">setWindowFlags</a></b> ( Qt::WindowFlags <i>wFlags</i> )</li>
88
 
<li><div class="fn"></div>void <b><a href="qgraphicswidget.html#setWindowFrameMargins">setWindowFrameMargins</a></b> ( qreal <i>left</i>, qreal <i>top</i>, qreal <i>right</i>, qreal <i>bottom</i> )</li>
89
 
<li><div class="fn"></div>void <b><a href="qgraphicswidget.html#windowTitle-prop">setWindowTitle</a></b> ( const QString &amp; <i>title</i> )</li>
90
 
<li><div class="fn"></div>QSizeF <b><a href="qgraphicswidget.html#size-prop">size</a></b> () const</li>
91
 
<li><div class="fn"></div>QStyle * <b><a href="qgraphicswidget.html#style">style</a></b> () const</li>
92
 
<li><div class="fn"></div>bool <b><a href="qgraphicswidget.html#testAttribute">testAttribute</a></b> ( Qt::WidgetAttribute <i>attribute</i> ) const</li>
93
 
<li><div class="fn"></div>void <b><a href="qgraphicswidget.html#layoutDirection-prop">unsetLayoutDirection</a></b> ()</li>
94
 
<li><div class="fn"></div>void <b><a href="qgraphicswidget.html#unsetWindowFrameMargins">unsetWindowFrameMargins</a></b> ()</li>
95
 
<li><div class="fn"></div>Qt::WindowFlags <b><a href="qgraphicswidget.html#windowFlags-prop">windowFlags</a></b> () const</li>
96
 
<li><div class="fn"></div>QRectF <b><a href="qgraphicswidget.html#windowFrameGeometry">windowFrameGeometry</a></b> () const</li>
97
 
<li><div class="fn"></div>QRectF <b><a href="qgraphicswidget.html#windowFrameRect">windowFrameRect</a></b> () const</li>
98
 
<li><div class="fn"></div>QString <b><a href="qgraphicswidget.html#windowTitle-prop">windowTitle</a></b> () const</li>
99
 
<li><div class="fn"></div>Qt::WindowType <b><a href="qgraphicswidget.html#windowType">windowType</a></b> () const</li>
100
 
</ul>
101
 
<ul>
102
 
<li><div class="fn"></div>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
103
 
<li><div class="fn"></div>150 public functions inherited from <a href="qgraphicsitem.html#public-functions">QGraphicsItem</a></li>
104
 
<li><div class="fn"></div>35 public functions inherited from <a href="qgraphicslayoutitem.html#public-functions">QGraphicsLayoutItem</a></li>
105
 
</ul>
 
48
<h2>Public Functions</h2>
 
49
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
50
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#QGraphicsWidget">QGraphicsWidget</a></b> ( QGraphicsItem * <i>parent</i> = 0, Qt::WindowFlags <i>wFlags</i> = 0 )</td></tr>
 
51
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#dtor.QGraphicsWidget">~QGraphicsWidget</a></b> ()</td></tr>
 
52
<tr><td class="memItemLeft" align="right" valign="top">QList&lt;QAction *&gt; </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#actions">actions</a></b> () const</td></tr>
 
53
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#addAction">addAction</a></b> ( QAction * <i>action</i> )</td></tr>
 
54
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#addActions">addActions</a></b> ( QList&lt;QAction *&gt; <i>actions</i> )</td></tr>
 
55
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#adjustSize">adjustSize</a></b> ()</td></tr>
 
56
<tr><td class="memItemLeft" align="right" valign="top">Qt::FocusPolicy </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#focusPolicy-prop">focusPolicy</a></b> () const</td></tr>
 
57
<tr><td class="memItemLeft" align="right" valign="top">QGraphicsWidget * </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#focusWidget">focusWidget</a></b> () const</td></tr>
 
58
<tr><td class="memItemLeft" align="right" valign="top">QFont </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#font-prop">font</a></b> () const</td></tr>
 
59
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#getWindowFrameMargins">getWindowFrameMargins</a></b> ( qreal * <i>left</i>, qreal * <i>top</i>, qreal * <i>right</i>, qreal * <i>bottom</i> ) const</td></tr>
 
60
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#grabShortcut">grabShortcut</a></b> ( const QKeySequence &amp; <i>sequence</i>, Qt::ShortcutContext <i>context</i> = Qt::WindowShortcut )</td></tr>
 
61
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#insertAction">insertAction</a></b> ( QAction * <i>before</i>, QAction * <i>action</i> )</td></tr>
 
62
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#insertActions">insertActions</a></b> ( QAction * <i>before</i>, QList&lt;QAction *&gt; <i>actions</i> )</td></tr>
 
63
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#isActiveWindow">isActiveWindow</a></b> () const</td></tr>
 
64
<tr><td class="memItemLeft" align="right" valign="top">QGraphicsLayout * </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#layout">layout</a></b> () const</td></tr>
 
65
<tr><td class="memItemLeft" align="right" valign="top">Qt::LayoutDirection </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#layoutDirection-prop">layoutDirection</a></b> () const</td></tr>
 
66
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#paintWindowFrame">paintWindowFrame</a></b> ( QPainter * <i>painter</i>, const QStyleOptionGraphicsItem * <i>option</i>, QWidget * <i>widget</i> = 0 )</td></tr>
 
67
<tr><td class="memItemLeft" align="right" valign="top">QPalette </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#palette-prop">palette</a></b> () const</td></tr>
 
68
<tr><td class="memItemLeft" align="right" valign="top">QRectF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#rect">rect</a></b> () const</td></tr>
 
69
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#releaseShortcut">releaseShortcut</a></b> ( int <i>id</i> )</td></tr>
 
70
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#removeAction">removeAction</a></b> ( QAction * <i>action</i> )</td></tr>
 
71
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#size-prop">resize</a></b> ( const QSizeF &amp; <i>size</i> )</td></tr>
 
72
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#size-prop">resize</a></b> ( qreal <i>w</i>, qreal <i>h</i> )</td></tr>
 
73
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#setAttribute">setAttribute</a></b> ( Qt::WidgetAttribute <i>attribute</i>, bool <i>on</i> = true )</td></tr>
 
74
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#setContentsMargins">setContentsMargins</a></b> ( qreal <i>left</i>, qreal <i>top</i>, qreal <i>right</i>, qreal <i>bottom</i> )</td></tr>
 
75
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#focusPolicy-prop">setFocusPolicy</a></b> ( Qt::FocusPolicy <i>policy</i> )</td></tr>
 
76
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#font-prop">setFont</a></b> ( const QFont &amp; <i>font</i> )</td></tr>
 
77
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#geometry-prop">setGeometry</a></b> ( qreal <i>x</i>, qreal <i>y</i>, qreal <i>w</i>, qreal <i>h</i> )</td></tr>
 
78
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#setLayout">setLayout</a></b> ( QGraphicsLayout * <i>layout</i> )</td></tr>
 
79
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#layoutDirection-prop">setLayoutDirection</a></b> ( Qt::LayoutDirection <i>direction</i> )</td></tr>
 
80
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#palette-prop">setPalette</a></b> ( const QPalette &amp; <i>palette</i> )</td></tr>
 
81
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#setShortcutAutoRepeat">setShortcutAutoRepeat</a></b> ( int <i>id</i>, bool <i>enabled</i> = true )</td></tr>
 
82
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#setShortcutEnabled">setShortcutEnabled</a></b> ( int <i>id</i>, bool <i>enabled</i> = true )</td></tr>
 
83
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#setStyle">setStyle</a></b> ( QStyle * <i>style</i> )</td></tr>
 
84
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#windowFlags-prop">setWindowFlags</a></b> ( Qt::WindowFlags <i>wFlags</i> )</td></tr>
 
85
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#setWindowFrameMargins">setWindowFrameMargins</a></b> ( qreal <i>left</i>, qreal <i>top</i>, qreal <i>right</i>, qreal <i>bottom</i> )</td></tr>
 
86
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#windowTitle-prop">setWindowTitle</a></b> ( const QString &amp; <i>title</i> )</td></tr>
 
87
<tr><td class="memItemLeft" align="right" valign="top">QSizeF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#size-prop">size</a></b> () const</td></tr>
 
88
<tr><td class="memItemLeft" align="right" valign="top">QStyle * </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#style">style</a></b> () const</td></tr>
 
89
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#testAttribute">testAttribute</a></b> ( Qt::WidgetAttribute <i>attribute</i> ) const</td></tr>
 
90
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#layoutDirection-prop">unsetLayoutDirection</a></b> ()</td></tr>
 
91
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#unsetWindowFrameMargins">unsetWindowFrameMargins</a></b> ()</td></tr>
 
92
<tr><td class="memItemLeft" align="right" valign="top">Qt::WindowFlags </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#windowFlags-prop">windowFlags</a></b> () const</td></tr>
 
93
<tr><td class="memItemLeft" align="right" valign="top">QRectF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#windowFrameGeometry">windowFrameGeometry</a></b> () const</td></tr>
 
94
<tr><td class="memItemLeft" align="right" valign="top">QRectF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#windowFrameRect">windowFrameRect</a></b> () const</td></tr>
 
95
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#windowTitle-prop">windowTitle</a></b> () const</td></tr>
 
96
<tr><td class="memItemLeft" align="right" valign="top">Qt::WindowType </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#windowType">windowType</a></b> () const</td></tr>
 
97
</table>
 
98
<hr />
 
99
<a name="reimplemented-public-functions"></a>
 
100
<h2>Reimplemented Public Functions</h2>
 
101
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
102
<tr><td class="memItemLeft" align="right" valign="top">virtual QRectF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#boundingRect">boundingRect</a></b> () const</td></tr>
 
103
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#getContentsMargins">getContentsMargins</a></b> ( qreal * <i>left</i>, qreal * <i>top</i>, qreal * <i>right</i>, qreal * <i>bottom</i> ) const</td></tr>
 
104
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#paint">paint</a></b> ( QPainter * <i>painter</i>, const QStyleOptionGraphicsItem * <i>option</i>, QWidget * <i>widget</i> = 0 )</td></tr>
 
105
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#geometry-prop">setGeometry</a></b> ( const QRectF &amp; <i>rect</i> )</td></tr>
 
106
<tr><td class="memItemLeft" align="right" valign="top">virtual QPainterPath </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#shape">shape</a></b> () const</td></tr>
 
107
<tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#type">type</a></b> () const</td></tr>
 
108
</table>
 
109
<ul>
 
110
<li><div bar="2" class="fn"></div>1 public function inherited from <a href="qgraphicsobject.html#public-functions">QGraphicsObject</a></li>
 
111
<li><div bar="2" class="fn"></div>35 public functions inherited from <a href="qgraphicslayoutitem.html#public-functions">QGraphicsLayoutItem</a></li>
 
112
<li><div bar="2" class="fn"></div>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
 
113
<li><div bar="2" class="fn"></div>177 public functions inherited from <a href="qgraphicsitem.html#public-functions">QGraphicsItem</a></li>
 
114
</ul>
 
115
<hr />
106
116
<a name="public-slots"></a>
107
 
<h3>Public Slots</h3>
108
 
<ul>
109
 
<li><div class="fn"></div>bool <b><a href="qgraphicswidget.html#close">close</a></b> ()</li>
110
 
</ul>
111
 
<ul>
112
 
<li><div class="fn"></div>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
113
 
</ul>
 
117
<h2>Public Slots</h2>
 
118
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
119
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#close">close</a></b> ()</td></tr>
 
120
</table>
 
121
<ul>
 
122
<li><div bar="2" class="fn"></div>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
 
123
</ul>
 
124
<hr />
114
125
<a name="static-public-members"></a>
115
 
<h3>Static Public Members</h3>
116
 
<ul>
117
 
<li><div class="fn"></div>void <b><a href="qgraphicswidget.html#setTabOrder">setTabOrder</a></b> ( QGraphicsWidget * <i>first</i>, QGraphicsWidget * <i>second</i> )</li>
118
 
</ul>
119
 
<ul>
120
 
<li><div class="fn"></div>5 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
121
 
<li><div class="fn"></div>1 static public member inherited from <a href="qgraphicsitem.html#static-public-members">QGraphicsItem</a></li>
122
 
</ul>
 
126
<h2>Static Public Members</h2>
 
127
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
128
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#setTabOrder">setTabOrder</a></b> ( QGraphicsWidget * <i>first</i>, QGraphicsWidget * <i>second</i> )</td></tr>
 
129
</table>
 
130
<ul>
 
131
<li><div bar="2" class="fn"></div>5 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
 
132
<li><div bar="2" class="fn"></div>1 static public member inherited from <a href="qgraphicsitem.html#static-public-members">QGraphicsItem</a></li>
 
133
</ul>
 
134
<hr />
123
135
<a name="protected-functions"></a>
124
 
<h3>Protected Functions</h3>
125
 
<ul>
126
 
<li><div class="fn"></div>virtual void <b><a href="qgraphicswidget.html#changeEvent">changeEvent</a></b> ( QEvent * <i>event</i> )</li>
127
 
<li><div class="fn"></div>virtual void <b><a href="qgraphicswidget.html#closeEvent">closeEvent</a></b> ( QCloseEvent * <i>event</i> )</li>
128
 
<li><div class="fn"></div>virtual bool <b><a href="qgraphicswidget.html#focusNextPrevChild">focusNextPrevChild</a></b> ( bool <i>next</i> )</li>
129
 
<li><div class="fn"></div>virtual void <b><a href="qgraphicswidget.html#grabKeyboardEvent">grabKeyboardEvent</a></b> ( QEvent * <i>event</i> )</li>
130
 
<li><div class="fn"></div>virtual void <b><a href="qgraphicswidget.html#grabMouseEvent">grabMouseEvent</a></b> ( QEvent * <i>event</i> )</li>
131
 
<li><div class="fn"></div>virtual void <b><a href="qgraphicswidget.html#hideEvent">hideEvent</a></b> ( QHideEvent * <i>event</i> )</li>
132
 
<li><div class="fn"></div>virtual void <b><a href="qgraphicswidget.html#initStyleOption">initStyleOption</a></b> ( QStyleOption * <i>option</i> ) const</li>
133
 
<li><div class="fn"></div>virtual void <b><a href="qgraphicswidget.html#moveEvent">moveEvent</a></b> ( QGraphicsSceneMoveEvent * <i>event</i> )</li>
134
 
<li><div class="fn"></div>virtual void <b><a href="qgraphicswidget.html#polishEvent">polishEvent</a></b> ()</li>
135
 
<li><div class="fn"></div>virtual void <b><a href="qgraphicswidget.html#resizeEvent">resizeEvent</a></b> ( QGraphicsSceneResizeEvent * <i>event</i> )</li>
136
 
<li><div class="fn"></div>virtual bool <b><a href="qgraphicswidget.html#sceneEvent">sceneEvent</a></b> ( QEvent * <i>event</i> )</li>
137
 
<li><div class="fn"></div>virtual void <b><a href="qgraphicswidget.html#showEvent">showEvent</a></b> ( QShowEvent * <i>event</i> )</li>
138
 
<li><div class="fn"></div>virtual void <b><a href="qgraphicswidget.html#ungrabKeyboardEvent">ungrabKeyboardEvent</a></b> ( QEvent * <i>event</i> )</li>
139
 
<li><div class="fn"></div>virtual void <b><a href="qgraphicswidget.html#ungrabMouseEvent">ungrabMouseEvent</a></b> ( QEvent * <i>event</i> )</li>
140
 
<li><div class="fn"></div>virtual void <b><a href="qgraphicswidget.html#updateGeometry">updateGeometry</a></b> ()</li>
141
 
<li><div class="fn"></div>virtual bool <b><a href="qgraphicswidget.html#windowFrameEvent">windowFrameEvent</a></b> ( QEvent * <i>event</i> )</li>
142
 
<li><div class="fn"></div>virtual Qt::WindowFrameSection <b><a href="qgraphicswidget.html#windowFrameSectionAt">windowFrameSectionAt</a></b> ( const QPointF &amp; <i>pos</i> ) const</li>
143
 
</ul>
144
 
<ul>
145
 
<li><div class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
146
 
<li><div class="fn"></div>23 protected functions inherited from <a href="qgraphicsitem.html#protected-functions">QGraphicsItem</a></li>
147
 
<li><div class="fn"></div>3 protected functions inherited from <a href="qgraphicslayoutitem.html#protected-functions">QGraphicsLayoutItem</a></li>
 
136
<h2>Protected Functions</h2>
 
137
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
138
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#changeEvent">changeEvent</a></b> ( QEvent * <i>event</i> )</td></tr>
 
139
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#closeEvent">closeEvent</a></b> ( QCloseEvent * <i>event</i> )</td></tr>
 
140
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#focusNextPrevChild">focusNextPrevChild</a></b> ( bool <i>next</i> )</td></tr>
 
141
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#grabKeyboardEvent">grabKeyboardEvent</a></b> ( QEvent * <i>event</i> )</td></tr>
 
142
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#grabMouseEvent">grabMouseEvent</a></b> ( QEvent * <i>event</i> )</td></tr>
 
143
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#hideEvent">hideEvent</a></b> ( QHideEvent * <i>event</i> )</td></tr>
 
144
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#initStyleOption">initStyleOption</a></b> ( QStyleOption * <i>option</i> ) const</td></tr>
 
145
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#moveEvent">moveEvent</a></b> ( QGraphicsSceneMoveEvent * <i>event</i> )</td></tr>
 
146
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#polishEvent">polishEvent</a></b> ()</td></tr>
 
147
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#resizeEvent">resizeEvent</a></b> ( QGraphicsSceneResizeEvent * <i>event</i> )</td></tr>
 
148
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#showEvent">showEvent</a></b> ( QShowEvent * <i>event</i> )</td></tr>
 
149
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#ungrabKeyboardEvent">ungrabKeyboardEvent</a></b> ( QEvent * <i>event</i> )</td></tr>
 
150
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#ungrabMouseEvent">ungrabMouseEvent</a></b> ( QEvent * <i>event</i> )</td></tr>
 
151
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#windowFrameEvent">windowFrameEvent</a></b> ( QEvent * <i>event</i> )</td></tr>
 
152
<tr><td class="memItemLeft" align="right" valign="top">virtual Qt::WindowFrameSection </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#windowFrameSectionAt">windowFrameSectionAt</a></b> ( const QPointF &amp; <i>pos</i> ) const</td></tr>
 
153
</table>
 
154
<hr />
 
155
<a name="reimplemented-protected-functions"></a>
 
156
<h2>Reimplemented Protected Functions</h2>
 
157
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
158
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#event">event</a></b> ( QEvent * <i>event</i> )</td></tr>
 
159
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#focusInEvent">focusInEvent</a></b> ( QFocusEvent * <i>event</i> )</td></tr>
 
160
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#focusOutEvent">focusOutEvent</a></b> ( QFocusEvent * <i>event</i> )</td></tr>
 
161
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#hoverLeaveEvent">hoverLeaveEvent</a></b> ( QGraphicsSceneHoverEvent * <i>event</i> )</td></tr>
 
162
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#hoverMoveEvent">hoverMoveEvent</a></b> ( QGraphicsSceneHoverEvent * <i>event</i> )</td></tr>
 
163
<tr><td class="memItemLeft" align="right" valign="top">virtual QVariant </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#itemChange">itemChange</a></b> ( GraphicsItemChange <i>change</i>, const QVariant &amp; <i>value</i> )</td></tr>
 
164
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#sceneEvent">sceneEvent</a></b> ( QEvent * <i>event</i> )</td></tr>
 
165
<tr><td class="memItemLeft" align="right" valign="top">virtual QSizeF </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#sizeHint">sizeHint</a></b> ( Qt::SizeHint <i>which</i>, const QSizeF &amp; <i>constraint</i> = QSizeF() ) const</td></tr>
 
166
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qgraphicswidget.html#updateGeometry">updateGeometry</a></b> ()</td></tr>
 
167
</table>
 
168
<ul>
 
169
<li><div bar="2" class="fn"></div>3 protected functions inherited from <a href="qgraphicslayoutitem.html#protected-functions">QGraphicsLayoutItem</a></li>
 
170
<li><div bar="2" class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
 
171
<li><div bar="2" class="fn"></div>23 protected functions inherited from <a href="qgraphicsitem.html#protected-functions">QGraphicsItem</a></li>
148
172
</ul>
149
173
<h3>Additional Inherited Members</h3>
150
174
<ul>
 
175
<li><div class="fn"></div>9 signals inherited from <a href="qgraphicsobject.html#signals">QGraphicsObject</a></li>
151
176
<li><div class="fn"></div>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
152
177
</ul>
153
178
<a name="details"></a>
166
191
<p>Since QGraphicsWidget resembles <a href="qwidget.html">QWidget</a> and has similar API, it is easier to port a widget from <a href="qwidget.html">QWidget</a> to QGraphicsWidget, instead of <a href="qgraphicsitem.html">QGraphicsItem</a>.</p>
167
192
<p><b>Note:</b> <a href="qwidget.html">QWidget</a>-based widgets can be directly embedded into a <a href="qgraphicsscene.html">QGraphicsScene</a> using <a href="qgraphicsproxywidget.html">QGraphicsProxyWidget</a>.</p>
168
193
<p>Noticeable differences between QGraphicsWidget and <a href="qwidget.html">QWidget</a> are:</p>
169
 
<p><table align="center" cellpadding="2" cellspacing="1" border="0">
 
194
<p><table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
170
195
<thead><tr valign="top" class="qt-style"><th>QGraphicsWidget</th><th><a href="qwidget.html">QWidget</a></th></tr></thead>
171
196
<tr valign="top" class="odd"><td>Coordinates and geometry are defined with qreals (doubles or floats, depending on the platform).</td><td><a href="qwidget.html">QWidget</a> uses integer geometry (<a href="qpoint.html">QPoint</a>, <a href="qrect.html">QRect</a>).</td></tr>
172
197
<tr valign="top" class="even"><td>The widget is already visible by default; you do not have to call <a href="qgraphicsitem.html#show">show</a>() to display the widget.</td><td><a href="qwidget.html">QWidget</a> is hidden by default until you call <a href="qgraphicsitem.html#show">show</a>().</td></tr>
176
201
<tr valign="top" class="even"><td>Widget items do not support modality.</td><td>Full modality support.</td></tr>
177
202
</table></p>
178
203
<p>QGraphicsWidget supports a subset of Qt's widget attributes, (<a href="qt.html#WidgetAttribute-enum">Qt::WidgetAttribute</a>), as shown in the table below. Any attributes not listed in this table are unsupported, or otherwise unused.</p>
179
 
<p><table align="center" cellpadding="2" cellspacing="1" border="0">
 
204
<p><table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
180
205
<thead><tr valign="top" class="qt-style"><th>Widget Attribute</th><th>Usage</th></tr></thead>
181
206
<tr valign="top" class="odd"><td><a href="qt.html#WidgetAttribute-enum">Qt::WA_SetLayoutDirection</a></td><td>Set by <a href="qgraphicswidget.html#layoutDirection-prop">setLayoutDirection</a>(), cleared by <a href="qgraphicswidget.html#layoutDirection-prop">unsetLayoutDirection</a>(). You can test this attribute to check if the widget has been explicitly assigned a <a href="qgraphicswidget.html#layoutDirection-prop">layoutDirection</a>. If the attribute is not set, the <a href="qgraphicswidget.html#layoutDirection-prop">layoutDirection()</a> is inherited.</td></tr>
182
207
<tr valign="top" class="even"><td><a href="qt.html#WidgetAttribute-enum">Qt::WA_RightToLeft</a></td><td>Toggled by <a href="qgraphicswidget.html#layoutDirection-prop">setLayoutDirection</a>(). Inherited from the parent/scene. If set, the widget's layout will order horizontally arranged widgets from right to left.</td></tr>
188
213
</table></p>
189
214
<p>Although QGraphicsWidget inherits from both <a href="qobject.html">QObject</a> and <a href="qgraphicsitem.html">QGraphicsItem</a>, you should use the functions provided by <a href="qgraphicsitem.html">QGraphicsItem</a>, <i>not</i> <a href="qobject.html">QObject</a>, to manage the relationships between parent and child items. These functions control the stacking order of items as well as their ownership.</p>
190
215
<p><b>Note:</b> The <a href="qobject.html#parent">QObject::parent</a>() should always return 0 for QGraphicsWidgets, but this policy is not strictly defined.</p>
191
 
<p>See also <a href="qgraphicsproxywidget.html">QGraphicsProxyWidget</a>, <a href="qgraphicsitem.html">QGraphicsItem</a>, and <a href="graphicsview.html#widgets-and-layouts">Widgets and Layouts</a>.</p>
 
216
<p>See also <a href="qgraphicsproxywidget.html">QGraphicsProxyWidget</a>, <a href="qgraphicsitem.html">QGraphicsItem</a>, and <a href="widgets-and-layouts.html">Widgets and Layouts</a>.</p>
192
217
<hr />
193
218
<h2>Property Documentation</h2>
194
 
<h3 class="fn"><a name="enabled-prop"></a>enabled : const bool</h3>
195
 
<p>This property holds whether the item is enabled or not.</p>
196
 
<p>This property is declared in <a href="qgraphicsitem.html">QGraphicsItem</a>.</p>
197
 
<p>By default, this property is true.</p>
198
 
<p>See also <a href="qgraphicsitem.html#isEnabled">QGraphicsItem::isEnabled</a>() and <a href="qgraphicsitem.html#setEnabled">QGraphicsItem::setEnabled</a>().</p>
 
219
<a name="//apple_ref/cpp/instm/QGraphicsWidget/focusPolicy" />
 
220
<a name="//apple_ref/cpp/instm/QGraphicsWidget/setFocusPolicy" />
199
221
<h3 class="fn"><a name="focusPolicy-prop"></a>focusPolicy : <a href="qt.html#FocusPolicy-enum">Qt::FocusPolicy</a></h3>
200
222
<p>This property holds the way the widget accepts keyboard focus.</p>
201
223
<p>The focus policy is <a href="qt.html#FocusPolicy-enum">Qt::TabFocus</a> if the widget accepts keyboard focus by tabbing, <a href="qt.html#FocusPolicy-enum">Qt::ClickFocus</a> if the widget accepts focus by clicking, <a href="qt.html#FocusPolicy-enum">Qt::StrongFocus</a> if it accepts both, and <a href="qt.html#FocusPolicy-enum">Qt::NoFocus</a> (the default) if it does not accept focus at all.</p>
202
224
<p>You must enable keyboard focus for a widget if it processes keyboard events. This is normally done from the widget's constructor. For instance, the <a href="qlineedit.html">QLineEdit</a> constructor calls setFocusPolicy(<a href="qt.html#FocusPolicy-enum">Qt::StrongFocus</a>).</p>
203
225
<p>If you enable a focus policy (i.e&#x2e;, not <a href="qt.html#FocusPolicy-enum">Qt::NoFocus</a>), <a href="qgraphicswidget.html">QGraphicsWidget</a> will automatically enable the <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemIsFocusable</a> flag. Setting <a href="qt.html#FocusPolicy-enum">Qt::NoFocus</a> on a widget will clear the <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemIsFocusable</a> flag. If the widget currently has keyboard focus, the widget will automatically lose focus.</p>
204
 
<p>Access functions:</p>
205
 
<ul>
206
 
<li><div class="fn"></div><b>Qt::FocusPolicy focusPolicy () const</b></li>
207
 
<li><div class="fn"></div><b>void setFocusPolicy ( Qt::FocusPolicy <i>policy</i> )</b></li>
208
 
</ul>
209
 
<p>See also <a href="qgraphicsitem.html#focusInEvent">focusInEvent</a>(), <a href="qgraphicsitem.html#focusOutEvent">focusOutEvent</a>(), <a href="qgraphicsitem.html#keyPressEvent">keyPressEvent</a>(), <a href="qgraphicsitem.html#keyReleaseEvent">keyReleaseEvent</a>(), and <a href="qgraphicswidget.html#enabled-prop">enabled</a>.</p>
 
226
<p><b>Access functions:</b></p>
 
227
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
228
<tr><td class="memItemLeft" align="right" valign="top">Qt::FocusPolicy </td><td class="memItemRight" valign="bottom"><b>focusPolicy</b> () const</td></tr>
 
229
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setFocusPolicy</b> ( Qt::FocusPolicy <i>policy</i> )</td></tr>
 
230
</table>
 
231
<p>See also <a href="qgraphicswidget.html#focusInEvent">focusInEvent</a>(), <a href="qgraphicswidget.html#focusOutEvent">focusOutEvent</a>(), <a href="qgraphicsitem.html#keyPressEvent">keyPressEvent</a>(), <a href="qgraphicsitem.html#keyReleaseEvent">keyReleaseEvent</a>(), and <a href="qgraphicsobject.html#enabled-prop">enabled</a>.</p>
 
232
<a name="//apple_ref/cpp/instm/QGraphicsWidget/font" />
 
233
<a name="//apple_ref/cpp/instm/QGraphicsWidget/setFont" />
210
234
<h3 class="fn"><a name="font-prop"></a>font : <a href="qfont.html">QFont</a></h3>
211
235
<p>This property holds the widgets' font.</p>
212
236
<p>This property provides the widget's font.</p>
213
237
<p><a href="qfont.html">QFont</a> consists of font properties that have been explicitly defined and properties implicitly inherited from the widget's parent. Hence, font() can return a different font compared to the one set with setFont(). This scheme allows you to define single entries in a font without affecting the font's inherited entries.</p>
214
238
<p>When a widget's font changes, it resolves its entries against its parent widget. If the widget does not have a parent widget, it resolves its entries against the scene. The widget then sends itself a <a href="qevent.html#Type-enum">FontChange</a> event and notifies all its descendants so that they can resolve their fonts as well.</p>
215
239
<p>By default, this property contains the application's default font.</p>
216
 
<p>Access functions:</p>
217
 
<ul>
218
 
<li><div class="fn"></div><b>QFont font () const</b></li>
219
 
<li><div class="fn"></div><b>void setFont ( const QFont &amp; <i>font</i> )</b></li>
220
 
</ul>
 
240
<p><b>Access functions:</b></p>
 
241
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
242
<tr><td class="memItemLeft" align="right" valign="top">QFont </td><td class="memItemRight" valign="bottom"><b>font</b> () const</td></tr>
 
243
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setFont</b> ( const QFont &amp; <i>font</i> )</td></tr>
 
244
</table>
221
245
<p>See also <a href="qapplication.html#font">QApplication::font</a>(), <a href="qgraphicsscene.html#font-prop">QGraphicsScene::font</a>, and <a href="qfont.html#resolve">QFont::resolve</a>().</p>
 
246
<a name="//apple_ref/cpp/instm/QGraphicsWidget/setGeometry" />
222
247
<h3 class="fn"><a name="geometry-prop"></a>geometry : <a href="qrectf.html">QRectF</a></h3>
223
248
<p>This property holds the geometry of the widget.</p>
224
249
<p>Sets the item's geometry to <i>rect</i>. The item's position and size are modified as a result of calling this function. The item is first moved, then resized.</p>
225
250
<p>A side effect of calling this function is that the widget will receive a move event and a resize event. Also, if the widget has a layout assigned, the layout will activate.</p>
226
 
<p>Access functions:</p>
227
 
<ul>
228
 
<li><div class="fn"></div><b>virtual void setGeometry ( const QRectF &amp; <i>rect</i> )</b></li>
229
 
<li><div class="fn"></div><b>void setGeometry ( qreal <i>x</i>, qreal <i>y</i>, qreal <i>w</i>, qreal <i>h</i> )</b></li>
230
 
</ul>
 
251
<p><b>Access functions:</b></p>
 
252
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
253
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b>setGeometry</b> ( const QRectF &amp; <i>rect</i> )</td></tr>
 
254
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setGeometry</b> ( qreal <i>x</i>, qreal <i>y</i>, qreal <i>w</i>, qreal <i>h</i> )</td></tr>
 
255
</table>
231
256
<p>See also <a href="qgraphicslayoutitem.html#geometry">geometry</a>() and <a href="qgraphicswidget.html#size-prop">resize</a>().</p>
 
257
<a name="//apple_ref/cpp/instm/QGraphicsWidget/layoutDirection" />
 
258
<a name="//apple_ref/cpp/instm/QGraphicsWidget/setLayoutDirection" />
 
259
<a name="//apple_ref/cpp/instm/QGraphicsWidget/unsetLayoutDirection" />
232
260
<h3 class="fn"><a name="layoutDirection-prop"></a>layoutDirection : <a href="qt.html#LayoutDirection-enum">Qt::LayoutDirection</a></h3>
233
261
<p>This property holds the layout direction for this widget.</p>
234
262
<p>This property modifies this widget's and all of its descendants' <a href="qt.html#WidgetAttribute-enum">Qt::WA_RightToLeft</a> attribute. It also sets this widget's <a href="qt.html#WidgetAttribute-enum">Qt::WA_SetLayoutDirection</a> attribute.</p>
235
263
<p>The widget's layout direction determines the order in which the layout manager horizontally arranges subwidgets of this widget. The default value depends on the language and locale of the application, and is typically in the same direction as words are read and written. With <a href="qt.html#LayoutDirection-enum">Qt::LeftToRight</a>, the layout starts placing subwidgets from the left side of this widget towards the right. <a href="qt.html#LayoutDirection-enum">Qt::RightToLeft</a> does the opposite - the layout will place widgets starting from the right edge moving towards the left.</p>
236
264
<p>Subwidgets inherit their layout direction from the parent. Top-level widget items inherit their layout direction from QGraphicsScene::layoutDirection. If you change a widget's layout direction by calling setLayoutDirection(), the widget will send itself a <a href="qevent.html#Type-enum">LayoutDirectionChange</a> event, and then propagate the new layout direction to all its descendants.</p>
237
 
<p>Access functions:</p>
238
 
<ul>
239
 
<li><div class="fn"></div><b>Qt::LayoutDirection layoutDirection () const</b></li>
240
 
<li><div class="fn"></div><b>void setLayoutDirection ( Qt::LayoutDirection <i>direction</i> )</b></li>
241
 
<li><div class="fn"></div><b>void unsetLayoutDirection ()</b></li>
242
 
</ul>
 
265
<p><b>Access functions:</b></p>
 
266
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
267
<tr><td class="memItemLeft" align="right" valign="top">Qt::LayoutDirection </td><td class="memItemRight" valign="bottom"><b>layoutDirection</b> () const</td></tr>
 
268
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setLayoutDirection</b> ( Qt::LayoutDirection <i>direction</i> )</td></tr>
 
269
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>unsetLayoutDirection</b> ()</td></tr>
 
270
</table>
243
271
<p>See also <a href="qwidget.html#layoutDirection-prop">QWidget::layoutDirection</a> and <a href="qapplication.html#layoutDirection-prop">QApplication::layoutDirection</a>.</p>
244
 
<h3 class="fn"><a name="opacity-prop"></a>opacity : const <a href="qtglobal.html#qreal-typedef">qreal</a></h3>
245
 
<p>This property holds the opacity of the widget.</p>
 
272
<a name="//apple_ref/cpp/instm/QGraphicsWidget/palette" />
 
273
<a name="//apple_ref/cpp/instm/QGraphicsWidget/setPalette" />
246
274
<h3 class="fn"><a name="palette-prop"></a>palette : <a href="qpalette.html">QPalette</a></h3>
247
275
<p>This property holds the widget's palette.</p>
248
276
<p>This property provides the widget's palette. The palette provides colors and brushes for color groups (e.g&#x2e;, <a href="qpalette.html#ColorRole-enum">QPalette::Button</a>) and states (e.g&#x2e;, <a href="qpalette.html#ColorGroup-enum">QPalette::Inactive</a>), loosely defining the general look of the widget and its children.</p>
249
277
<p><a href="qpalette.html">QPalette</a> consists of color groups that have been explicitly defined, and groups that are implicitly inherited from the widget's parent. Because of this, palette() can return a different palette than what has been set with setPalette(). This scheme allows you to define single entries in a palette without affecting the palette's inherited entries.</p>
250
278
<p>When a widget's palette changes, it resolves its entries against its parent widget, or if it doesn't have a parent widget, it resolves against the scene. It then sends itself a <a href="qevent.html#Type-enum">PaletteChange</a> event, and notifies all its descendants so they can resolve their palettes as well.</p>
251
279
<p>By default, this property contains the application's default palette.</p>
252
 
<p>Access functions:</p>
253
 
<ul>
254
 
<li><div class="fn"></div><b>QPalette palette () const</b></li>
255
 
<li><div class="fn"></div><b>void setPalette ( const QPalette &amp; <i>palette</i> )</b></li>
256
 
</ul>
 
280
<p><b>Access functions:</b></p>
 
281
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
282
<tr><td class="memItemLeft" align="right" valign="top">QPalette </td><td class="memItemRight" valign="bottom"><b>palette</b> () const</td></tr>
 
283
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setPalette</b> ( const QPalette &amp; <i>palette</i> )</td></tr>
 
284
</table>
257
285
<p>See also <a href="qapplication.html#palette">QApplication::palette</a>(), <a href="qgraphicsscene.html#palette-prop">QGraphicsScene::palette</a>, and <a href="qpalette.html#resolve">QPalette::resolve</a>().</p>
258
 
<h3 class="fn"><a name="pos-prop"></a>pos : const <a href="qpointf.html">QPointF</a></h3>
259
 
<p>This property holds the position of the widget.</p>
 
286
<a name="//apple_ref/cpp/instm/QGraphicsWidget/size" />
 
287
<a name="//apple_ref/cpp/instm/QGraphicsWidget/resize" />
260
288
<h3 class="fn"><a name="size-prop"></a>size : <a href="qsizef.html">QSizeF</a></h3>
261
289
<p>This property holds the size of the widget.</p>
262
290
<p>Calling resize() resizes the widget to a <i>size</i> bounded by <a href="qgraphicslayoutitem.html#minimumSize">minimumSize</a>() and <a href="qgraphicslayoutitem.html#maximumSize">maximumSize</a>(). This property only affects the widget's width and height (e.g&#x2e;, its right and bottom edges); the widget's position and top-left corner remains unaffected.</p>
263
291
<p>Resizing a widget triggers the widget to immediately receive a <a href="qevent.html#Type-enum">GraphicsSceneResize</a> event with the widget's old and new size. If the widget has a layout assigned when this event arrives, the layout will be activated and it will automatically update any child widgets's geometry.</p>
264
292
<p>This property does not affect any layout of the parent widget. If the widget itself is managed by a parent layout; e.g&#x2e;, it has a parent widget with a layout assigned, that layout will not activate.</p>
265
293
<p>By default, this property contains a size with zero width and height.</p>
266
 
<p>Access functions:</p>
267
 
<ul>
268
 
<li><div class="fn"></div><b>QSizeF size () const</b></li>
269
 
<li><div class="fn"></div><b>void resize ( const QSizeF &amp; <i>size</i> )</b></li>
270
 
<li><div class="fn"></div><b>void resize ( qreal <i>w</i>, qreal <i>h</i> )</b></li>
271
 
</ul>
 
294
<p><b>Access functions:</b></p>
 
295
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
296
<tr><td class="memItemLeft" align="right" valign="top">QSizeF </td><td class="memItemRight" valign="bottom"><b>size</b> () const</td></tr>
 
297
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>resize</b> ( const QSizeF &amp; <i>size</i> )</td></tr>
 
298
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>resize</b> ( qreal <i>w</i>, qreal <i>h</i> )</td></tr>
 
299
</table>
272
300
<p>See also <a href="qgraphicswidget.html#geometry-prop">setGeometry</a>(), <a href="qgraphicssceneresizeevent.html">QGraphicsSceneResizeEvent</a>, and <a href="qgraphicslayout.html">QGraphicsLayout</a>.</p>
273
 
<h3 class="fn"><a name="visible-prop"></a>visible : const bool</h3>
274
 
<p>This property holds whether the item is visible or not.</p>
275
 
<p>This property is declared in <a href="qgraphicsitem.html">QGraphicsItem</a>.</p>
276
 
<p>By default, this property is true.</p>
277
 
<p>See also <a href="qgraphicsitem.html#isVisible">QGraphicsItem::isVisible</a>(), <a href="qgraphicsitem.html#setVisible">QGraphicsItem::setVisible</a>(), <a href="qgraphicsitem.html#show">show</a>(), and <a href="qgraphicsitem.html#hide">hide</a>().</p>
 
301
<a name="//apple_ref/cpp/instm/QGraphicsWidget/windowFlags" />
 
302
<a name="//apple_ref/cpp/instm/QGraphicsWidget/setWindowFlags" />
278
303
<h3 class="fn"><a name="windowFlags-prop"></a>windowFlags : <a href="qt.html#WindowType-enum">Qt::WindowFlags</a></h3>
279
304
<p>This property holds the widget's window flags.</p>
280
305
<p>Window flags are a combination of a window type (e.g&#x2e;, <a href="qt.html#WindowType-enum">Qt::Dialog</a>) and several flags giving hints on the behavior of the window. The behavior is platform-dependent.</p>
281
306
<p>By default, this property contains no window flags.</p>
282
 
<p>Access functions:</p>
283
 
<ul>
284
 
<li><div class="fn"></div><b>Qt::WindowFlags windowFlags () const</b></li>
285
 
<li><div class="fn"></div><b>void setWindowFlags ( Qt::WindowFlags <i>wFlags</i> )</b></li>
286
 
</ul>
 
307
<p>Windows are panels. If you set the <a href="qt.html#WindowType-enum">Qt::Window</a> flag, the <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemIsPanel</a> flag will be set automatically. If you clear the <a href="qt.html#WindowType-enum">Qt::Window</a> flag, the <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemIsPanel</a> flag is also cleared. Note that the <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemIsPanel</a> flag can be set independently of <a href="qt.html#WindowType-enum">Qt::Window</a>.</p>
 
308
<p><b>Access functions:</b></p>
 
309
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
310
<tr><td class="memItemLeft" align="right" valign="top">Qt::WindowFlags </td><td class="memItemRight" valign="bottom"><b>windowFlags</b> () const</td></tr>
 
311
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setWindowFlags</b> ( Qt::WindowFlags <i>wFlags</i> )</td></tr>
 
312
</table>
 
313
<p>See also <a href="qgraphicsitem.html#isWindow">isWindow</a>() and <a href="qgraphicsitem.html#isPanel">isPanel</a>().</p>
 
314
<a name="//apple_ref/cpp/instm/QGraphicsWidget/windowTitle" />
 
315
<a name="//apple_ref/cpp/instm/QGraphicsWidget/setWindowTitle" />
287
316
<h3 class="fn"><a name="windowTitle-prop"></a>windowTitle : <a href="qstring.html">QString</a></h3>
288
317
<p>This property holds this property holds the window title (caption).</p>
289
318
<p>This property is only used for windows.</p>
290
319
<p>By default, if no title has been set, this property contains an empty string.</p>
291
 
<p>Access functions:</p>
292
 
<ul>
293
 
<li><div class="fn"></div><b>QString windowTitle () const</b></li>
294
 
<li><div class="fn"></div><b>void setWindowTitle ( const QString &amp; <i>title</i> )</b></li>
295
 
</ul>
 
320
<p><b>Access functions:</b></p>
 
321
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
322
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b>windowTitle</b> () const</td></tr>
 
323
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setWindowTitle</b> ( const QString &amp; <i>title</i> )</td></tr>
 
324
</table>
296
325
<hr />
297
326
<h2>Member Function Documentation</h2>
 
327
<a name="//apple_ref/cpp/instm/QGraphicsWidget/QGraphicsWidget" />
298
328
<h3 class="fn"><a name="QGraphicsWidget"></a>QGraphicsWidget::QGraphicsWidget ( <a href="qgraphicsitem.html">QGraphicsItem</a> * <i>parent</i> = 0, <a href="qt.html#WindowType-enum">Qt::WindowFlags</a> <i>wFlags</i> = 0 )</h3>
299
329
<p>Constructs a <a href="qgraphicswidget.html">QGraphicsWidget</a> instance. The optional <i>parent</i> argument is passed to <a href="qgraphicsitem.html">QGraphicsItem</a>'s constructor. The optional <i>wFlags</i> argument specifies the widget's window flags (e.g&#x2e;, whether the widget should be a window, a tool, a popup, etc).</p>
 
330
<a name="//apple_ref/cpp/instm/QGraphicsWidget/~QGraphicsWidget" />
300
331
<h3 class="fn"><a name="dtor.QGraphicsWidget"></a>QGraphicsWidget::~QGraphicsWidget ()</h3>
301
332
<p>Destroys the <a href="qgraphicswidget.html">QGraphicsWidget</a> instance.</p>
 
333
<a name="//apple_ref/cpp/instm/QGraphicsWidget/actions" />
302
334
<h3 class="fn"><a name="actions"></a><a href="qlist.html">QList</a>&lt;<a href="qaction.html">QAction</a> *&gt; QGraphicsWidget::actions () const</h3>
303
335
<p>Returns the (possibly empty) list of this widget's actions.</p>
304
336
<p>This function was introduced in Qt 4.5.</p>
305
337
<p>See also <a href="qgraphicswidget.html#insertAction">insertAction</a>(), <a href="qgraphicswidget.html#removeAction">removeAction</a>(), <a href="qwidget.html#actions">QWidget::actions</a>(), <a href="qaction.html#associatedWidgets">QAction::associatedWidgets</a>(), and <a href="qaction.html#associatedGraphicsWidgets">QAction::associatedGraphicsWidgets</a>().</p>
 
338
<a name="//apple_ref/cpp/instm/QGraphicsWidget/addAction" />
306
339
<h3 class="fn"><a name="addAction"></a>void QGraphicsWidget::addAction ( <a href="qaction.html">QAction</a> * <i>action</i> )</h3>
307
340
<p>Appends the action <i>action</i> to this widget's list of actions.</p>
308
341
<p>All QGraphicsWidgets have a list of <a href="qaction.html">QAction</a>s, however they can be represented graphically in many different ways. The default use of the <a href="qaction.html">QAction</a> list (as returned by <a href="qgraphicswidget.html#actions">actions</a>()) is to create a context <a href="qmenu.html">QMenu</a>.</p>
309
342
<p>A <a href="qgraphicswidget.html">QGraphicsWidget</a> should only have one of each action and adding an action it already has will not cause the same action to be in the widget twice.</p>
310
343
<p>This function was introduced in Qt 4.5.</p>
311
344
<p>See also <a href="qgraphicswidget.html#removeAction">removeAction</a>(), <a href="qgraphicswidget.html#insertAction">insertAction</a>(), <a href="qgraphicswidget.html#actions">actions</a>(), and <a href="qwidget.html#addAction">QWidget::addAction</a>().</p>
 
345
<a name="//apple_ref/cpp/instm/QGraphicsWidget/addActions" />
312
346
<h3 class="fn"><a name="addActions"></a>void QGraphicsWidget::addActions ( <a href="qlist.html">QList</a>&lt;<a href="qaction.html">QAction</a> *&gt; <i>actions</i> )</h3>
313
347
<p>Appends the actions <i>actions</i> to this widget's list of actions.</p>
314
348
<p>This function was introduced in Qt 4.5.</p>
315
349
<p>See also <a href="qgraphicswidget.html#removeAction">removeAction</a>(), <a href="qmenu.html">QMenu</a>, <a href="qgraphicswidget.html#addAction">addAction</a>(), and <a href="qwidget.html#addActions">QWidget::addActions</a>().</p>
 
350
<a name="//apple_ref/cpp/instm/QGraphicsWidget/adjustSize" />
316
351
<h3 class="fn"><a name="adjustSize"></a>void QGraphicsWidget::adjustSize ()</h3>
317
352
<p>Adjusts the size of the widget to its effective preferred size hint.</p>
318
353
<p>This function is called implicitly when the item is shown for the first time.</p>
319
354
<p>See also <a href="qgraphicslayoutitem.html#effectiveSizeHint">effectiveSizeHint</a>() and <a href="qt.html#SizeHint-enum">Qt::MinimumSize</a>.</p>
 
355
<a name="//apple_ref/cpp/instm/QGraphicsWidget/boundingRect" />
 
356
<h3 class="fn"><a name="boundingRect"></a><a href="qrectf.html">QRectF</a> QGraphicsWidget::boundingRect () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
357
<p>Reimplemented from <a href="qgraphicsitem.html#boundingRect">QGraphicsItem::boundingRect</a>().</p>
 
358
<a name="//apple_ref/cpp/instm/QGraphicsWidget/changeEvent" />
320
359
<h3 class="fn"><a name="changeEvent"></a>void QGraphicsWidget::changeEvent ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
321
360
<p>This event handler can be reimplemented to handle state changes.</p>
322
361
<p>The state being changed in this event can be retrieved through <i>event</i>.</p>
323
362
<p>Change events include: <a href="qevent.html#Type-enum">QEvent::ActivationChange</a>, <a href="qevent.html#Type-enum">QEvent::EnabledChange</a>, <a href="qevent.html#Type-enum">QEvent::FontChange</a>, <a href="qevent.html#Type-enum">QEvent::StyleChange</a>, <a href="qevent.html#Type-enum">QEvent::PaletteChange</a>, <a href="qevent.html#Type-enum">QEvent::ParentChange</a>, <a href="qevent.html#Type-enum">QEvent::LayoutDirectionChange</a>, and <a href="qevent.html#Type-enum">QEvent::ContentsRectChange</a>.</p>
324
 
<h3 class="fn"><a name="children"></a>const <a href="qobject.html#QObjectList-typedef">QObjectList</a> &amp; QGraphicsWidget::children () const</h3>
325
 
<p>This function returns the same value as <a href="qobject.html#children">QObject::children</a>(). It's provided to differentiate between the obsolete member <a href="qgraphicsitem-obsolete.html#children">QGraphicsItem::children</a>() and <a href="qobject.html#children">QObject::children</a>(). <a href="qgraphicsitem.html">QGraphicsItem</a> now provides <a href="qgraphicsitem.html#childItems">childItems</a>() instead.</p>
 
363
<a name="//apple_ref/cpp/instm/QGraphicsWidget/close" />
326
364
<h3 class="fn"><a name="close"></a>bool QGraphicsWidget::close ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
327
365
<p>Call this function to close the widget.</p>
328
366
<p>Returns true if the widget was closed; otherwise returns false. This slot will first send a <a href="qcloseevent.html">QCloseEvent</a> to the widget, which may or may not accept the event. If the event was ignored, nothing happens. If the event was accepted, it will <a href="qgraphicsitem.html#hide">hide</a>() the widget.</p>
329
367
<p>If the widget has the <a href="qt.html#WidgetAttribute-enum">Qt::WA_DeleteOnClose</a> attribute set it will be deleted.</p>
 
368
<a name="//apple_ref/cpp/instm/QGraphicsWidget/closeEvent" />
330
369
<h3 class="fn"><a name="closeEvent"></a>void QGraphicsWidget::closeEvent ( <a href="qcloseevent.html">QCloseEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
331
370
<p>This event handler, for <i>event</i>, can be reimplemented in a subclass to receive widget close events. The default implementation accepts the event.</p>
332
371
<p>See also <a href="qgraphicswidget.html#close">close</a>() and <a href="qcloseevent.html">QCloseEvent</a>.</p>
 
372
<a name="//apple_ref/cpp/instm/QGraphicsWidget/event" />
 
373
<h3 class="fn"><a name="event"></a>bool QGraphicsWidget::event ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
374
<p>Reimplemented from <a href="qobject.html#event">QObject::event</a>().</p>
 
375
<p>Handles the <i>event</i>. <a href="qgraphicswidget.html">QGraphicsWidget</a> handles the following events:</p>
 
376
<p><table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
 
377
<tr valign="top" class="odd"><td>Polish</td><td>Delivered to the widget some time after it has been shown.</td></tr>
 
378
<tr valign="top" class="even"><td>GraphicsSceneMove</td><td>Delivered to the widget after its local position has changed.</td></tr>
 
379
<tr valign="top" class="odd"><td>GraphicsSceneResize</td><td>Delivered to the widget after its size has changed.</td></tr>
 
380
<tr valign="top" class="even"><td>Show</td><td>Delivered to the widget before it has been shown.</td></tr>
 
381
<tr valign="top" class="odd"><td>Hide</td><td>Delivered to the widget after it has been hidden.</td></tr>
 
382
<tr valign="top" class="even"><td>PaletteChange</td><td>Delivered to the widget after its palette has changed.</td></tr>
 
383
<tr valign="top" class="odd"><td>FontChange</td><td>Delivered to the widget after its font has changed.</td></tr>
 
384
<tr valign="top" class="even"><td>EnabledChange</td><td>Delivered to the widget after its enabled state has changed.</td></tr>
 
385
<tr valign="top" class="odd"><td>StyleChange</td><td>Delivered to the widget after its style has changed.</td></tr>
 
386
<tr valign="top" class="even"><td>LayoutDirectionChange</td><td>Delivered to the widget after its layout direction has changed.</td></tr>
 
387
<tr valign="top" class="odd"><td>ContentsRectChange</td><td>Delivered to the widget after its contents margins/ contents rect has changed.</td></tr>
 
388
</table></p>
 
389
<a name="//apple_ref/cpp/instm/QGraphicsWidget/focusInEvent" />
 
390
<h3 class="fn"><a name="focusInEvent"></a>void QGraphicsWidget::focusInEvent ( <a href="qfocusevent.html">QFocusEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
391
<p>Reimplemented from <a href="qgraphicsitem.html#focusInEvent">QGraphicsItem::focusInEvent</a>().</p>
 
392
<a name="//apple_ref/cpp/instm/QGraphicsWidget/focusNextPrevChild" />
333
393
<h3 class="fn"><a name="focusNextPrevChild"></a>bool QGraphicsWidget::focusNextPrevChild ( bool <i>next</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
334
394
<p>Finds a new widget to give the keyboard focus to, as appropriate for Tab and Shift+Tab, and returns true if it can find a new widget; returns false otherwise. If <i>next</i> is true, this function searches forward; if <i>next</i> is false, it searches backward.</p>
335
395
<p>Sometimes, you will want to reimplement this function to provide special focus handling for your widget and its subwidgets. For example, a web browser might reimplement it to move its current active link forward or backward, and call the base implementation only when it reaches the last or first link on the page.</p>
336
396
<p>Child widgets call focusNextPrevChild() on their parent widgets, but only the window that contains the child widgets decides where to redirect focus. By reimplementing this function for an object, you gain control of focus traversal for all child widgets.</p>
337
397
<p>See also <a href="qgraphicswidget.html#focusPolicy-prop">focusPolicy</a>().</p>
 
398
<a name="//apple_ref/cpp/instm/QGraphicsWidget/focusOutEvent" />
 
399
<h3 class="fn"><a name="focusOutEvent"></a>void QGraphicsWidget::focusOutEvent ( <a href="qfocusevent.html">QFocusEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
400
<p>Reimplemented from <a href="qgraphicsitem.html#focusOutEvent">QGraphicsItem::focusOutEvent</a>().</p>
 
401
<a name="//apple_ref/cpp/instm/QGraphicsWidget/focusWidget" />
338
402
<h3 class="fn"><a name="focusWidget"></a>QGraphicsWidget * QGraphicsWidget::focusWidget () const</h3>
339
 
<p>If this widget, a child or descendant of this widget currently has input focus, this function will return a pointer to that widget. If no descendant has input focus, 0 is returned.</p>
340
 
<p>See also <a href="qwidget.html#focusWidget">QWidget::focusWidget</a>().</p>
 
403
<p>If this widget, a child or descendant of this widget currently has input focus, this function will return a pointer to that widget. If no descendant widget has input focus, 0 is returned.</p>
 
404
<p>See also <a href="qgraphicsitem.html#focusItem">QGraphicsItem::focusItem</a>() and <a href="qwidget.html#focusWidget">QWidget::focusWidget</a>().</p>
 
405
<a name="//apple_ref/cpp/instm/QGraphicsWidget/getContentsMargins" />
341
406
<h3 class="fn"><a name="getContentsMargins"></a>void QGraphicsWidget::getContentsMargins ( <a href="qtglobal.html#qreal-typedef">qreal</a> * <i>left</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> * <i>top</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> * <i>right</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> * <i>bottom</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
407
<p>Reimplemented from <a href="qgraphicslayoutitem.html#getContentsMargins">QGraphicsLayoutItem::getContentsMargins</a>().</p>
342
408
<p>Gets the widget's contents margins. The margins are stored in <i>left</i>, <i>top</i>, <i>right</i> and <i>bottom</i>, as pointers to qreals. Each argument can be <i>omitted</i> by passing 0.</p>
343
 
<p>Reimplemented from <a href="qgraphicslayoutitem.html#getContentsMargins">QGraphicsLayoutItem</a>.</p>
344
409
<p>See also <a href="qgraphicswidget.html#setContentsMargins">setContentsMargins</a>().</p>
 
410
<a name="//apple_ref/cpp/instm/QGraphicsWidget/getWindowFrameMargins" />
345
411
<h3 class="fn"><a name="getWindowFrameMargins"></a>void QGraphicsWidget::getWindowFrameMargins ( <a href="qtglobal.html#qreal-typedef">qreal</a> * <i>left</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> * <i>top</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> * <i>right</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> * <i>bottom</i> ) const</h3>
346
412
<p>Gets the widget's window frame margins. The margins are stored in <i>left</i>, <i>top</i>, <i>right</i> and <i>bottom</i> as pointers to qreals. Each argument can be <i>omitted</i> by passing 0.</p>
347
413
<p>See also <a href="qgraphicswidget.html#setWindowFrameMargins">setWindowFrameMargins</a>() and <a href="qgraphicswidget.html#windowFrameRect">windowFrameRect</a>().</p>
 
414
<a name="//apple_ref/cpp/instm/QGraphicsWidget/grabKeyboardEvent" />
348
415
<h3 class="fn"><a name="grabKeyboardEvent"></a>void QGraphicsWidget::grabKeyboardEvent ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
349
416
<p>This event handler, for <i>event</i>, can be reimplemented in a subclass to receive notifications for Qt::GrabKeyboard events.</p>
350
417
<p>See also <a href="qgraphicsitem.html#grabKeyboard">grabKeyboard</a>() and <a href="qgraphicsitem.html#grabMouse">grabMouse</a>().</p>
 
418
<a name="//apple_ref/cpp/instm/QGraphicsWidget/grabMouseEvent" />
351
419
<h3 class="fn"><a name="grabMouseEvent"></a>void QGraphicsWidget::grabMouseEvent ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
352
420
<p>This event handler, for <i>event</i>, can be reimplemented in a subclass to receive notifications for Qt::GrabMouse events.</p>
353
421
<p>See also <a href="qgraphicsitem.html#grabMouse">grabMouse</a>() and <a href="qgraphicsitem.html#grabKeyboard">grabKeyboard</a>().</p>
 
422
<a name="//apple_ref/cpp/instm/QGraphicsWidget/grabShortcut" />
354
423
<h3 class="fn"><a name="grabShortcut"></a>int QGraphicsWidget::grabShortcut ( const <a href="qkeysequence.html">QKeySequence</a> &amp; <i>sequence</i>, <a href="qt.html#ShortcutContext-enum">Qt::ShortcutContext</a> <i>context</i> = Qt::WindowShortcut )</h3>
355
424
<p>Adds a shortcut to Qt's shortcut system that watches for the given key <i>sequence</i> in the given <i>context</i>. If the <i>context</i> is <a href="qt.html#ShortcutContext-enum">Qt::ApplicationShortcut</a>, the shortcut applies to the application as a whole. Otherwise, it is either local to this widget, <a href="qt.html#ShortcutContext-enum">Qt::WidgetShortcut</a>, or to the window itself, <a href="qt.html#ShortcutContext-enum">Qt::WindowShortcut</a>. For widgets that are not part of a window (i.e&#x2e;, top-level widgets and their children), <a href="qt.html#ShortcutContext-enum">Qt::WindowShortcut</a> shortcuts apply to the scene.</p>
356
425
<p>If the same key <i>sequence</i> has been grabbed by several widgets, when the key <i>sequence</i> occurs a <a href="qevent.html#Type-enum">QEvent::Shortcut</a> event is sent to all the widgets to which it applies in a non-deterministic order, but with the ``ambiguous'' flag set to true.</p>
357
426
<p><b>Warning:</b> You should not normally need to use this function; instead create <a href="qaction.html">QAction</a>s with the shortcut key sequences you require (if you also want equivalent menu options and toolbar buttons), or create <a href="qshortcut.html">QShortcut</a>s if you just need key sequences. Both <a href="qaction.html">QAction</a> and <a href="qshortcut.html">QShortcut</a> handle all the event filtering for you, and provide signals which are triggered when the user triggers the key sequence, so are much easier to use than this low-level function.</p>
358
427
<p>This function was introduced in Qt 4.5.</p>
359
428
<p>See also <a href="qgraphicswidget.html#releaseShortcut">releaseShortcut</a>(), <a href="qgraphicswidget.html#setShortcutEnabled">setShortcutEnabled</a>(), and <a href="qwidget.html#grabShortcut">QWidget::grabShortcut</a>().</p>
 
429
<a name="//apple_ref/cpp/instm/QGraphicsWidget/hideEvent" />
360
430
<h3 class="fn"><a name="hideEvent"></a>void QGraphicsWidget::hideEvent ( <a href="qhideevent.html">QHideEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
361
431
<p>This event handler, for <a href="qevent.html#Type-enum">Hide</a> events, is delivered after the widget has been hidden, for example, setVisible(false) has been called for the widget or one of its ancestors when the widget was previously shown.</p>
362
432
<p>You can reimplement this event handler to detect when your widget is hidden. Calling <a href="qevent.html#accept">QEvent::accept</a>() or <a href="qevent.html#ignore">QEvent::ignore</a>() on <i>event</i> has no effect.</p>
363
433
<p>See also <a href="qgraphicswidget.html#showEvent">showEvent</a>(), <a href="qwidget.html#hideEvent">QWidget::hideEvent</a>(), and <a href="qgraphicsitem.html#GraphicsItemChange-enum">ItemVisibleChange</a>.</p>
 
434
<a name="//apple_ref/cpp/instm/QGraphicsWidget/hoverLeaveEvent" />
 
435
<h3 class="fn"><a name="hoverLeaveEvent"></a>void QGraphicsWidget::hoverLeaveEvent ( <a href="qgraphicsscenehoverevent.html">QGraphicsSceneHoverEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
436
<p>Reimplemented from <a href="qgraphicsitem.html#hoverLeaveEvent">QGraphicsItem::hoverLeaveEvent</a>().</p>
 
437
<a name="//apple_ref/cpp/instm/QGraphicsWidget/hoverMoveEvent" />
 
438
<h3 class="fn"><a name="hoverMoveEvent"></a>void QGraphicsWidget::hoverMoveEvent ( <a href="qgraphicsscenehoverevent.html">QGraphicsSceneHoverEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
439
<p>Reimplemented from <a href="qgraphicsitem.html#hoverMoveEvent">QGraphicsItem::hoverMoveEvent</a>().</p>
 
440
<a name="//apple_ref/cpp/instm/QGraphicsWidget/initStyleOption" />
364
441
<h3 class="fn"><a name="initStyleOption"></a>void QGraphicsWidget::initStyleOption ( <a href="qstyleoption.html">QStyleOption</a> * <i>option</i> ) const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
365
442
<p>Populates a style option object for this widget based on its current state, and stores the output in <i>option</i>. The default implementation populates <i>option</i> with the following properties.</p>
366
 
<p><table align="center" cellpadding="2" cellspacing="1" border="0">
 
443
<p><table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
367
444
<thead><tr valign="top" class="qt-style"><th>Style Option Property</th><th>Value</th></tr></thead>
368
445
<tr valign="top" class="odd"><td>state &amp; <a href="qstyle.html#StateFlag-enum">QStyle::State_Enabled</a></td><td>Corresponds to <a href="qgraphicsitem.html#isEnabled">QGraphicsItem::isEnabled</a>().</td></tr>
369
446
<tr valign="top" class="even"><td>state &amp; <a href="qstyle.html#StateFlag-enum">QStyle::State_HasFocus</a></td><td>Corresponds to <a href="qgraphicsitem.html#hasFocus">QGraphicsItem::hasFocus</a>().</td></tr>
385
462
     }
386
463
 }</pre>
387
464
<p>See also <a href="qstyleoption.html#initFrom">QStyleOption::initFrom</a>().</p>
 
465
<a name="//apple_ref/cpp/instm/QGraphicsWidget/insertAction" />
388
466
<h3 class="fn"><a name="insertAction"></a>void QGraphicsWidget::insertAction ( <a href="qaction.html">QAction</a> * <i>before</i>, <a href="qaction.html">QAction</a> * <i>action</i> )</h3>
389
467
<p>Inserts the action <i>action</i> to this widget's list of actions, before the action <i>before</i>. It appends the action if <i>before</i> is 0 or <i>before</i> is not a valid action for this widget.</p>
390
468
<p>A <a href="qgraphicswidget.html">QGraphicsWidget</a> should only have one of each action.</p>
391
469
<p>This function was introduced in Qt 4.5.</p>
392
470
<p>See also <a href="qgraphicswidget.html#removeAction">removeAction</a>(), <a href="qgraphicswidget.html#addAction">addAction</a>(), <a href="qmenu.html">QMenu</a>, <a href="qgraphicswidget.html#actions">actions</a>(), and <a href="qwidget.html#insertActions">QWidget::insertActions</a>().</p>
 
471
<a name="//apple_ref/cpp/instm/QGraphicsWidget/insertActions" />
393
472
<h3 class="fn"><a name="insertActions"></a>void QGraphicsWidget::insertActions ( <a href="qaction.html">QAction</a> * <i>before</i>, <a href="qlist.html">QList</a>&lt;<a href="qaction.html">QAction</a> *&gt; <i>actions</i> )</h3>
394
473
<p>Inserts the actions <i>actions</i> to this widget's list of actions, before the action <i>before</i>. It appends the action if <i>before</i> is 0 or <i>before</i> is not a valid action for this widget.</p>
395
474
<p>A <a href="qgraphicswidget.html">QGraphicsWidget</a> can have at most one of each action.</p>
396
475
<p>This function was introduced in Qt 4.5.</p>
397
476
<p>See also <a href="qgraphicswidget.html#removeAction">removeAction</a>(), <a href="qmenu.html">QMenu</a>, <a href="qgraphicswidget.html#insertAction">insertAction</a>(), and <a href="qwidget.html#insertActions">QWidget::insertActions</a>().</p>
 
477
<a name="//apple_ref/cpp/instm/QGraphicsWidget/isActiveWindow" />
398
478
<h3 class="fn"><a name="isActiveWindow"></a>bool QGraphicsWidget::isActiveWindow () const</h3>
399
479
<p>Returns true if this widget's window is in the active window, or if the widget does not have a window but is in an active scene (i.e&#x2e;, a scene that currently has focus).</p>
400
480
<p>The active window is the window that either contains a child widget that currently has input focus, or that itself has input focus.</p>
401
 
<p>See also <a href="qgraphicsscene.html#activeWindow">QGraphicsScene::activeWindow</a>() and <a href="qgraphicsscene.html#setActiveWindow">QGraphicsScene::setActiveWindow</a>().</p>
 
481
<p>See also <a href="qgraphicsscene.html#activeWindow">QGraphicsScene::activeWindow</a>(), <a href="qgraphicsscene.html#setActiveWindow">QGraphicsScene::setActiveWindow</a>(), and <a href="qgraphicsitem.html#isActive">isActive</a>().</p>
 
482
<a name="//apple_ref/cpp/instm/QGraphicsWidget/itemChange" />
 
483
<h3 class="fn"><a name="itemChange"></a><a href="qvariant.html">QVariant</a> QGraphicsWidget::itemChange ( <a href="qgraphicsitem.html#GraphicsItemChange-enum">GraphicsItemChange</a> <i>change</i>, const <a href="qvariant.html">QVariant</a> &amp; <i>value</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
484
<p>Reimplemented from <a href="qgraphicsitem.html#itemChange">QGraphicsItem::itemChange</a>().</p>
 
485
<p><a href="qgraphicswidget.html">QGraphicsWidget</a> uses the base implementation of this function to catch and deliver events related to state changes in the item. Because of this, it is very important that subclasses call the base implementation.</p>
 
486
<p><i>change</i> specifies the type of change, and <i>value</i> is the new value.</p>
 
487
<p>For example, <a href="qgraphicswidget.html">QGraphicsWidget</a> uses <a href="qgraphicsitem.html#GraphicsItemChange-enum">ItemVisibleChange</a> to deliver <a href="qevent.html#Type-enum">Show</a> and <a href="qevent.html#Type-enum">Hide</a> events, <a href="qgraphicsitem.html#GraphicsItemChange-enum">ItemPositionHasChanged</a> to deliver <a href="qevent.html#Type-enum">Move</a> events, and <a href="qgraphicsitem.html#GraphicsItemChange-enum">ItemParentChange</a> both to deliver <a href="qevent.html#Type-enum">ParentChange</a> events, and for managing the focus chain.</p>
 
488
<p><a href="qgraphicswidget.html">QGraphicsWidget</a> enables the <a href="qgraphicsitem.html#GraphicsItemFlag-enum">ItemSendsGeometryChanges</a> flag by default in order to track position changes.</p>
 
489
<p>See also <a href="qgraphicsitem.html#itemChange">QGraphicsItem::itemChange</a>().</p>
 
490
<a name="//apple_ref/cpp/instm/QGraphicsWidget/layout" />
402
491
<h3 class="fn"><a name="layout"></a><a href="qgraphicslayout.html">QGraphicsLayout</a> * QGraphicsWidget::layout () const</h3>
403
492
<p>Returns this widget's layout, or 0 if no layout is currently managing this widget.</p>
404
493
<p>See also <a href="qgraphicswidget.html#setLayout">setLayout</a>().</p>
 
494
<a name="//apple_ref/cpp/instm/QGraphicsWidget/moveEvent" />
405
495
<h3 class="fn"><a name="moveEvent"></a>void QGraphicsWidget::moveEvent ( <a href="qgraphicsscenemoveevent.html">QGraphicsSceneMoveEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
406
496
<p>This event handler, for <a href="qevent.html#Type-enum">GraphicsSceneMove</a> events, is delivered after the widget has moved (e.g&#x2e;, its local position has changed).</p>
407
497
<p>This event is only delivered when the item is moved locally. Calling <a href="qgraphicsitem.html#setTransform">setTransform</a>() or moving any of the item's ancestors does not affect the item's local position.</p>
408
498
<p>You can reimplement this event handler to detect when your widget has moved. Calling <a href="qevent.html#accept">QEvent::accept</a>() or <a href="qevent.html#ignore">QEvent::ignore</a>() on <i>event</i> has no effect.</p>
409
499
<p>See also <a href="qgraphicsitem.html#GraphicsItemChange-enum">ItemPositionChange</a> and <a href="qgraphicsitem.html#GraphicsItemChange-enum">ItemPositionHasChanged</a>.</p>
 
500
<a name="//apple_ref/cpp/instm/QGraphicsWidget/paint" />
 
501
<h3 class="fn"><a name="paint"></a>void QGraphicsWidget::paint ( <a href="qpainter.html">QPainter</a> * <i>painter</i>, const <a href="qstyleoptiongraphicsitem.html">QStyleOptionGraphicsItem</a> * <i>option</i>, <a href="qwidget.html">QWidget</a> * <i>widget</i> = 0 )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
502
<p>Reimplemented from <a href="qgraphicsitem.html#paint">QGraphicsItem::paint</a>().</p>
 
503
<a name="//apple_ref/cpp/instm/QGraphicsWidget/paintWindowFrame" />
410
504
<h3 class="fn"><a name="paintWindowFrame"></a>void QGraphicsWidget::paintWindowFrame ( <a href="qpainter.html">QPainter</a> * <i>painter</i>, const <a href="qstyleoptiongraphicsitem.html">QStyleOptionGraphicsItem</a> * <i>option</i>, <a href="qwidget.html">QWidget</a> * <i>widget</i> = 0 )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
411
505
<p>This virtual function is called by <a href="qgraphicsscene.html">QGraphicsScene</a> to draw the window frame for windows using <i>painter</i>, <i>option</i>, and <i>widget</i>, in local coordinates. The base implementation uses the current style to render the frame and title bar.</p>
412
506
<p>You can reimplement this function in a subclass of <a href="qgraphicswidget.html">QGraphicsWidget</a> to provide custom rendering of the widget's window frame.</p>
413
507
<p>See also <a href="qgraphicsitem.html#paint">QGraphicsItem::paint</a>().</p>
 
508
<a name="//apple_ref/cpp/instm/QGraphicsWidget/polishEvent" />
414
509
<h3 class="fn"><a name="polishEvent"></a>void QGraphicsWidget::polishEvent ()&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
415
510
<p>This event is delivered to the item by the scene at some point after it has been constructed, but before it is shown or otherwise accessed through the scene. You can use this event handler to do last-minute initializations of the widget which require the item to be fully constructed.</p>
416
511
<p>The base implementation does nothing.</p>
 
512
<a name="//apple_ref/cpp/instm/QGraphicsWidget/rect" />
417
513
<h3 class="fn"><a name="rect"></a><a href="qrectf.html">QRectF</a> QGraphicsWidget::rect () const</h3>
418
514
<p>Returns the item's local rect as a <a href="qrectf.html">QRectF</a>. This function is equivalent to <a href="qrectf.html">QRectF</a>(QPointF(), <a href="qgraphicswidget.html#size-prop">size</a>()).</p>
419
515
<p>See also <a href="qgraphicswidget.html#geometry-prop">setGeometry</a>() and <a href="qgraphicswidget.html#size-prop">resize</a>().</p>
 
516
<a name="//apple_ref/cpp/instm/QGraphicsWidget/releaseShortcut" />
420
517
<h3 class="fn"><a name="releaseShortcut"></a>void QGraphicsWidget::releaseShortcut ( int <i>id</i> )</h3>
421
518
<p>Removes the shortcut with the given <i>id</i> from Qt's shortcut system. The widget will no longer receive <a href="qevent.html#Type-enum">QEvent::Shortcut</a> events for the shortcut's key sequence (unless it has other shortcuts with the same key sequence).</p>
422
519
<p><b>Warning:</b> You should not normally need to use this function since Qt's shortcut system removes shortcuts automatically when their parent widget is destroyed. It is best to use <a href="qaction.html">QAction</a> or <a href="qshortcut.html">QShortcut</a> to handle shortcuts, since they are easier to use than this low-level function. Note also that this is an expensive operation.</p>
423
520
<p>This function was introduced in Qt 4.5.</p>
424
521
<p>See also <a href="qgraphicswidget.html#grabShortcut">grabShortcut</a>(), <a href="qgraphicswidget.html#setShortcutEnabled">setShortcutEnabled</a>(), and <a href="qwidget.html#releaseShortcut">QWidget::releaseShortcut</a>().</p>
 
522
<a name="//apple_ref/cpp/instm/QGraphicsWidget/removeAction" />
425
523
<h3 class="fn"><a name="removeAction"></a>void QGraphicsWidget::removeAction ( <a href="qaction.html">QAction</a> * <i>action</i> )</h3>
426
524
<p>Removes the action <i>action</i> from this widget's list of actions.</p>
427
525
<p>This function was introduced in Qt 4.5.</p>
428
526
<p>See also <a href="qgraphicswidget.html#insertAction">insertAction</a>(), <a href="qgraphicswidget.html#actions">actions</a>(), <a href="qgraphicswidget.html#insertAction">insertAction</a>(), and <a href="qwidget.html#removeAction">QWidget::removeAction</a>().</p>
 
527
<a name="//apple_ref/cpp/instm/QGraphicsWidget/resizeEvent" />
429
528
<h3 class="fn"><a name="resizeEvent"></a>void QGraphicsWidget::resizeEvent ( <a href="qgraphicssceneresizeevent.html">QGraphicsSceneResizeEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
430
529
<p>This event handler, for <a href="qevent.html#Type-enum">GraphicsSceneResize</a> events, is delivered after the widget has been resized (i.e&#x2e;, its local size has changed). <i>event</i> contains both the old and the new size.</p>
431
530
<p>This event is only delivered when the widget is resized locally; calling <a href="qgraphicsitem.html#setTransform">setTransform</a>() on the widget or any of its ancestors or view, does not affect the widget's local size.</p>
432
531
<p>You can reimplement this event handler to detect when your widget has been resized. Calling <a href="qevent.html#accept">QEvent::accept</a>() or <a href="qevent.html#ignore">QEvent::ignore</a>() on <i>event</i> has no effect.</p>
433
532
<p>See also <a href="qgraphicslayoutitem.html#geometry">geometry</a>() and <a href="qgraphicswidget.html#geometry-prop">setGeometry</a>().</p>
 
533
<a name="//apple_ref/cpp/instm/QGraphicsWidget/sceneEvent" />
434
534
<h3 class="fn"><a name="sceneEvent"></a>bool QGraphicsWidget::sceneEvent ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
435
 
<p><a href="qgraphicswidget.html">QGraphicsWidget</a>'s implementation of sceneEvent() simply passes <i>event</i> to <a href="qobject.html#event">QGraphicsWidget::event</a>(). You can handle all events for your widget in <a href="qobject.html#event">event</a>() or in any of the convenience functions; you should not have to reimplement this function in a subclass of <a href="qgraphicswidget.html">QGraphicsWidget</a>.</p>
436
 
<p>Reimplemented from <a href="qgraphicsitem.html#sceneEvent">QGraphicsItem</a>.</p>
 
535
<p>Reimplemented from <a href="qgraphicsitem.html#sceneEvent">QGraphicsItem::sceneEvent</a>().</p>
 
536
<p><a href="qgraphicswidget.html">QGraphicsWidget</a>'s implementation of sceneEvent() simply passes <i>event</i> to <a href="qgraphicswidget.html#event">QGraphicsWidget::event</a>(). You can handle all events for your widget in <a href="qgraphicswidget.html#event">event</a>() or in any of the convenience functions; you should not have to reimplement this function in a subclass of <a href="qgraphicswidget.html">QGraphicsWidget</a>.</p>
437
537
<p>See also <a href="qgraphicsitem.html#sceneEvent">QGraphicsItem::sceneEvent</a>().</p>
 
538
<a name="//apple_ref/cpp/instm/QGraphicsWidget/setAttribute" />
438
539
<h3 class="fn"><a name="setAttribute"></a>void QGraphicsWidget::setAttribute ( <a href="qt.html#WidgetAttribute-enum">Qt::WidgetAttribute</a> <i>attribute</i>, bool <i>on</i> = true )</h3>
439
540
<p>If <i>on</i> is true, this function enables <i>attribute</i>; otherwise <i>attribute</i> is disabled.</p>
440
541
<p>See the class documentation for <a href="qgraphicswidget.html">QGraphicsWidget</a> for a complete list of which attributes are supported, and what they are for.</p>
441
542
<p>See also <a href="qgraphicswidget.html#testAttribute">testAttribute</a>() and <a href="qwidget.html#setAttribute">QWidget::setAttribute</a>().</p>
 
543
<a name="//apple_ref/cpp/instm/QGraphicsWidget/setContentsMargins" />
442
544
<h3 class="fn"><a name="setContentsMargins"></a>void QGraphicsWidget::setContentsMargins ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>left</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>top</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>right</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>bottom</i> )</h3>
443
545
<p>Sets the widget's contents margins to <i>left</i>, <i>top</i>, <i>right</i> and <i>bottom</i>.</p>
444
546
<p>Contents margins are used by the assigned layout to define the placement of subwidgets and layouts. Margins are particularily useful for widgets that constrain subwidgets to only a section of its own geometry. For example, a group box with a layout will place subwidgets inside its frame, but below the title.</p>
445
547
<p>Changing a widget's contents margins will always trigger an <a href="qgraphicsitem.html#update">update</a>(), and any assigned layout will be activated automatically. The widget will then receive a <a href="qevent.html#Type-enum">ContentsRectChange</a> event.</p>
446
548
<p>See also <a href="qgraphicswidget.html#getContentsMargins">getContentsMargins</a>() and <a href="qgraphicswidget.html#geometry-prop">setGeometry</a>().</p>
 
549
<a name="//apple_ref/cpp/instm/QGraphicsWidget/setLayout" />
447
550
<h3 class="fn"><a name="setLayout"></a>void QGraphicsWidget::setLayout ( <a href="qgraphicslayout.html">QGraphicsLayout</a> * <i>layout</i> )</h3>
448
551
<p>Sets the layout for this widget to <i>layout</i>. Any existing layout manager is deleted before the new layout is assigned. If <i>layout</i> is 0, the widget is left without a layout. Existing subwidgets' geometries will remain unaffected.</p>
449
552
<p>All widgets that are currently managed by <i>layout</i> or all of its sublayouts, are automatically reparented to this item. The layout is then invalidated, and the child widget geometries are adjusted according to this item's <a href="qgraphicslayoutitem.html#geometry">geometry</a>() and contentsMargins(). Children who are not explicitly managed by <i>layout</i> remain unaffected by the layout after it has been assigned to this widget.</p>
450
553
<p><a href="qgraphicswidget.html">QGraphicsWidget</a> takes ownership of <i>layout</i>.</p>
451
554
<p>See also <a href="qgraphicswidget.html#layout">layout</a>(), <a href="qgraphicslinearlayout.html#addItem">QGraphicsLinearLayout::addItem</a>(), and <a href="qgraphicslayout.html#invalidate">QGraphicsLayout::invalidate</a>().</p>
 
555
<a name="//apple_ref/cpp/instm/QGraphicsWidget/setShortcutAutoRepeat" />
452
556
<h3 class="fn"><a name="setShortcutAutoRepeat"></a>void QGraphicsWidget::setShortcutAutoRepeat ( int <i>id</i>, bool <i>enabled</i> = true )</h3>
453
557
<p>If <i>enabled</i> is true, auto repeat of the shortcut with the given <i>id</i> is enabled; otherwise it is disabled.</p>
454
558
<p>This function was introduced in Qt 4.5.</p>
455
559
<p>See also <a href="qgraphicswidget.html#grabShortcut">grabShortcut</a>(), <a href="qgraphicswidget.html#releaseShortcut">releaseShortcut</a>(), and <a href="qwidget.html#setShortcutAutoRepeat">QWidget::setShortcutAutoRepeat</a>().</p>
 
560
<a name="//apple_ref/cpp/instm/QGraphicsWidget/setShortcutEnabled" />
456
561
<h3 class="fn"><a name="setShortcutEnabled"></a>void QGraphicsWidget::setShortcutEnabled ( int <i>id</i>, bool <i>enabled</i> = true )</h3>
457
562
<p>If <i>enabled</i> is true, the shortcut with the given <i>id</i> is enabled; otherwise the shortcut is disabled.</p>
458
563
<p><b>Warning:</b> You should not normally need to use this function since Qt's shortcut system enables/disables shortcuts automatically as widgets become hidden/visible and gain or lose focus. It is best to use <a href="qaction.html">QAction</a> or <a href="qshortcut.html">QShortcut</a> to handle shortcuts, since they are easier to use than this low-level function.</p>
459
564
<p>This function was introduced in Qt 4.5.</p>
460
565
<p>See also <a href="qgraphicswidget.html#grabShortcut">grabShortcut</a>(), <a href="qgraphicswidget.html#releaseShortcut">releaseShortcut</a>(), and <a href="qwidget.html#setShortcutEnabled">QWidget::setShortcutEnabled</a>().</p>
 
566
<a name="//apple_ref/cpp/instm/QGraphicsWidget/setStyle" />
461
567
<h3 class="fn"><a name="setStyle"></a>void QGraphicsWidget::setStyle ( <a href="qstyle.html">QStyle</a> * <i>style</i> )</h3>
462
568
<p>Sets the widget's style to <i>style</i>. <a href="qgraphicswidget.html">QGraphicsWidget</a> does <i>not</i> take ownership of <i>style</i>.</p>
463
569
<p>If no style is assigned, or <i>style</i> is 0, the widget will use <a href="qgraphicsscene.html#style">QGraphicsScene::style</a>() (if this has been set). Otherwise the widget will use <a href="qapplication.html#style">QApplication::style</a>().</p>
464
570
<p>This function sets the <a href="qt.html#WidgetAttribute-enum">Qt::WA_SetStyle</a> attribute if <i>style</i> is not 0; otherwise it clears the attribute.</p>
465
571
<p>See also <a href="qgraphicswidget.html#style">style</a>().</p>
 
572
<a name="//apple_ref/cpp/clm/QGraphicsWidget/setTabOrder" />
466
573
<h3 class="fn"><a name="setTabOrder"></a>void QGraphicsWidget::setTabOrder ( QGraphicsWidget * <i>first</i>, QGraphicsWidget * <i>second</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
467
574
<p>Moves the <i>second</i> widget around the ring of focus widgets so that keyboard focus moves from the <i>first</i> widget to the <i>second</i> widget when the Tab key is pressed.</p>
468
575
<p>Note that since the tab order of the <i>second</i> widget is changed, you should order a chain like this:</p>
477
584
<p>If <i>first</i> is 0, this indicates that <i>second</i> should be the first widget to receive input focus should the scene gain Tab focus (i.e&#x2e;, the user hits Tab so that focus passes into the scene). If <i>second</i> is 0, this indicates that <i>first</i> should be the first widget to gain focus if the scene gained BackTab focus.</p>
478
585
<p>By default, tab order is defined implicitly using widget creation order.</p>
479
586
<p>See also <a href="qgraphicswidget.html#focusPolicy-prop">focusPolicy</a> and <a href="focus.html">Keyboard Focus</a>.</p>
 
587
<a name="//apple_ref/cpp/instm/QGraphicsWidget/setWindowFrameMargins" />
480
588
<h3 class="fn"><a name="setWindowFrameMargins"></a>void QGraphicsWidget::setWindowFrameMargins ( <a href="qtglobal.html#qreal-typedef">qreal</a> <i>left</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>top</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>right</i>, <a href="qtglobal.html#qreal-typedef">qreal</a> <i>bottom</i> )</h3>
481
589
<p>Sets the widget's window frame margins to <i>left</i>, <i>top</i>, <i>right</i> and <i>bottom</i>. The default frame margins are provided by the style, and they depend on the current window flags.</p>
482
590
<p>If you would like to draw your own window decoration, you can set your own frame margins to override the default margins.</p>
483
591
<p>See also <a href="qgraphicswidget.html#unsetWindowFrameMargins">unsetWindowFrameMargins</a>(), <a href="qgraphicswidget.html#getWindowFrameMargins">getWindowFrameMargins</a>(), and <a href="qgraphicswidget.html#windowFrameRect">windowFrameRect</a>().</p>
 
592
<a name="//apple_ref/cpp/instm/QGraphicsWidget/shape" />
 
593
<h3 class="fn"><a name="shape"></a><a href="qpainterpath.html">QPainterPath</a> QGraphicsWidget::shape () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
594
<p>Reimplemented from <a href="qgraphicsitem.html#shape">QGraphicsItem::shape</a>().</p>
 
595
<a name="//apple_ref/cpp/instm/QGraphicsWidget/showEvent" />
484
596
<h3 class="fn"><a name="showEvent"></a>void QGraphicsWidget::showEvent ( <a href="qshowevent.html">QShowEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
485
597
<p>This event handler, for <a href="qevent.html#Type-enum">Show</a> events, is delivered before the widget has been shown, for example, setVisible(true) has been called for the widget or one of its ancestors when the widget was previously hidden.</p>
486
598
<p>You can reimplement this event handler to detect when your widget is shown. Calling <a href="qevent.html#accept">QEvent::accept</a>() or <a href="qevent.html#ignore">QEvent::ignore</a>() on <i>event</i> has no effect.</p>
487
599
<p>See also <a href="qgraphicswidget.html#hideEvent">hideEvent</a>(), <a href="qwidget.html#showEvent">QWidget::showEvent</a>(), and <a href="qgraphicsitem.html#GraphicsItemChange-enum">ItemVisibleChange</a>.</p>
 
600
<a name="//apple_ref/cpp/instm/QGraphicsWidget/sizeHint" />
 
601
<h3 class="fn"><a name="sizeHint"></a><a href="qsizef.html">QSizeF</a> QGraphicsWidget::sizeHint ( <a href="qt.html#SizeHint-enum">Qt::SizeHint</a> <i>which</i>, const <a href="qsizef.html">QSizeF</a> &amp; <i>constraint</i> = QSizeF() ) const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
602
<p>Reimplemented from <a href="qgraphicslayoutitem.html#sizeHint">QGraphicsLayoutItem::sizeHint</a>().</p>
 
603
<a name="//apple_ref/cpp/instm/QGraphicsWidget/style" />
488
604
<h3 class="fn"><a name="style"></a><a href="qstyle.html">QStyle</a> * QGraphicsWidget::style () const</h3>
489
605
<p>Returns a pointer to the widget's style. If this widget does not have any explicitly assigned style, the scene's style is returned instead. In turn, if the scene does not have any assigned style, this function returns <a href="qapplication.html#style">QApplication::style</a>().</p>
490
606
<p>See also <a href="qgraphicswidget.html#setStyle">setStyle</a>().</p>
 
607
<a name="//apple_ref/cpp/instm/QGraphicsWidget/testAttribute" />
491
608
<h3 class="fn"><a name="testAttribute"></a>bool QGraphicsWidget::testAttribute ( <a href="qt.html#WidgetAttribute-enum">Qt::WidgetAttribute</a> <i>attribute</i> ) const</h3>
492
609
<p>Returns true if <i>attribute</i> is enabled for this widget; otherwise, returns false.</p>
493
610
<p>See also <a href="qgraphicswidget.html#setAttribute">setAttribute</a>().</p>
 
611
<a name="//apple_ref/cpp/instm/QGraphicsWidget/type" />
 
612
<h3 class="fn"><a name="type"></a>int QGraphicsWidget::type () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
613
<p>Reimplemented from <a href="qgraphicsitem.html#type">QGraphicsItem::type</a>().</p>
 
614
<a name="//apple_ref/cpp/instm/QGraphicsWidget/ungrabKeyboardEvent" />
494
615
<h3 class="fn"><a name="ungrabKeyboardEvent"></a>void QGraphicsWidget::ungrabKeyboardEvent ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
495
616
<p>This event handler, for <i>event</i>, can be reimplemented in a subclass to receive notifications for Qt::UngrabKeyboard events.</p>
496
617
<p>See also <a href="qgraphicsitem.html#ungrabKeyboard">ungrabKeyboard</a>() and <a href="qgraphicsitem.html#ungrabMouse">ungrabMouse</a>().</p>
 
618
<a name="//apple_ref/cpp/instm/QGraphicsWidget/ungrabMouseEvent" />
497
619
<h3 class="fn"><a name="ungrabMouseEvent"></a>void QGraphicsWidget::ungrabMouseEvent ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
498
620
<p>This event handler, for <i>event</i>, can be reimplemented in a subclass to receive notifications for Qt::UngrabMouse events.</p>
499
621
<p>See also <a href="qgraphicsitem.html#ungrabMouse">ungrabMouse</a>() and <a href="qgraphicsitem.html#ungrabKeyboard">ungrabKeyboard</a>().</p>
 
622
<a name="//apple_ref/cpp/instm/QGraphicsWidget/unsetWindowFrameMargins" />
500
623
<h3 class="fn"><a name="unsetWindowFrameMargins"></a>void QGraphicsWidget::unsetWindowFrameMargins ()</h3>
501
624
<p>Resets the window frame margins to the default value, provided by the style.</p>
502
625
<p>See also <a href="qgraphicswidget.html#setWindowFrameMargins">setWindowFrameMargins</a>(), <a href="qgraphicswidget.html#getWindowFrameMargins">getWindowFrameMargins</a>(), and <a href="qgraphicswidget.html#windowFrameRect">windowFrameRect</a>().</p>
 
626
<a name="//apple_ref/cpp/instm/QGraphicsWidget/updateGeometry" />
503
627
<h3 class="fn"><a name="updateGeometry"></a>void QGraphicsWidget::updateGeometry ()&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
628
<p>Reimplemented from <a href="qgraphicslayoutitem.html#updateGeometry">QGraphicsLayoutItem::updateGeometry</a>().</p>
504
629
<p>If this widget is currently managed by a layout, this function notifies the layout that the widget's size hints have changed and the layout may need to resize and reposition the widget accordingly.</p>
505
 
<p>Call this function if the widget's <a href="qgraphicslayoutitem.html#sizeHint">sizeHint</a>() has changed.</p>
506
 
<p>Reimplemented from <a href="qgraphicslayoutitem.html#updateGeometry">QGraphicsLayoutItem</a>.</p>
 
630
<p>Call this function if the widget's <a href="qgraphicswidget.html#sizeHint">sizeHint</a>() has changed.</p>
507
631
<p>See also <a href="qgraphicslayout.html#invalidate">QGraphicsLayout::invalidate</a>().</p>
 
632
<a name="//apple_ref/cpp/instm/QGraphicsWidget/windowFrameEvent" />
508
633
<h3 class="fn"><a name="windowFrameEvent"></a>bool QGraphicsWidget::windowFrameEvent ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
509
634
<p>This event handler, for <i>event</i>, receives events for the window frame if this widget is a window. Its base implementation provides support for default window frame interaction such as moving, resizing, etc.</p>
510
635
<p>You can reimplement this handler in a subclass of <a href="qgraphicswidget.html">QGraphicsWidget</a> to provide your own custom window frame interaction support.</p>
511
636
<p>Returns true if <i>event</i> has been recognized and processed; otherwise, returns false.</p>
512
 
<p>See also <a href="qobject.html#event">event</a>().</p>
 
637
<p>See also <a href="qgraphicswidget.html#event">event</a>().</p>
 
638
<a name="//apple_ref/cpp/instm/QGraphicsWidget/windowFrameGeometry" />
513
639
<h3 class="fn"><a name="windowFrameGeometry"></a><a href="qrectf.html">QRectF</a> QGraphicsWidget::windowFrameGeometry () const</h3>
514
640
<p>Returns the widget's geometry in parent coordinates including any window frame.</p>
515
641
<p>See also <a href="qgraphicswidget.html#windowFrameRect">windowFrameRect</a>(), <a href="qgraphicswidget.html#getWindowFrameMargins">getWindowFrameMargins</a>(), and <a href="qgraphicswidget.html#setWindowFrameMargins">setWindowFrameMargins</a>().</p>
 
642
<a name="//apple_ref/cpp/instm/QGraphicsWidget/windowFrameRect" />
516
643
<h3 class="fn"><a name="windowFrameRect"></a><a href="qrectf.html">QRectF</a> QGraphicsWidget::windowFrameRect () const</h3>
517
644
<p>Returns the widget's local rect including any window frame.</p>
518
645
<p>See also <a href="qgraphicswidget.html#windowFrameGeometry">windowFrameGeometry</a>(), <a href="qgraphicswidget.html#getWindowFrameMargins">getWindowFrameMargins</a>(), and <a href="qgraphicswidget.html#setWindowFrameMargins">setWindowFrameMargins</a>().</p>
 
646
<a name="//apple_ref/cpp/instm/QGraphicsWidget/windowFrameSectionAt" />
519
647
<h3 class="fn"><a name="windowFrameSectionAt"></a><a href="qt.html#WindowFrameSection-enum">Qt::WindowFrameSection</a> QGraphicsWidget::windowFrameSectionAt ( const <a href="qpointf.html">QPointF</a> &amp; <i>pos</i> ) const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
520
648
<p>Returns the window frame section at position <i>pos</i>, or <a href="qt.html#WindowFrameSection-enum">Qt::NoSection</a> if there is no window frame section at this position.</p>
521
649
<p>This function is used in <a href="qgraphicswidget.html">QGraphicsWidget</a>'s base implementation for window frame interaction.</p>
522
650
<p>You can reimplement this function if you want to customize how a window can be interactively moved or resized. For instance, if you only want to allow a window to be resized by the bottom right corner, you can reimplement this function to return <a href="qt.html#WindowFrameSection-enum">Qt::NoSection</a> for all sections except <a href="qt.html#WindowFrameSection-enum">Qt::BottomRightSection</a>.</p>
523
651
<p>This function was introduced in Qt 4.4.</p>
524
652
<p>See also <a href="qgraphicswidget.html#windowFrameEvent">windowFrameEvent</a>(), <a href="qgraphicswidget.html#paintWindowFrame">paintWindowFrame</a>(), and <a href="qgraphicswidget.html#windowFrameGeometry">windowFrameGeometry</a>().</p>
 
653
<a name="//apple_ref/cpp/instm/QGraphicsWidget/windowType" />
525
654
<h3 class="fn"><a name="windowType"></a><a href="qt.html#WindowType-enum">Qt::WindowType</a> QGraphicsWidget::windowType () const</h3>
526
655
<p>Returns the widgets window type.</p>
 
656
<p>See also <a href="qgraphicswidget.html#windowFlags-prop">windowFlags</a>(), <a href="qgraphicsitem.html#isWindow">isWindow</a>(), and <a href="qgraphicsitem.html#isPanel">isPanel</a>().</p>
527
657
<p /><address><hr /><div align="center">
528
658
<table width="100%" cellspacing="0" border="0"><tr class="address">
529
 
<td width="30%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
530
 
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
531
 
<td width="30%" align="right"><div align="right">Qt 4.5.2</div></td>
532
 
</tr></table></div></address></body>
 
659
<td width="40%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
 
660
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
661
<td width="40%" align="right"><div align="right">Qt 4.6.0</div></td>
 
662
<script type="text/javascript" src="http://www.google.com/jsapi"></script><script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script><script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&t13n_langs=en"></script><script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script></tr></table></div></address></body>
533
663
</html>