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

« back to all changes in this revision

Viewing changes to doc/html/qwidget.html

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="iso-8859-1"?>
 
2
<!DOCTYPE html
 
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
 
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/gui/kernel/qwidget.cpp -->
 
6
<head>
 
7
    <title>Qt 4.0: QWidget Class Reference</title>
 
8
    <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
 
9
a:link { color: #004faf; text-decoration: none }
 
10
a:visited { color: #672967; text-decoration: none }
 
11
td.postheader { font-family: sans-serif }
 
12
tr.address { font-family: sans-serif }
 
13
body { background: #ffffff; color: black; }</style>
 
14
</head>
 
15
<body>
 
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 
17
<tr>
 
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
 
19
<td width="1">&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="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="annotated.html"><font color="#004faf">Annotated</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
 
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">QWidget Class Reference</h1>
 
21
<p>The QWidget class is the base class of all user interface objects. <a href="#details">More...</a></p>
 
22
<pre>#include &lt;QWidget&gt;</pre><p>Part of the <a href="qtgui.html">QtGui</a> module.</p>
 
23
<p>Inherits <a href="qobject.html">QObject</a> and <a href="qpaintdevice.html">QPaintDevice</a>.</p>
 
24
<p>Inherited by <a href="q3databrowser.html">Q3DataBrowser</a>, <a href="q3dataview.html">Q3DataView</a>, <a href="q3datetimeedit.html">Q3DateTimeEdit</a>, <a href="q3datetimeeditbase.html">Q3DateTimeEditBase</a>, <a href="q3dockarea.html">Q3DockArea</a>, <a href="q3header.html">Q3Header</a>, <a href="q3mainwindow.html">Q3MainWindow</a>, <a href="qabstractbutton.html">QAbstractButton</a>, <a href="qabstractslider.html">QAbstractSlider</a>, <a href="qabstractspinbox.html">QAbstractSpinBox</a>, <a href="qaxwidget.html">QAxWidget</a>, <a href="qcombobox.html">QComboBox</a>, <a href="qdesignerformwindowinterface.html">QDesignerFormWindowInterface</a>, <a href="qdesignerobjectinspectorinterface.html">QDesignerObjectInspectorInterface</a>, <a href="qdesignerpropertyeditorinterface.html">QDesignerPropertyEditorInterface</a>, <a href="qdesignerwidgetboxinterface.html">QDesignerWidgetBoxInterface</a>, <a href="qdesktopwidget.html">QDesktopWidget</a>, <a href="qdialog.html">QDialog</a>, <a href="qdockwidget.html">QDockWidget</a>, <a href="qfocusframe.html">QFocusFrame</a>, <a href="qframe.html">QFrame</a>, <a href="qglwidget.html">QGLWidget</a>, <a href="qgroupbox.html">QGroupBox</a>, <a href="qlineedit.html">QLineEdit</a>, <a href="qmainwindow.html">QMainWindow</a>, <a href="qmenu.html">QMenu</a>, <a href="qmenubar.html">QMenuBar</a>, <a href="qprogressbar.html">QProgressBar</a>, <a href="qrubberband.html">QRubberBand</a>, <a href="qsizegrip.html">QSizeGrip</a>, <a href="qsplashscreen.html">QSplashScreen</a>, <a href="qsplitterhandle.html">QSplitterHandle</a>, <a href="qstatusbar.html">QStatusBar</a>, <a href="qtabbar.html">QTabBar</a>, <a href="qtabwidget.html">QTabWidget</a>, <a href="qtoolbar.html">QToolBar</a>, <a href="qworkspace.html">QWorkspace</a>, <a href="qx11embedcontainer.html">QX11EmbedContainer</a>, and <a href="qx11embedwidget.html">QX11EmbedWidget</a>.</p>
 
25
<ul>
 
26
<li><a href="qwidget-members.html">List of all members, including inherited members</a></li>
 
27
<li><a href="qwidget-obsolete.html">Obsolete members</a></li>
 
28
<li><a href="qwidget-qt3.html">Qt 3 support members</a></li>
 
29
</ul>
 
30
<a name="properties"></a>
 
31
<h3>Properties</h3>
 
32
<table width="100%" border="0" cellpadding="0" cellspacing="0">
 
33
<tr><td width="45%" valign="top"><ul>
 
34
<li><div class="fn"/><b><a href="qwidget.html#acceptDrops-prop">acceptDrops</a></b> : bool</li>
 
35
<li><div class="fn"/><b><a href="qwidget.html#accessibleDescription-prop">accessibleDescription</a></b> : QString</li>
 
36
<li><div class="fn"/><b><a href="qwidget.html#accessibleName-prop">accessibleName</a></b> : QString</li>
 
37
<li><div class="fn"/><b><a href="qwidget.html#baseSize-prop">baseSize</a></b> : QSize</li>
 
38
<li><div class="fn"/><b><a href="qwidget.html#childrenRect-prop">childrenRect</a></b> : const QRect</li>
 
39
<li><div class="fn"/><b><a href="qwidget.html#childrenRegion-prop">childrenRegion</a></b> : const QRegion</li>
 
40
<li><div class="fn"/><b><a href="qwidget.html#contextMenuPolicy-prop">contextMenuPolicy</a></b> : Qt::ContextMenuPolicy</li>
 
41
<li><div class="fn"/><b><a href="qwidget.html#cursor-prop">cursor</a></b> : QCursor</li>
 
42
<li><div class="fn"/><b><a href="qwidget.html#enabled-prop">enabled</a></b> : bool</li>
 
43
<li><div class="fn"/><b><a href="qwidget.html#focus-prop">focus</a></b> : const bool</li>
 
44
<li><div class="fn"/><b><a href="qwidget.html#focusPolicy-prop">focusPolicy</a></b> : Qt::FocusPolicy</li>
 
45
<li><div class="fn"/><b><a href="qwidget.html#font-prop">font</a></b> : QFont</li>
 
46
<li><div class="fn"/><b><a href="qwidget.html#frameGeometry-prop">frameGeometry</a></b> : const QRect</li>
 
47
<li><div class="fn"/><b><a href="qwidget.html#frameSize-prop">frameSize</a></b> : const QSize</li>
 
48
<li><div class="fn"/><b><a href="qwidget.html#fullScreen-prop">fullScreen</a></b> : const bool</li>
 
49
<li><div class="fn"/><b><a href="qwidget.html#geometry-prop">geometry</a></b> : QRect</li>
 
50
<li><div class="fn"/><b><a href="qwidget.html#height-prop">height</a></b> : const int</li>
 
51
<li><div class="fn"/><b><a href="qwidget.html#isActiveWindow-prop">isActiveWindow</a></b> : const bool</li>
 
52
<li><div class="fn"/><b><a href="qwidget.html#layoutDirection-prop">layoutDirection</a></b> : Qt::LayoutDirection</li>
 
53
<li><div class="fn"/><b><a href="qwidget.html#maximized-prop">maximized</a></b> : const bool</li>
 
54
<li><div class="fn"/><b><a href="qwidget.html#maximumHeight-prop">maximumHeight</a></b> : int</li>
 
55
<li><div class="fn"/><b><a href="qwidget.html#maximumSize-prop">maximumSize</a></b> : QSize</li>
 
56
<li><div class="fn"/><b><a href="qwidget.html#maximumWidth-prop">maximumWidth</a></b> : int</li>
 
57
<li><div class="fn"/><b><a href="qwidget.html#minimized-prop">minimized</a></b> : const bool</li>
 
58
<li><div class="fn"/><b><a href="qwidget.html#minimumHeight-prop">minimumHeight</a></b> : int</li>
 
59
<li><div class="fn"/><b><a href="qwidget.html#minimumSize-prop">minimumSize</a></b> : QSize</li>
 
60
</ul></td><td valign="top"><ul>
 
61
<li><div class="fn"/><b><a href="qwidget.html#minimumSizeHint-prop">minimumSizeHint</a></b> : const QSize</li>
 
62
<li><div class="fn"/><b><a href="qwidget.html#minimumWidth-prop">minimumWidth</a></b> : int</li>
 
63
<li><div class="fn"/><b><a href="qwidget.html#modal-prop">modal</a></b> : const bool</li>
 
64
<li><div class="fn"/><b><a href="qwidget.html#mouseTracking-prop">mouseTracking</a></b> : bool</li>
 
65
<li><div class="fn"/><b><a href="qwidget.html#normalGeometry-prop">normalGeometry</a></b> : const QRect</li>
 
66
<li><div class="fn"/><b><a href="qwidget.html#palette-prop">palette</a></b> : QPalette</li>
 
67
<li><div class="fn"/><b><a href="qwidget.html#pos-prop">pos</a></b> : QPoint</li>
 
68
<li><div class="fn"/><b><a href="qwidget.html#rect-prop">rect</a></b> : const QRect</li>
 
69
<li><div class="fn"/><b><a href="qwidget.html#size-prop">size</a></b> : QSize</li>
 
70
<li><div class="fn"/><b><a href="qwidget.html#sizeHint-prop">sizeHint</a></b> : const QSize</li>
 
71
<li><div class="fn"/><b><a href="qwidget.html#sizeIncrement-prop">sizeIncrement</a></b> : QSize</li>
 
72
<li><div class="fn"/><b><a href="qwidget.html#sizePolicy-prop">sizePolicy</a></b> : QSizePolicy</li>
 
73
<li><div class="fn"/><b><a href="qwidget.html#statusTip-prop">statusTip</a></b> : QString</li>
 
74
<li><div class="fn"/><b><a href="qwidget.html#toolTip-prop">toolTip</a></b> : QString</li>
 
75
<li><div class="fn"/><b><a href="qwidget.html#updatesEnabled-prop">updatesEnabled</a></b> : bool</li>
 
76
<li><div class="fn"/><b><a href="qwidget.html#visible-prop">visible</a></b> : bool</li>
 
77
<li><div class="fn"/><b><a href="qwidget.html#whatsThis-prop">whatsThis</a></b> : QString</li>
 
78
<li><div class="fn"/><b><a href="qwidget.html#width-prop">width</a></b> : const int</li>
 
79
<li><div class="fn"/><b><a href="qwidget.html#windowFlags-prop">windowFlags</a></b> : Qt::WindowFlags</li>
 
80
<li><div class="fn"/><b><a href="qwidget.html#windowIcon-prop">windowIcon</a></b> : QIcon</li>
 
81
<li><div class="fn"/><b><a href="qwidget.html#windowIconText-prop">windowIconText</a></b> : QString</li>
 
82
<li><div class="fn"/><b><a href="qwidget.html#windowModified-prop">windowModified</a></b> : bool</li>
 
83
<li><div class="fn"/><b><a href="qwidget.html#windowOpacity-prop">windowOpacity</a></b> : double</li>
 
84
<li><div class="fn"/><b><a href="qwidget.html#windowTitle-prop">windowTitle</a></b> : QString</li>
 
85
<li><div class="fn"/><b><a href="qwidget.html#x-prop">x</a></b> : const int</li>
 
86
<li><div class="fn"/><b><a href="qwidget.html#y-prop">y</a></b> : const int</li>
 
87
</ul>
 
88
</td></tr>
 
89
</table>
 
90
<ul>
 
91
<li><div class="fn"/>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
 
92
</ul>
 
93
<a name="public-functions"></a>
 
94
<h3>Public Functions</h3>
 
95
<ul>
 
96
<li><div class="fn"/><b><a href="qwidget.html#QWidget">QWidget</a></b> ( QWidget * <i>parent</i> = 0, Qt::WFlags <i>f</i> = 0 )</li>
 
97
<li><div class="fn"/><b><a href="qwidget.html#dtor.QWidget">~QWidget</a></b> ()</li>
 
98
<li><div class="fn"/>bool <b><a href="qwidget.html#acceptDrops-prop">acceptDrops</a></b> () const</li>
 
99
<li><div class="fn"/>QString <b><a href="qwidget.html#accessibleDescription-prop">accessibleDescription</a></b> () const</li>
 
100
<li><div class="fn"/>QString <b><a href="qwidget.html#accessibleName-prop">accessibleName</a></b> () const</li>
 
101
<li><div class="fn"/>QList&lt;QAction *&gt; <b><a href="qwidget.html#actions">actions</a></b> () const</li>
 
102
<li><div class="fn"/>void <b><a href="qwidget.html#activateWindow">activateWindow</a></b> ()</li>
 
103
<li><div class="fn"/>void <b><a href="qwidget.html#addAction">addAction</a></b> ( QAction * <i>action</i> )</li>
 
104
<li><div class="fn"/>void <b><a href="qwidget.html#addActions">addActions</a></b> ( QList&lt;QAction *&gt; <i>actions</i> )</li>
 
105
<li><div class="fn"/>void <b><a href="qwidget.html#adjustSize">adjustSize</a></b> ()</li>
 
106
<li><div class="fn"/>QPalette::ColorRole <b><a href="qwidget.html#backgroundRole">backgroundRole</a></b> () const</li>
 
107
<li><div class="fn"/>QSize <b><a href="qwidget.html#baseSize-prop">baseSize</a></b> () const</li>
 
108
<li><div class="fn"/>QWidget * <b><a href="qwidget.html#childAt">childAt</a></b> ( int <i>x</i>, int <i>y</i> ) const</li>
 
109
<li><div class="fn"/>QWidget * <b><a href="qwidget.html#childAt-4">childAt</a></b> ( const QPoint &amp; <i>p</i> ) const</li>
 
110
<li><div class="fn"/>QRect <b><a href="qwidget.html#childrenRect-prop">childrenRect</a></b> () const</li>
 
111
<li><div class="fn"/>QRegion <b><a href="qwidget.html#childrenRegion-prop">childrenRegion</a></b> () const</li>
 
112
<li><div class="fn"/>void <b><a href="qwidget.html#clearFocus">clearFocus</a></b> ()</li>
 
113
<li><div class="fn"/>void <b><a href="qwidget.html#clearMask">clearMask</a></b> ()</li>
 
114
<li><div class="fn"/>QRect <b><a href="qwidget.html#contentsRect">contentsRect</a></b> () const</li>
 
115
<li><div class="fn"/>Qt::ContextMenuPolicy <b><a href="qwidget.html#contextMenuPolicy-prop">contextMenuPolicy</a></b> () const</li>
 
116
<li><div class="fn"/>QCursor <b><a href="qwidget.html#cursor-prop">cursor</a></b> () const</li>
 
117
<li><div class="fn"/>void <b><a href="qwidget.html#ensurePolished">ensurePolished</a></b> () const</li>
 
118
<li><div class="fn"/>Qt::FocusPolicy <b><a href="qwidget.html#focusPolicy-prop">focusPolicy</a></b> () const</li>
 
119
<li><div class="fn"/>QWidget * <b><a href="qwidget.html#focusProxy">focusProxy</a></b> () const</li>
 
120
<li><div class="fn"/>QWidget * <b><a href="qwidget.html#focusWidget">focusWidget</a></b> () const</li>
 
121
<li><div class="fn"/>const QFont &amp; <b><a href="qwidget.html#font-prop">font</a></b> () const</li>
 
122
<li><div class="fn"/>QFontInfo <b><a href="qwidget.html#fontInfo">fontInfo</a></b> () const</li>
 
123
<li><div class="fn"/>QFontMetrics <b><a href="qwidget.html#fontMetrics">fontMetrics</a></b> () const</li>
 
124
<li><div class="fn"/>QPalette::ColorRole <b><a href="qwidget.html#foregroundRole">foregroundRole</a></b> () const</li>
 
125
<li><div class="fn"/>QRect <b><a href="qwidget.html#frameGeometry-prop">frameGeometry</a></b> () const</li>
 
126
<li><div class="fn"/>QSize <b><a href="qwidget.html#frameSize-prop">frameSize</a></b> () const</li>
 
127
<li><div class="fn"/>const QRect &amp; <b><a href="qwidget.html#geometry-prop">geometry</a></b> () const</li>
 
128
<li><div class="fn"/>void <b><a href="qwidget.html#getContentsMargins">getContentsMargins</a></b> ( int * <i>left</i>, int * <i>top</i>, int * <i>right</i>, int * <i>bottom</i> ) const</li>
 
129
<li><div class="fn"/>virtual HDC <b><a href="qwidget.html#getDC">getDC</a></b> () const</li>
 
130
<li><div class="fn"/>void <b><a href="qwidget.html#grabKeyboard">grabKeyboard</a></b> ()</li>
 
131
<li><div class="fn"/>void <b><a href="qwidget.html#grabMouse">grabMouse</a></b> ()</li>
 
132
<li><div class="fn"/>void <b><a href="qwidget.html#grabMouse-2">grabMouse</a></b> ( const QCursor &amp; <i>cursor</i> )</li>
 
133
<li><div class="fn"/>int <b><a href="qwidget.html#grabShortcut">grabShortcut</a></b> ( const QKeySequence &amp; <i>key</i>, Qt::ShortcutContext <i>context</i> = Qt::WindowShortcut )</li>
 
134
<li><div class="fn"/>bool <b><a href="qwidget.html#focus-prop">hasFocus</a></b> () const</li>
 
135
<li><div class="fn"/>bool <b><a href="qwidget.html#mouseTracking-prop">hasMouseTracking</a></b> () const</li>
 
136
<li><div class="fn"/>int <b><a href="qwidget.html#height-prop">height</a></b> () const</li>
 
137
<li><div class="fn"/>virtual int <b><a href="qwidget.html#heightForWidth">heightForWidth</a></b> ( int <i>w</i> ) const</li>
 
138
<li><div class="fn"/>QInputContext * <b><a href="qwidget.html#inputContext">inputContext</a></b> ()</li>
 
139
<li><div class="fn"/>virtual QVariant <b><a href="qwidget.html#inputMethodQuery">inputMethodQuery</a></b> ( Qt::InputMethodQuery <i>query</i> ) const</li>
 
140
<li><div class="fn"/>void <b><a href="qwidget.html#insertAction">insertAction</a></b> ( QAction * <i>before</i>, QAction * <i>action</i> )</li>
 
141
<li><div class="fn"/>void <b><a href="qwidget.html#insertActions">insertActions</a></b> ( QAction * <i>before</i>, QList&lt;QAction *&gt; <i>actions</i> )</li>
 
142
<li><div class="fn"/>bool <b><a href="qwidget.html#isActiveWindow-prop">isActiveWindow</a></b> () const</li>
 
143
<li><div class="fn"/>bool <b><a href="qwidget.html#isAncestorOf">isAncestorOf</a></b> ( const QWidget * <i>child</i> ) const</li>
 
144
<li><div class="fn"/>bool <b><a href="qwidget.html#enabled-prop">isEnabled</a></b> () const</li>
 
145
<li><div class="fn"/>bool <b><a href="qwidget.html#isEnabledTo">isEnabledTo</a></b> ( QWidget * <i>ancestor</i> ) const</li>
 
146
<li><div class="fn"/>bool <b><a href="qwidget.html#fullScreen-prop">isFullScreen</a></b> () const</li>
 
147
<li><div class="fn"/>bool <b><a href="qwidget.html#isHidden">isHidden</a></b> () const</li>
 
148
<li><div class="fn"/>bool <b><a href="qwidget.html#maximized-prop">isMaximized</a></b> () const</li>
 
149
<li><div class="fn"/>bool <b><a href="qwidget.html#minimized-prop">isMinimized</a></b> () const</li>
 
150
<li><div class="fn"/>bool <b><a href="qwidget.html#modal-prop">isModal</a></b> () const</li>
 
151
<li><div class="fn"/>bool <b><a href="qwidget.html#visible-prop">isVisible</a></b> () const</li>
 
152
<li><div class="fn"/>bool <b><a href="qwidget.html#isVisibleTo">isVisibleTo</a></b> ( QWidget * <i>ancestor</i> ) const</li>
 
153
<li><div class="fn"/>bool <b><a href="qwidget.html#isWindow">isWindow</a></b> () const</li>
 
154
<li><div class="fn"/>bool <b><a href="qwidget.html#windowModified-prop">isWindowModified</a></b> () const</li>
 
155
<li><div class="fn"/>QLayout * <b><a href="qwidget.html#layout">layout</a></b> () const</li>
 
156
<li><div class="fn"/>Qt::LayoutDirection <b><a href="qwidget.html#layoutDirection-prop">layoutDirection</a></b> () const</li>
 
157
<li><div class="fn"/>QPoint <b><a href="qwidget.html#mapFrom">mapFrom</a></b> ( QWidget * <i>parent</i>, const QPoint &amp; <i>pos</i> ) const</li>
 
158
<li><div class="fn"/>QPoint <b><a href="qwidget.html#mapFromGlobal">mapFromGlobal</a></b> ( const QPoint &amp; <i>pos</i> ) const</li>
 
159
<li><div class="fn"/>QPoint <b><a href="qwidget.html#mapFromParent">mapFromParent</a></b> ( const QPoint &amp; <i>pos</i> ) const</li>
 
160
<li><div class="fn"/>QPoint <b><a href="qwidget.html#mapTo">mapTo</a></b> ( QWidget * <i>parent</i>, const QPoint &amp; <i>pos</i> ) const</li>
 
161
<li><div class="fn"/>QPoint <b><a href="qwidget.html#mapToGlobal">mapToGlobal</a></b> ( const QPoint &amp; <i>pos</i> ) const</li>
 
162
<li><div class="fn"/>QPoint <b><a href="qwidget.html#mapToParent">mapToParent</a></b> ( const QPoint &amp; <i>pos</i> ) const</li>
 
163
<li><div class="fn"/>QRegion <b><a href="qwidget.html#mask">mask</a></b> () const</li>
 
164
<li><div class="fn"/>int <b><a href="qwidget.html#maximumHeight-prop">maximumHeight</a></b> () const</li>
 
165
<li><div class="fn"/>QSize <b><a href="qwidget.html#maximumSize-prop">maximumSize</a></b> () const</li>
 
166
<li><div class="fn"/>int <b><a href="qwidget.html#maximumWidth-prop">maximumWidth</a></b> () const</li>
 
167
<li><div class="fn"/>int <b><a href="qwidget.html#minimumHeight-prop">minimumHeight</a></b> () const</li>
 
168
<li><div class="fn"/>QSize <b><a href="qwidget.html#minimumSize-prop">minimumSize</a></b> () const</li>
 
169
<li><div class="fn"/>virtual QSize <b><a href="qwidget.html#minimumSizeHint-prop">minimumSizeHint</a></b> () const</li>
 
170
<li><div class="fn"/>int <b><a href="qwidget.html#minimumWidth-prop">minimumWidth</a></b> () const</li>
 
171
<li><div class="fn"/>void <b><a href="qwidget.html#pos-prop">move</a></b> ( const QPoint &amp; )</li>
 
172
<li><div class="fn"/>void <b><a href="qwidget.html#pos-prop">move</a></b> ( int <i>x</i>, int <i>y</i> )</li>
 
173
<li><div class="fn"/>QWidget * <b><a href="qwidget.html#nextInFocusChain">nextInFocusChain</a></b> () const</li>
 
174
<li><div class="fn"/>QRect <b><a href="qwidget.html#normalGeometry-prop">normalGeometry</a></b> () const</li>
 
175
<li><div class="fn"/>void <b><a href="qwidget.html#overrideWindowFlags">overrideWindowFlags</a></b> ( Qt::WindowFlags <i>flags</i> )</li>
 
176
<li><div class="fn"/>virtual QPaintEngine * <b><a href="qwidget.html#paintEngine">paintEngine</a></b> () const</li>
 
177
<li><div class="fn"/>const QPalette &amp; <b><a href="qwidget.html#palette-prop">palette</a></b> () const</li>
 
178
<li><div class="fn"/>QWidget * <b><a href="qwidget.html#parentWidget">parentWidget</a></b> () const</li>
 
179
<li><div class="fn"/>QPoint <b><a href="qwidget.html#pos-prop">pos</a></b> () const</li>
 
180
<li><div class="fn"/>QRect <b><a href="qwidget.html#rect-prop">rect</a></b> () const</li>
 
181
<li><div class="fn"/>virtual void <b><a href="qwidget.html#releaseDC">releaseDC</a></b> ( HDC <i>hdc</i> ) const</li>
 
182
<li><div class="fn"/>void <b><a href="qwidget.html#releaseKeyboard">releaseKeyboard</a></b> ()</li>
 
183
<li><div class="fn"/>void <b><a href="qwidget.html#releaseMouse">releaseMouse</a></b> ()</li>
 
184
<li><div class="fn"/>void <b><a href="qwidget.html#releaseShortcut">releaseShortcut</a></b> ( int <i>id</i> )</li>
 
185
<li><div class="fn"/>void <b><a href="qwidget.html#removeAction">removeAction</a></b> ( QAction * <i>action</i> )</li>
 
186
<li><div class="fn"/>void <b><a href="qwidget.html#repaint-6">repaint</a></b> ( int <i>x</i>, int <i>y</i>, int <i>w</i>, int <i>h</i> )</li>
 
187
<li><div class="fn"/>void <b><a href="qwidget.html#repaint-7">repaint</a></b> ( const QRect &amp; <i>r</i> )</li>
 
188
<li><div class="fn"/>void <b><a href="qwidget.html#repaint-8">repaint</a></b> ( const QRegion &amp; <i>rgn</i> )</li>
 
189
<li><div class="fn"/>void <b><a href="qwidget.html#size-prop">resize</a></b> ( const QSize &amp; )</li>
 
190
<li><div class="fn"/>void <b><a href="qwidget.html#size-prop">resize</a></b> ( int <i>w</i>, int <i>h</i> )</li>
 
191
<li><div class="fn"/>void <b><a href="qwidget.html#scroll">scroll</a></b> ( int <i>dx</i>, int <i>dy</i> )</li>
 
192
<li><div class="fn"/>void <b><a href="qwidget.html#scroll-2">scroll</a></b> ( int <i>dx</i>, int <i>dy</i>, const QRect &amp; <i>r</i> )</li>
 
193
<li><div class="fn"/>void <b><a href="qwidget.html#acceptDrops-prop">setAcceptDrops</a></b> ( bool <i>on</i> )</li>
 
194
<li><div class="fn"/>void <b><a href="qwidget.html#accessibleDescription-prop">setAccessibleDescription</a></b> ( const QString &amp; <i>description</i> )</li>
 
195
<li><div class="fn"/>void <b><a href="qwidget.html#accessibleName-prop">setAccessibleName</a></b> ( const QString &amp; <i>name</i> )</li>
 
196
<li><div class="fn"/>void <b><a href="qwidget.html#setAttribute">setAttribute</a></b> ( Qt::WidgetAttribute <i>attribute</i>, bool <i>on</i> = true )</li>
 
197
<li><div class="fn"/>void <b><a href="qwidget.html#setBackgroundRole">setBackgroundRole</a></b> ( QPalette::ColorRole <i>role</i> )</li>
 
198
<li><div class="fn"/>void <b><a href="qwidget.html#baseSize-prop">setBaseSize</a></b> ( const QSize &amp; )</li>
 
199
<li><div class="fn"/>void <b><a href="qwidget.html#baseSize-prop">setBaseSize</a></b> ( int <i>basew</i>, int <i>baseh</i> )</li>
 
200
<li><div class="fn"/>void <b><a href="qwidget.html#setContentsMargins">setContentsMargins</a></b> ( int <i>left</i>, int <i>top</i>, int <i>right</i>, int <i>bottom</i> )</li>
 
201
<li><div class="fn"/>void <b><a href="qwidget.html#contextMenuPolicy-prop">setContextMenuPolicy</a></b> ( Qt::ContextMenuPolicy <i>policy</i> )</li>
 
202
<li><div class="fn"/>void <b><a href="qwidget.html#cursor-prop">setCursor</a></b> ( const QCursor &amp; )</li>
 
203
<li><div class="fn"/>void <b><a href="qwidget.html#setFixedHeight">setFixedHeight</a></b> ( int <i>h</i> )</li>
 
204
<li><div class="fn"/>void <b><a href="qwidget.html#setFixedSize">setFixedSize</a></b> ( const QSize &amp; <i>s</i> )</li>
 
205
<li><div class="fn"/>void <b><a href="qwidget.html#setFixedSize-2">setFixedSize</a></b> ( int <i>w</i>, int <i>h</i> )</li>
 
206
<li><div class="fn"/>void <b><a href="qwidget.html#setFixedWidth">setFixedWidth</a></b> ( int <i>w</i> )</li>
 
207
<li><div class="fn"/>void <b><a href="qwidget.html#setFocus">setFocus</a></b> ( Qt::FocusReason <i>reason</i> )</li>
 
208
<li><div class="fn"/>void <b><a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a></b> ( Qt::FocusPolicy <i>policy</i> )</li>
 
209
<li><div class="fn"/>void <b><a href="qwidget.html#setFocusProxy">setFocusProxy</a></b> ( QWidget * <i>w</i> )</li>
 
210
<li><div class="fn"/>void <b><a href="qwidget.html#font-prop">setFont</a></b> ( const QFont &amp; )</li>
 
211
<li><div class="fn"/>void <b><a href="qwidget.html#setForegroundRole">setForegroundRole</a></b> ( QPalette::ColorRole <i>role</i> )</li>
 
212
<li><div class="fn"/>void <b><a href="qwidget.html#geometry-prop">setGeometry</a></b> ( const QRect &amp; )</li>
 
213
<li><div class="fn"/>void <b><a href="qwidget.html#geometry-prop">setGeometry</a></b> ( int <i>x</i>, int <i>y</i>, int <i>w</i>, int <i>h</i> )</li>
 
214
<li><div class="fn"/>void <b><a href="qwidget.html#setInputContext">setInputContext</a></b> ( QInputContext * <i>context</i> )</li>
 
215
<li><div class="fn"/>void <b><a href="qwidget.html#setLayout">setLayout</a></b> ( QLayout * <i>l</i> )</li>
 
216
<li><div class="fn"/>void <b><a href="qwidget.html#layoutDirection-prop">setLayoutDirection</a></b> ( Qt::LayoutDirection <i>direction</i> )</li>
 
217
<li><div class="fn"/>void <b><a href="qwidget.html#setMask">setMask</a></b> ( const QBitmap &amp; <i>bitmap</i> )</li>
 
218
<li><div class="fn"/>void <b><a href="qwidget.html#setMask-2">setMask</a></b> ( const QRegion &amp; <i>region</i> )</li>
 
219
<li><div class="fn"/>void <b><a href="qwidget.html#maximumHeight-prop">setMaximumHeight</a></b> ( int <i>maxh</i> )</li>
 
220
<li><div class="fn"/>void <b><a href="qwidget.html#maximumSize-prop">setMaximumSize</a></b> ( const QSize &amp; )</li>
 
221
<li><div class="fn"/>void <b><a href="qwidget.html#maximumSize-prop">setMaximumSize</a></b> ( int <i>maxw</i>, int <i>maxh</i> )</li>
 
222
<li><div class="fn"/>void <b><a href="qwidget.html#maximumWidth-prop">setMaximumWidth</a></b> ( int <i>maxw</i> )</li>
 
223
<li><div class="fn"/>void <b><a href="qwidget.html#minimumHeight-prop">setMinimumHeight</a></b> ( int <i>minh</i> )</li>
 
224
<li><div class="fn"/>void <b><a href="qwidget.html#minimumSize-prop">setMinimumSize</a></b> ( const QSize &amp; )</li>
 
225
<li><div class="fn"/>void <b><a href="qwidget.html#minimumSize-prop">setMinimumSize</a></b> ( int <i>minw</i>, int <i>minh</i> )</li>
 
226
<li><div class="fn"/>void <b><a href="qwidget.html#minimumWidth-prop">setMinimumWidth</a></b> ( int <i>minw</i> )</li>
 
227
<li><div class="fn"/>void <b><a href="qwidget.html#mouseTracking-prop">setMouseTracking</a></b> ( bool <i>enable</i> )</li>
 
228
<li><div class="fn"/>void <b><a href="qwidget.html#palette-prop">setPalette</a></b> ( const QPalette &amp; )</li>
 
229
<li><div class="fn"/>void <b><a href="qwidget.html#setParent">setParent</a></b> ( QWidget * <i>parent</i> )</li>
 
230
<li><div class="fn"/>void <b><a href="qwidget.html#setParent-2">setParent</a></b> ( QWidget * <i>parent</i>, Qt::WFlags <i>f</i> )</li>
 
231
<li><div class="fn"/>void <b><a href="qwidget.html#setShortcutEnabled">setShortcutEnabled</a></b> ( int <i>id</i>, bool <i>enable</i> = true )</li>
 
232
<li><div class="fn"/>void <b><a href="qwidget.html#sizeIncrement-prop">setSizeIncrement</a></b> ( const QSize &amp; )</li>
 
233
<li><div class="fn"/>void <b><a href="qwidget.html#sizeIncrement-prop">setSizeIncrement</a></b> ( int <i>w</i>, int <i>h</i> )</li>
 
234
<li><div class="fn"/>void <b><a href="qwidget.html#sizePolicy-prop">setSizePolicy</a></b> ( QSizePolicy )</li>
 
235
<li><div class="fn"/>void <b><a href="qwidget.html#sizePolicy-prop">setSizePolicy</a></b> ( QSizePolicy::Policy <i>horizontal</i>, QSizePolicy::Policy <i>vertical</i> )</li>
 
236
<li><div class="fn"/>void <b><a href="qwidget.html#statusTip-prop">setStatusTip</a></b> ( const QString &amp; )</li>
 
237
<li><div class="fn"/>void <b><a href="qwidget.html#setStyle">setStyle</a></b> ( QStyle * <i>style</i> )</li>
 
238
<li><div class="fn"/>void <b><a href="qwidget.html#toolTip-prop">setToolTip</a></b> ( const QString &amp; )</li>
 
239
<li><div class="fn"/>void <b><a href="qwidget.html#updatesEnabled-prop">setUpdatesEnabled</a></b> ( bool <i>enable</i> )</li>
 
240
<li><div class="fn"/>void <b><a href="qwidget.html#whatsThis-prop">setWhatsThis</a></b> ( const QString &amp; )</li>
 
241
<li><div class="fn"/>void <b><a href="qwidget.html#windowFlags-prop">setWindowFlags</a></b> ( Qt::WindowFlags <i>type</i> )</li>
 
242
<li><div class="fn"/>void <b><a href="qwidget.html#windowIcon-prop">setWindowIcon</a></b> ( const QIcon &amp; <i>icon</i> )</li>
 
243
<li><div class="fn"/>void <b><a href="qwidget.html#windowIconText-prop">setWindowIconText</a></b> ( const QString &amp; )</li>
 
244
<li><div class="fn"/>void <b><a href="qwidget.html#windowOpacity-prop">setWindowOpacity</a></b> ( qreal <i>level</i> )</li>
 
245
<li><div class="fn"/>void <b><a href="qwidget.html#setWindowRole">setWindowRole</a></b> ( const QString &amp; <i>role</i> )</li>
 
246
<li><div class="fn"/>void <b><a href="qwidget.html#setWindowState">setWindowState</a></b> ( Qt::WindowStates <i>windowState</i> )</li>
 
247
<li><div class="fn"/>void <b><a href="qwidget.html#windowTitle-prop">setWindowTitle</a></b> ( const QString &amp; )</li>
 
248
<li><div class="fn"/>QSize <b><a href="qwidget.html#size-prop">size</a></b> () const</li>
 
249
<li><div class="fn"/>virtual QSize <b><a href="qwidget.html#sizeHint-prop">sizeHint</a></b> () const</li>
 
250
<li><div class="fn"/>QSize <b><a href="qwidget.html#sizeIncrement-prop">sizeIncrement</a></b> () const</li>
 
251
<li><div class="fn"/>QSizePolicy <b><a href="qwidget.html#sizePolicy-prop">sizePolicy</a></b> () const</li>
 
252
<li><div class="fn"/>void <b><a href="qwidget.html#stackUnder">stackUnder</a></b> ( QWidget * <i>w</i> )</li>
 
253
<li><div class="fn"/>QString <b><a href="qwidget.html#statusTip-prop">statusTip</a></b> () const</li>
 
254
<li><div class="fn"/>QStyle * <b><a href="qwidget.html#style">style</a></b> () const</li>
 
255
<li><div class="fn"/>bool <b><a href="qwidget.html#testAttribute">testAttribute</a></b> ( Qt::WidgetAttribute <i>attribute</i> ) const</li>
 
256
<li><div class="fn"/>QString <b><a href="qwidget.html#toolTip-prop">toolTip</a></b> () const</li>
 
257
<li><div class="fn"/>bool <b><a href="qwidget.html#underMouse">underMouse</a></b> () const</li>
 
258
<li><div class="fn"/>void <b><a href="qwidget.html#cursor-prop">unsetCursor</a></b> ()</li>
 
259
<li><div class="fn"/>void <b><a href="qwidget.html#layoutDirection-prop">unsetLayoutDirection</a></b> ()</li>
 
260
<li><div class="fn"/>void <b><a href="qwidget.html#update-2">update</a></b> ( int <i>x</i>, int <i>y</i>, int <i>w</i>, int <i>h</i> )</li>
 
261
<li><div class="fn"/>void <b><a href="qwidget.html#update-3">update</a></b> ( const QRect &amp; <i>r</i> )</li>
 
262
<li><div class="fn"/>void <b><a href="qwidget.html#update-4">update</a></b> ( const QRegion &amp; <i>rgn</i> )</li>
 
263
<li><div class="fn"/>void <b><a href="qwidget.html#updateGeometry">updateGeometry</a></b> ()</li>
 
264
<li><div class="fn"/>bool <b><a href="qwidget.html#updatesEnabled-prop">updatesEnabled</a></b> () const</li>
 
265
<li><div class="fn"/>QRegion <b><a href="qwidget.html#visibleRegion">visibleRegion</a></b> () const</li>
 
266
<li><div class="fn"/>QString <b><a href="qwidget.html#whatsThis-prop">whatsThis</a></b> () const</li>
 
267
<li><div class="fn"/>int <b><a href="qwidget.html#width-prop">width</a></b> () const</li>
 
268
<li><div class="fn"/>WId <b><a href="qwidget.html#winId">winId</a></b> () const</li>
 
269
<li><div class="fn"/>QWidget * <b><a href="qwidget.html#window">window</a></b> () const</li>
 
270
<li><div class="fn"/>Qt::WindowFlags <b><a href="qwidget.html#windowFlags-prop">windowFlags</a></b> () const</li>
 
271
<li><div class="fn"/>QIcon <b><a href="qwidget.html#windowIcon-prop">windowIcon</a></b> () const</li>
 
272
<li><div class="fn"/>QString <b><a href="qwidget.html#windowIconText-prop">windowIconText</a></b> () const</li>
 
273
<li><div class="fn"/>qreal <b><a href="qwidget.html#windowOpacity-prop">windowOpacity</a></b> () const</li>
 
274
<li><div class="fn"/>QString <b><a href="qwidget.html#windowRole">windowRole</a></b> () const</li>
 
275
<li><div class="fn"/>Qt::WindowStates <b><a href="qwidget.html#windowState">windowState</a></b> () const</li>
 
276
<li><div class="fn"/>QString <b><a href="qwidget.html#windowTitle-prop">windowTitle</a></b> () const</li>
 
277
<li><div class="fn"/>Qt::WindowType <b><a href="qwidget.html#windowType">windowType</a></b> () const</li>
 
278
<li><div class="fn"/>int <b><a href="qwidget.html#x-prop">x</a></b> () const</li>
 
279
<li><div class="fn"/>Qt::HANDLE <b><a href="qwidget.html#x11PictureHandle">x11PictureHandle</a></b> () const</li>
 
280
<li><div class="fn"/>int <b><a href="qwidget.html#y-prop">y</a></b> () const</li>
 
281
</ul>
 
282
<ul>
 
283
<li><div class="fn"/>28 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
 
284
<li><div class="fn"/>10 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
 
285
</ul>
 
286
<a name="public-slots"></a>
 
287
<h3>Public Slots</h3>
 
288
<ul>
 
289
<li><div class="fn"/>bool <b><a href="qwidget.html#close">close</a></b> ()</li>
 
290
<li><div class="fn"/>void <b><a href="qwidget.html#hide">hide</a></b> ()</li>
 
291
<li><div class="fn"/>void <b><a href="qwidget.html#lower">lower</a></b> ()</li>
 
292
<li><div class="fn"/>void <b><a href="qwidget.html#raise">raise</a></b> ()</li>
 
293
<li><div class="fn"/>void <b><a href="qwidget.html#repaint">repaint</a></b> ()</li>
 
294
<li><div class="fn"/>void <b><a href="qwidget.html#setDisabled">setDisabled</a></b> ( bool <i>disable</i> )</li>
 
295
<li><div class="fn"/>void <b><a href="qwidget.html#enabled-prop">setEnabled</a></b> ( bool )</li>
 
296
<li><div class="fn"/>void <b><a href="qwidget.html#setFocus-2">setFocus</a></b> ()</li>
 
297
<li><div class="fn"/>void <b><a href="qwidget.html#setHidden">setHidden</a></b> ( bool <i>hidden</i> )</li>
 
298
<li><div class="fn"/>virtual void <b><a href="qwidget.html#visible-prop">setVisible</a></b> ( bool <i>visible</i> )</li>
 
299
<li><div class="fn"/>void <b><a href="qwidget.html#windowModified-prop">setWindowModified</a></b> ( bool )</li>
 
300
<li><div class="fn"/>void <b><a href="qwidget.html#show">show</a></b> ()</li>
 
301
<li><div class="fn"/>void <b><a href="qwidget.html#showFullScreen">showFullScreen</a></b> ()</li>
 
302
<li><div class="fn"/>void <b><a href="qwidget.html#showMaximized">showMaximized</a></b> ()</li>
 
303
<li><div class="fn"/>void <b><a href="qwidget.html#showMinimized">showMinimized</a></b> ()</li>
 
304
<li><div class="fn"/>void <b><a href="qwidget.html#showNormal">showNormal</a></b> ()</li>
 
305
<li><div class="fn"/>void <b><a href="qwidget.html#update">update</a></b> ()</li>
 
306
</ul>
 
307
<ul>
 
308
<li><div class="fn"/>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
 
309
</ul>
 
310
<a name="signals"></a>
 
311
<h3>Signals</h3>
 
312
<ul>
 
313
<li><div class="fn"/>void <b><a href="qwidget.html#customContextMenuRequested">customContextMenuRequested</a></b> ( const QPoint &amp; <i>pos</i> )</li>
 
314
</ul>
 
315
<ul>
 
316
<li><div class="fn"/>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
 
317
</ul>
 
318
<a name="static-public-members"></a>
 
319
<h3>Static Public Members</h3>
 
320
<ul>
 
321
<li><div class="fn"/>QWidget * <b><a href="qwidget.html#find">find</a></b> ( WId <i>id</i> )</li>
 
322
<li><div class="fn"/>QWidget * <b><a href="qwidget.html#keyboardGrabber">keyboardGrabber</a></b> ()</li>
 
323
<li><div class="fn"/>QWidget * <b><a href="qwidget.html#mouseGrabber">mouseGrabber</a></b> ()</li>
 
324
<li><div class="fn"/>void <b><a href="qwidget.html#setTabOrder">setTabOrder</a></b> ( QWidget * <i>first</i>, QWidget * <i>second</i> )</li>
 
325
</ul>
 
326
<ul>
 
327
<li><div class="fn"/>4 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
 
328
</ul>
 
329
<a name="protected-functions"></a>
 
330
<h3>Protected Functions</h3>
 
331
<ul>
 
332
<li><div class="fn"/>virtual void <b><a href="qwidget.html#actionEvent">actionEvent</a></b> ( QActionEvent * <i>event</i> )</li>
 
333
<li><div class="fn"/>virtual void <b><a href="qwidget.html#changeEvent">changeEvent</a></b> ( QEvent * <i>e</i> )</li>
 
334
<li><div class="fn"/>virtual void <b><a href="qwidget.html#closeEvent">closeEvent</a></b> ( QCloseEvent * <i>e</i> )</li>
 
335
<li><div class="fn"/>virtual void <b><a href="qwidget.html#contextMenuEvent">contextMenuEvent</a></b> ( QContextMenuEvent * <i>e</i> )</li>
 
336
<li><div class="fn"/>void <b><a href="qwidget.html#create">create</a></b> ( WId <i>window</i> = 0, bool <i>initializeWindow</i> = true, bool <i>destroyOldWindow</i> = true )</li>
 
337
<li><div class="fn"/>void <b><a href="qwidget.html#destroy">destroy</a></b> ( bool <i>destroyWindow</i> = true, bool <i>destroySubWindows</i> = true )</li>
 
338
<li><div class="fn"/>virtual void <b><a href="qwidget.html#dragEnterEvent">dragEnterEvent</a></b> ( QDragEnterEvent * <i>event</i> )</li>
 
339
<li><div class="fn"/>virtual void <b><a href="qwidget.html#dragLeaveEvent">dragLeaveEvent</a></b> ( QDragLeaveEvent * <i>event</i> )</li>
 
340
<li><div class="fn"/>virtual void <b><a href="qwidget.html#dragMoveEvent">dragMoveEvent</a></b> ( QDragMoveEvent * <i>event</i> )</li>
 
341
<li><div class="fn"/>virtual void <b><a href="qwidget.html#dropEvent">dropEvent</a></b> ( QDropEvent * <i>event</i> )</li>
 
342
<li><div class="fn"/>virtual void <b><a href="qwidget.html#enterEvent">enterEvent</a></b> ( QEvent * <i>event</i> )</li>
 
343
<li><div class="fn"/>virtual bool <b><a href="qwidget.html#event">event</a></b> ( QEvent * <i>e</i> )</li>
 
344
<li><div class="fn"/>virtual void <b><a href="qwidget.html#focusInEvent">focusInEvent</a></b> ( QFocusEvent * <i>event</i> )</li>
 
345
<li><div class="fn"/>bool <b><a href="qwidget.html#focusNextChild">focusNextChild</a></b> ()</li>
 
346
<li><div class="fn"/>virtual bool <b><a href="qwidget.html#focusNextPrevChild">focusNextPrevChild</a></b> ( bool <i>next</i> )</li>
 
347
<li><div class="fn"/>virtual void <b><a href="qwidget.html#focusOutEvent">focusOutEvent</a></b> ( QFocusEvent * <i>event</i> )</li>
 
348
<li><div class="fn"/>bool <b><a href="qwidget.html#focusPreviousChild">focusPreviousChild</a></b> ()</li>
 
349
<li><div class="fn"/>virtual void <b><a href="qwidget.html#hideEvent">hideEvent</a></b> ( QHideEvent * <i>event</i> )</li>
 
350
<li><div class="fn"/>virtual void <b><a href="qwidget.html#inputMethodEvent">inputMethodEvent</a></b> ( QInputMethodEvent * <i>e</i> )</li>
 
351
<li><div class="fn"/>virtual void <b><a href="qwidget.html#keyPressEvent">keyPressEvent</a></b> ( QKeyEvent * <i>e</i> )</li>
 
352
<li><div class="fn"/>virtual void <b><a href="qwidget.html#keyReleaseEvent">keyReleaseEvent</a></b> ( QKeyEvent * <i>e</i> )</li>
 
353
<li><div class="fn"/>virtual void <b><a href="qwidget.html#leaveEvent">leaveEvent</a></b> ( QEvent * <i>event</i> )</li>
 
354
<li><div class="fn"/>virtual bool <b><a href="qwidget.html#macEvent">macEvent</a></b> ( EventHandlerCallRef <i>caller</i>, EventRef <i>event</i> )</li>
 
355
<li><div class="fn"/>virtual int <b><a href="qwidget.html#metric">metric</a></b> ( PaintDeviceMetric <i>m</i> ) const</li>
 
356
<li><div class="fn"/>virtual void <b><a href="qwidget.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a></b> ( QMouseEvent * <i>e</i> )</li>
 
357
<li><div class="fn"/>virtual void <b><a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a></b> ( QMouseEvent * <i>e</i> )</li>
 
358
<li><div class="fn"/>virtual void <b><a href="qwidget.html#mousePressEvent">mousePressEvent</a></b> ( QMouseEvent * <i>e</i> )</li>
 
359
<li><div class="fn"/>virtual void <b><a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a></b> ( QMouseEvent * <i>e</i> )</li>
 
360
<li><div class="fn"/>virtual void <b><a href="qwidget.html#moveEvent">moveEvent</a></b> ( QMoveEvent * <i>event</i> )</li>
 
361
<li><div class="fn"/>virtual void <b><a href="qwidget.html#paintEvent">paintEvent</a></b> ( QPaintEvent * <i>event</i> )</li>
 
362
<li><div class="fn"/>virtual bool <b><a href="qwidget.html#qwsEvent">qwsEvent</a></b> ( QWSEvent * <i>event</i> )</li>
 
363
<li><div class="fn"/>void <b><a href="qwidget.html#resetInputContext">resetInputContext</a></b> ()</li>
 
364
<li><div class="fn"/>virtual void <b><a href="qwidget.html#resizeEvent">resizeEvent</a></b> ( QResizeEvent * <i>event</i> )</li>
 
365
<li><div class="fn"/>virtual void <b><a href="qwidget.html#showEvent">showEvent</a></b> ( QShowEvent * <i>event</i> )</li>
 
366
<li><div class="fn"/>virtual void <b><a href="qwidget.html#tabletEvent">tabletEvent</a></b> ( QTabletEvent * <i>e</i> )</li>
 
367
<li><div class="fn"/>void <b><a href="qwidget.html#updateMicroFocus">updateMicroFocus</a></b> ()</li>
 
368
<li><div class="fn"/>virtual void <b><a href="qwidget.html#wheelEvent">wheelEvent</a></b> ( QWheelEvent * <i>e</i> )</li>
 
369
<li><div class="fn"/>virtual bool <b><a href="qwidget.html#winEvent">winEvent</a></b> ( MSG * <i>message</i>, long * <i>result</i> )</li>
 
370
<li><div class="fn"/>virtual bool <b><a href="qwidget.html#x11Event">x11Event</a></b> ( XEvent * <i>event</i> )</li>
 
371
</ul>
 
372
<ul>
 
373
<li><div class="fn"/>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
 
374
</ul>
 
375
<a name="details"></a>
 
376
<hr />
 
377
<h2>Detailed Description</h2>
 
378
<p>The QWidget class is the base class of all user interface objects.</p>
 
379
<p>The widget is the atom of the user interface: it receives mouse, keyboard and other events from the window system, and paints a representation of itself on the screen. Every widget is rectangular, and they are sorted in a Z-order. A widget is clipped by its parent and by the widgets in front of it.</p>
 
380
<p>A widget that isn't embedded in a parent widget is called a window. Usually, windows have a frame and a title bar, although it is also possible to create windows without such decoration using suitable <a href="qt.html#WindowType-enum">window flags</a>). In Qt, <a href="qmainwindow.html">QMainWindow</a> and the various subclasses of <a href="qdialog.html">QDialog</a> are the most common window types.</p>
 
381
<p>A widget without a parent widget is always an independent window.</p>
 
382
<p>Non-window widgets are child widgets. These are child windows in their parent widgets. You cannot usually distinguish a child widget from its parent visually. Most other widgets in Qt are useful only as child widgets. (It is possible to make, say, a button into a window, but most people prefer to put their buttons inside other widgets, e.g. <a href="qdialog.html">QDialog</a>.)</p>
 
383
<p>If you want to use a QWidget to hold child widgets you will probably want to add a layout to the parent QWidget. (See <a href="layout.html">Layouts</a>.)</p>
 
384
<p>QWidget has many member functions, but some of them have little direct functionality: for example, QWidget has a font property, but never uses this itself. There are many subclasses which provide real functionality, such as <a href="qpushbutton.html">QPushButton</a>, <a href="qlistwidget.html">QListWidget</a> and <a href="qtabwidget.html">QTabWidget</a>, etc.</p>
 
385
<a name="groups-of-functions"></a>
 
386
<h3>Groups of functions:</h3>
 
387
<table align="center" cellpadding="2" cellspacing="1" border="0">
 
388
<tr valign="top" bgcolor="#a2c511"><th>Context</th><th>Functions</th></tr>
 
389
<tr valign="top" bgcolor="#f0f0f0"><td>Window functions</td><td><a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), <a href="qwidget.html#raise">raise</a>(), <a href="qwidget.html#lower">lower</a>(), <a href="qwidget.html#close">close</a>().</td></tr>
 
390
<tr valign="top" bgcolor="#e0e0e0"><td>Top-level windows</td><td><a href="qwidget.html#windowModified-prop">isWindowModified</a>(), <a href="qwidget.html#windowModified-prop">setWindowModified</a>(), <a href="qwidget.html#windowTitle-prop">windowTitle</a>(), <a href="qwidget.html#windowTitle-prop">setWindowTitle</a>(), <a href="qwidget.html#windowIcon-prop">windowIcon</a>(), <a href="qwidget.html#windowIcon-prop">setWindowIcon</a>(), <a href="qwidget.html#windowIconText-prop">windowIconText</a>(), <a href="qwidget.html#windowIconText-prop">setWindowIconText</a>(), <a href="qwidget.html#isActiveWindow-prop">isActiveWindow</a>(), <a href="qwidget.html#activateWindow">activateWindow</a>(), <a href="qwidget.html#showMinimized">showMinimized</a>(). <a href="qwidget.html#showMaximized">showMaximized</a>(), <a href="qwidget.html#showFullScreen">showFullScreen</a>(), <a href="qwidget.html#showNormal">showNormal</a>().</td></tr>
 
391
<tr valign="top" bgcolor="#f0f0f0"><td>Window contents</td><td><a href="qwidget.html#update">update</a>(), <a href="qwidget.html#repaint">repaint</a>(), <a href="qwidget.html#scroll">scroll</a>().</td></tr>
 
392
<tr valign="top" bgcolor="#e0e0e0"><td>Geometry</td><td><a href="qwidget.html#pos-prop">pos</a>(), <a href="qwidget.html#size-prop">size</a>(), <a href="qwidget.html#rect-prop">rect</a>(), <a href="qwidget.html#x-prop">x</a>(), <a href="qwidget.html#y-prop">y</a>(), <a href="qwidget.html#width-prop">width</a>(), <a href="qwidget.html#height-prop">height</a>(), <a href="qwidget.html#sizePolicy-prop">sizePolicy</a>(), <a href="qwidget.html#sizePolicy-prop">setSizePolicy</a>(), <a href="qwidget.html#sizeHint-prop">sizeHint</a>(), <a href="qwidget.html#updateGeometry">updateGeometry</a>(), <a href="qwidget.html#layout">layout</a>(), <a href="qwidget.html#pos-prop">move</a>(), <a href="qwidget.html#size-prop">resize</a>(), <a href="qwidget.html#geometry-prop">setGeometry</a>(), <a href="qwidget.html#frameGeometry-prop">frameGeometry</a>(), <a href="qwidget.html#geometry-prop">geometry</a>(), <a href="qwidget.html#childrenRect-prop">childrenRect</a>(), <a href="qwidget.html#adjustSize">adjustSize</a>(), <a href="qwidget.html#mapFromGlobal">mapFromGlobal</a>(), <a href="qwidget.html#mapFromParent">mapFromParent</a>() <a href="qwidget.html#mapToGlobal">mapToGlobal</a>(), <a href="qwidget.html#mapToParent">mapToParent</a>(), <a href="qwidget.html#maximumSize-prop">maximumSize</a>(), <a href="qwidget.html#minimumSize-prop">minimumSize</a>(), <a href="qwidget.html#sizeIncrement-prop">sizeIncrement</a>(), <a href="qwidget.html#maximumSize-prop">setMaximumSize</a>(), <a href="qwidget.html#minimumSize-prop">setMinimumSize</a>(), <a href="qwidget.html#sizeIncrement-prop">setSizeIncrement</a>(), <a href="qwidget.html#baseSize-prop">setBaseSize</a>(), <a href="qwidget.html#setFixedSize">setFixedSize</a>()</td></tr>
 
393
<tr valign="top" bgcolor="#f0f0f0"><td>Mode</td><td><a href="qwidget.html#visible-prop">isVisible</a>(), <a href="qwidget.html#isVisibleTo">isVisibleTo</a>(), <a href="qwidget.html#minimized-prop">isMinimized</a>(), <a href="qwidget.html#enabled-prop">isEnabled</a>(), <a href="qwidget.html#isEnabledTo">isEnabledTo</a>(), <a href="qwidget.html#modal-prop">isModal</a>(), <a href="qwidget.html#isWindow">isWindow</a>(), <a href="qwidget.html#enabled-prop">setEnabled</a>(), <a href="qwidget.html#mouseTracking-prop">hasMouseTracking</a>(), <a href="qwidget.html#mouseTracking-prop">setMouseTracking</a>(), <a href="qwidget.html#updatesEnabled-prop">updatesEnabled</a>(), <a href="qwidget.html#updatesEnabled-prop">setUpdatesEnabled</a>(), <a href="qwidget.html#visibleRegion">visibleRegion</a>().</td></tr>
 
394
<tr valign="top" bgcolor="#e0e0e0"><td>Look and feel</td><td><a href="qwidget.html#style">style</a>(), <a href="qwidget.html#setStyle">setStyle</a>(), <a href="qwidget.html#cursor-prop">cursor</a>(), <a href="qwidget.html#cursor-prop">setCursor</a>() <a href="qwidget.html#font-prop">font</a>(), <a href="qwidget.html#font-prop">setFont</a>(), <a href="qwidget.html#palette-prop">palette</a>(), <a href="qwidget.html#palette-prop">setPalette</a>(), <a href="qwidget.html#backgroundRole">backgroundRole</a>(), <a href="qwidget.html#setBackgroundRole">setBackgroundRole</a>(), <a href="qwidget.html#fontMetrics">fontMetrics</a>(), <a href="qwidget.html#fontInfo">fontInfo</a>().</td></tr>
 
395
<tr valign="top" bgcolor="#f0f0f0"><td>Keyboard focus functions</td><td><a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>(), <a href="qwidget.html#focusPolicy-prop">focusPolicy</a>(), <a href="qwidget.html#focus-prop">hasFocus</a>(), <a href="qwidget.html#setFocus">setFocus</a>(), <a href="qwidget.html#clearFocus">clearFocus</a>(), <a href="qwidget.html#setTabOrder">setTabOrder</a>(), <a href="qwidget.html#setFocusProxy">setFocusProxy</a>().</td></tr>
 
396
<tr valign="top" bgcolor="#e0e0e0"><td>Mouse and keyboard grabbing</td><td><a href="qwidget.html#grabMouse">grabMouse</a>(), <a href="qwidget.html#releaseMouse">releaseMouse</a>(), <a href="qwidget.html#grabKeyboard">grabKeyboard</a>(), <a href="qwidget.html#releaseKeyboard">releaseKeyboard</a>(), <a href="qwidget.html#mouseGrabber">mouseGrabber</a>(), <a href="qwidget.html#keyboardGrabber">keyboardGrabber</a>().</td></tr>
 
397
<tr valign="top" bgcolor="#f0f0f0"><td>Event handlers</td><td><a href="qwidget.html#event">event</a>(), <a href="qwidget.html#mousePressEvent">mousePressEvent</a>(), <a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>(), <a href="qwidget.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a>(), <a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>(), <a href="qwidget.html#keyPressEvent">keyPressEvent</a>(), <a href="qwidget.html#keyReleaseEvent">keyReleaseEvent</a>(), <a href="qwidget.html#focusInEvent">focusInEvent</a>(), <a href="qwidget.html#focusOutEvent">focusOutEvent</a>(), <a href="qwidget.html#wheelEvent">wheelEvent</a>(), <a href="qwidget.html#enterEvent">enterEvent</a>(), <a href="qwidget.html#leaveEvent">leaveEvent</a>(), <a href="qwidget.html#paintEvent">paintEvent</a>(), <a href="qwidget.html#moveEvent">moveEvent</a>(), <a href="qwidget.html#resizeEvent">resizeEvent</a>(), <a href="qwidget.html#closeEvent">closeEvent</a>(), <a href="qwidget.html#dragEnterEvent">dragEnterEvent</a>(), <a href="qwidget.html#dragMoveEvent">dragMoveEvent</a>(), <a href="qwidget.html#dragLeaveEvent">dragLeaveEvent</a>(), <a href="qwidget.html#dropEvent">dropEvent</a>(), <a href="qobject.html#childEvent">childEvent</a>(), <a href="qwidget.html#showEvent">showEvent</a>(), <a href="qwidget.html#hideEvent">hideEvent</a>(), <a href="qobject.html#customEvent">customEvent</a>(). <a href="qwidget.html#changeEvent">changeEvent</a>(),</td></tr>
 
398
<tr valign="top" bgcolor="#e0e0e0"><td>System functions</td><td><a href="qwidget.html#parentWidget">parentWidget</a>(), <a href="qwidget.html#window">window</a>(), <a href="qwidget.html#setParent">setParent</a>(), <a href="qwidget.html#winId">winId</a>(), <a href="qwidget.html#find">find</a>(), <a href="qwidget.html#metric">metric</a>().</td></tr>
 
399
<tr valign="top" bgcolor="#f0f0f0"><td>What's this help</td><td><a href="qwidget.html#whatsThis-prop">setWhatsThis</a>()</td></tr>
 
400
<tr valign="top" bgcolor="#e0e0e0"><td>Focus functions</td><td><a href="qwidget.html#focusNextChild">focusNextChild</a>(), <a href="qwidget.html#focusPreviousChild">focusPreviousChild</a>()</td></tr>
 
401
</table>
 
402
<p>Every widget's constructor accepts one or two standard arguments:</p>
 
403
<ol type="1">
 
404
<li><tt>QWidget *parent = 0</tt> is the parent of the new widget. If it is 0 (the default), the new widget will be a window. If not, it will be a child of <i>parent</i>, and be constrained by <i>parent</i>'s geometry (unless you specify <tt>Qt::Window</tt> as window flag).</li>
 
405
<li><tt>Qt::WFlags f = 0</tt> (where available) sets the window flags; the default is suitable for almost all widgets, but to get, for example, a window without a window system frame, you must use special flags.</li>
 
406
</ol>
 
407
<p>The <a href="widgets-calculator.html">widgets/calculator</a> example program is good example of a simple widget. It contains event handlers (as all widgets must), routines that are specific to it (as all useful widgets do), and has children and connections. Everything it does is done in response to an event: this is by far the most common way to design GUI applications.</p>
 
408
<p>You will need to supply the content for your widgets yourself, but here is a brief run-down of the events, starting with the most common ones:</p>
 
409
<ul>
 
410
<li><a href="qwidget.html#paintEvent">paintEvent</a>() - called whenever the widget needs to be repainted. Every widget which displays output must implement it. Painting using a <a href="qpainter.html">QPainter</a> can only take place in a <a href="qwidget.html#paintEvent">paintEvent</a>() or a function called by a <a href="qwidget.html#paintEvent">paintEvent</a>().</li>
 
411
<li><a href="qwidget.html#resizeEvent">resizeEvent</a>() - called when the widget has been resized.</li>
 
412
<li><a href="qwidget.html#mousePressEvent">mousePressEvent</a>() - called when a mouse button is pressed. There are six mouse-related events, but the mouse press and mouse release events are by far the most important. A widget receives mouse press events when the mouse is inside it, or when it has grabbed the mouse using <a href="qwidget.html#grabMouse">grabMouse</a>().</li>
 
413
<li><a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>() - called when a mouse button is released. A widget receives mouse release events when it has received the corresponding mouse press event. This means that if the user presses the mouse inside <i>your</i> widget, then drags the mouse to somewhere else, then releases, <i>your</i> widget receives the release event. There is one exception: if a popup menu appears while the mouse button is held down, this popup immediately steals the mouse events.</li>
 
414
<li><a href="qwidget.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a>() - not quite as obvious as it might seem. If the user double-clicks, the widget receives a mouse press event (perhaps a mouse move event or two if they don't hold the mouse quite steady), a mouse release event and finally this event. It is <i>not possible</i> to distinguish a click from a double click until you've seen whether the second click arrives. (This is one reason why most GUI books recommend that double clicks be an extension of single clicks, rather than trigger a different action.)</li>
 
415
</ul>
 
416
<p>If your widget only contains child widgets, you probably do not need to implement any event handlers. If you want to detect a mouse click in a child widget call the child's <a href="qwidget.html#underMouse">underMouse</a>() function inside the parent widget's <a href="qwidget.html#mousePressEvent">mousePressEvent</a>().</p>
 
417
<p>Widgets that accept keyboard input need to reimplement a few more event handlers:</p>
 
418
<ul>
 
419
<li><a href="qwidget.html#keyPressEvent">keyPressEvent</a>() - called whenever a key is pressed, and again when a key has been held down long enough for it to auto-repeat. Note that the Tab and Shift+Tab keys are only passed to the widget if they are not used by the focus-change mechanisms. To force those keys to be processed by your widget, you must reimplement <a href="qwidget.html#event">QWidget::event</a>().</li>
 
420
<li><a href="qwidget.html#focusInEvent">focusInEvent</a>() - called when the widget gains keyboard focus (assuming you have called <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>()). Well written widgets indicate that they own the keyboard focus in a clear but discreet way.</li>
 
421
<li><a href="qwidget.html#focusOutEvent">focusOutEvent</a>() - called when the widget loses keyboard focus.</li>
 
422
</ul>
 
423
<p>Some widgets will also need to reimplement some of the less common event handlers:</p>
 
424
<ul>
 
425
<li><a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>() - called whenever the mouse moves while a button is held down. This is useful for, for example, dragging. If you call setMouseTracking(true), you get mouse move events even when no buttons are held down. (See also the <a href="dnd.html">drag and drop</a> information.)</li>
 
426
<li><a href="qwidget.html#keyReleaseEvent">keyReleaseEvent</a>() - called whenever a key is released, and also while it is held down if the key is auto-repeating. In that case the widget receives a key release event and immediately a key press event for every repeat. Note that the Tab and Shift+Tab keys are only passed to the widget if they are not used by the focus-change mechanisms. To force those keys to be processed by your widget, you must reimplement <a href="qwidget.html#event">QWidget::event</a>().</li>
 
427
<li><a href="qwidget.html#wheelEvent">wheelEvent</a>() -- called whenever the user turns the mouse wheel while the widget has the focus.</li>
 
428
<li><a href="qwidget.html#enterEvent">enterEvent</a>() - called when the mouse enters the widget's screen space. (This excludes screen space owned by any children of the widget.)</li>
 
429
<li><a href="qwidget.html#leaveEvent">leaveEvent</a>() - called when the mouse leaves the widget's screen space.</li>
 
430
<li><a href="qwidget.html#moveEvent">moveEvent</a>() - called when the widget has been moved relative to its parent.</li>
 
431
<li><a href="qwidget.html#closeEvent">closeEvent</a>() - called when the user closes the widget (or when <a href="qwidget.html#close">close</a>() is called).</li>
 
432
</ul>
 
433
<p>There are also some rather obscure events. They are listed in <tt>qevent.h</tt> and you need to reimplement <a href="qwidget.html#event">event</a>() to handle them. The default implementation of <a href="qwidget.html#event">event</a>() handles Tab and Shift+Tab (to move the keyboard focus), and passes on most other events to one of the more specialized handlers above.</p>
 
434
<p>When implementing a widget, there are a few more things to consider.</p>
 
435
<ul>
 
436
<li>In the constructor, be sure to set up your member variables early on, before there's any chance that you might receive an event.</li>
 
437
<li>It is almost always useful to reimplement <a href="qwidget.html#sizeHint-prop">sizeHint</a>() and to set the correct size policy with <a href="qwidget.html#sizePolicy-prop">setSizePolicy</a>(), so users of your class can set up layout management more easily. A size policy lets you supply good defaults for the layout management handling, so that other widgets can contain and manage yours easily. <a href="qwidget.html#sizeHint-prop">sizeHint</a>() indicates a &quot;good&quot; size for the widget.</li>
 
438
<li>If your widget is a window, <a href="qwidget.html#windowTitle-prop">setWindowTitle</a>() and <a href="qwidget.html#windowIcon-prop">setWindowIcon</a>() set the title bar and icon respectively.</li>
 
439
</ul>
 
440
<p>From Qt 4.0, QWidget automatically double-buffers its painting, so there's no need to write double-buffering code in <a href="qwidget.html#paintEvent">paintEvent</a>() to avoid flicker.</p>
 
441
<p>See also <a href="qevent.html">QEvent</a>, <a href="qpainter.html">QPainter</a>, <a href="qgridlayout.html">QGridLayout</a>, and <a href="qboxlayout.html">QBoxLayout</a>.</p>
 
442
<hr />
 
443
<h2>Property Documentation</h2>
 
444
<h3 class="fn"><a name="acceptDrops-prop"></a>acceptDrops : bool</h3>
 
445
<p>This property holds whether drop events are enabled for this widget.</p>
 
446
<p>Setting this property to true announces to the system that this widget <i>may</i> be able to accept drop events.</p>
 
447
<p>If the widget is the desktop (<a href="porting4.html#qwidget">QWidget::</a>(<a href="qwidget.html#windowType">windowType</a>() == <a href="qt.html#WindowType-enum">Qt::Desktop</a>)), this may fail if another application is using the desktop; you can call acceptDrops() to test if this occurs.</p>
 
448
<p><b>Warning:</b> Do not modify this property in a Drag&amp;Drop event handler.</p>
 
449
<p>Access functions:</p>
 
450
<ul>
 
451
<li><div class="fn"/><b>bool acceptDrops () const</b></li>
 
452
<li><div class="fn"/><b>void setAcceptDrops ( bool <i>on</i> )</b></li>
 
453
</ul>
 
454
<h3 class="fn"><a name="accessibleDescription-prop"></a>accessibleDescription : <a href="qstring.html">QString</a></h3>
 
455
<p>This property holds the widget's description as seen by assistive technologies.</p>
 
456
<p>Access functions:</p>
 
457
<ul>
 
458
<li><div class="fn"/><b>QString accessibleDescription () const</b></li>
 
459
<li><div class="fn"/><b>void setAccessibleDescription ( const QString &amp; <i>description</i> )</b></li>
 
460
</ul>
 
461
<p>See also <a href="qaccessibleinterface.html#text">QAccessibleInterface::text</a>().</p>
 
462
<h3 class="fn"><a name="accessibleName-prop"></a>accessibleName : <a href="qstring.html">QString</a></h3>
 
463
<p>This property holds the widget's name as seen by assistive technologies.</p>
 
464
<p>Access functions:</p>
 
465
<ul>
 
466
<li><div class="fn"/><b>QString accessibleName () const</b></li>
 
467
<li><div class="fn"/><b>void setAccessibleName ( const QString &amp; <i>name</i> )</b></li>
 
468
</ul>
 
469
<p>See also <a href="qaccessibleinterface.html#text">QAccessibleInterface::text</a>().</p>
 
470
<h3 class="fn"><a name="baseSize-prop"></a>baseSize : <a href="qsize.html">QSize</a></h3>
 
471
<p>This property holds the base size of the widget.</p>
 
472
<p>The base size is used to calculate a proper widget size if the widget defines <a href="qwidget.html#sizeIncrement-prop">sizeIncrement</a>().</p>
 
473
<p>Access functions:</p>
 
474
<ul>
 
475
<li><div class="fn"/><b>QSize baseSize () const</b></li>
 
476
<li><div class="fn"/><b>void setBaseSize ( const QSize &amp; )</b></li>
 
477
<li><div class="fn"/><b>void setBaseSize ( int <i>basew</i>, int <i>baseh</i> )</b></li>
 
478
</ul>
 
479
<p>See also <a href="qwidget.html#sizeIncrement-prop">setSizeIncrement</a>().</p>
 
480
<h3 class="fn"><a name="childrenRect-prop"></a>childrenRect : const <a href="qrect.html">QRect</a></h3>
 
481
<p>This property holds the bounding rectangle of the widget's children.</p>
 
482
<p>Hidden children are excluded.</p>
 
483
<p>Access functions:</p>
 
484
<ul>
 
485
<li><div class="fn"/><b>QRect childrenRect () const</b></li>
 
486
</ul>
 
487
<p>See also <a href="qwidget.html#childrenRegion-prop">childrenRegion</a>() and <a href="qwidget.html#geometry-prop">geometry</a>().</p>
 
488
<h3 class="fn"><a name="childrenRegion-prop"></a>childrenRegion : const <a href="qregion.html">QRegion</a></h3>
 
489
<p>This property holds the combined region occupied by the widget's children.</p>
 
490
<p>Hidden children are excluded.</p>
 
491
<p>Access functions:</p>
 
492
<ul>
 
493
<li><div class="fn"/><b>QRegion childrenRegion () const</b></li>
 
494
</ul>
 
495
<p>See also <a href="qwidget.html#childrenRect-prop">childrenRect</a>() and <a href="qwidget.html#geometry-prop">geometry</a>().</p>
 
496
<h3 class="fn"><a name="contextMenuPolicy-prop"></a>contextMenuPolicy : <a href="qt.html#ContextMenuPolicy-enum">Qt::ContextMenuPolicy</a></h3>
 
497
<p>This property holds how the widget shows a context menu.</p>
 
498
<p>The default value of this property is <a href="qt.html#ContextMenuPolicy-enum">Qt::DefaultContextMenu</a>, which means the <a href="qwidget.html#contextMenuEvent">contextMenuEvent</a>() handler is called. Other values are <a href="qt.html#ContextMenuPolicy-enum">Qt::NoContextMenu</a>, <a href="qt.html#ContextMenuPolicy-enum">Qt::ActionsContextMenu</a>, and <a href="qt.html#ContextMenuPolicy-enum">Qt::CustomContextMenu</a>. With <a href="qt.html#ContextMenuPolicy-enum">Qt::CustomContextMenu</a>, the signal <a href="qwidget.html#customContextMenuRequested">customContextMenuRequested</a>() is emitted.</p>
 
499
<p>Access functions:</p>
 
500
<ul>
 
501
<li><div class="fn"/><b>Qt::ContextMenuPolicy contextMenuPolicy () const</b></li>
 
502
<li><div class="fn"/><b>void setContextMenuPolicy ( Qt::ContextMenuPolicy <i>policy</i> )</b></li>
 
503
</ul>
 
504
<p>See also <a href="qwidget.html#contextMenuEvent">contextMenuEvent</a>() and <a href="qwidget.html#customContextMenuRequested">customContextMenuRequested</a>().</p>
 
505
<h3 class="fn"><a name="cursor-prop"></a>cursor : <a href="qcursor.html">QCursor</a></h3>
 
506
<p>This property holds the cursor shape for this widget.</p>
 
507
<p>The mouse cursor will assume this shape when it's over this widget. See the <a href="qt.html#CursorShape-enum">list of predefined cursor objects</a> for a range of useful shapes.</p>
 
508
<p>An editor widget might use an I-beam cursor:</p>
 
509
<pre>&nbsp;   setCursor(Qt::IBeamCursor);</pre>
 
510
<p>If no cursor has been set, or after a call to unsetCursor(), the parent's cursor is used. The function unsetCursor() has no effect on windows.</p>
 
511
<p>Access functions:</p>
 
512
<ul>
 
513
<li><div class="fn"/><b>QCursor cursor () const</b></li>
 
514
<li><div class="fn"/><b>void setCursor ( const QCursor &amp; )</b></li>
 
515
<li><div class="fn"/><b>void unsetCursor ()</b></li>
 
516
</ul>
 
517
<p>See also <a href="qapplication.html#setOverrideCursor">QApplication::setOverrideCursor</a>().</p>
 
518
<h3 class="fn"><a name="enabled-prop"></a>enabled : bool</h3>
 
519
<p>This property holds whether the widget is enabled.</p>
 
520
<p>An enabled widget handles keyboard and mouse events; a disabled widget does not.</p>
 
521
<p>Some widgets display themselves differently when they are disabled. For example a button might draw its label grayed out. If your widget needs to know when it becomes enabled or disabled, you can use the <a href="qwidget.html#changeEvent">changeEvent</a>() with type <a href="qevent.html#Type-enum">QEvent::EnabledChange</a>.</p>
 
522
<p>Disabling a widget implicitly disables all its children. Enabling respectively enables all child widgets unless they have been explicitly disabled.</p>
 
523
<p>Access functions:</p>
 
524
<ul>
 
525
<li><div class="fn"/><b>bool isEnabled () const</b></li>
 
526
<li><div class="fn"/><b>void setEnabled ( bool )</b></li>
 
527
</ul>
 
528
<p>See also <a href="qwidget.html#isEnabledTo">isEnabledTo</a>(), <a href="qkeyevent.html">QKeyEvent</a>, <a href="qmouseevent.html">QMouseEvent</a>, and <a href="qwidget.html#changeEvent">changeEvent</a>().</p>
 
529
<h3 class="fn"><a name="focus-prop"></a>focus : const bool</h3>
 
530
<p>This property holds whether this widget (or its focus proxy) has the keyboard input focus.</p>
 
531
<p>Effectively equivalent to <tt>QApplication::focusWidget() == this</tt>.</p>
 
532
<p>Access functions:</p>
 
533
<ul>
 
534
<li><div class="fn"/><b>bool hasFocus () const</b></li>
 
535
</ul>
 
536
<p>See also <a href="qwidget.html#setFocus">setFocus</a>(), <a href="qwidget.html#clearFocus">clearFocus</a>(), <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>(), and <a href="qapplication.html#focusWidget">QApplication::focusWidget</a>().</p>
 
537
<h3 class="fn"><a name="focusPolicy-prop"></a>focusPolicy : <a href="qt.html#FocusPolicy-enum">Qt::FocusPolicy</a></h3>
 
538
<p>This property holds the way the widget accepts keyboard focus.</p>
 
539
<p>The policy is <tt>Qt::TabFocus</tt> if the widget accepts keyboard focus by tabbing, <tt>Qt::ClickFocus</tt> if the widget accepts focus by clicking, <tt>Qt::StrongFocus</tt> if it accepts both, and <tt>Qt::NoFocus</tt> (the default) if it does not accept focus at all.</p>
 
540
<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>
 
541
<p>Access functions:</p>
 
542
<ul>
 
543
<li><div class="fn"/><b>Qt::FocusPolicy focusPolicy () const</b></li>
 
544
<li><div class="fn"/><b>void setFocusPolicy ( Qt::FocusPolicy <i>policy</i> )</b></li>
 
545
</ul>
 
546
<p>See also <a href="qwidget.html#focusInEvent">focusInEvent</a>(), <a href="qwidget.html#focusOutEvent">focusOutEvent</a>(), <a href="qwidget.html#keyPressEvent">keyPressEvent</a>(), <a href="qwidget.html#keyReleaseEvent">keyReleaseEvent</a>(), and <a href="qwidget.html#enabled-prop">enabled</a>.</p>
 
547
<h3 class="fn"><a name="font-prop"></a>font : <a href="qfont.html">QFont</a></h3>
 
548
<p>This property holds the font currently set for the widget.</p>
 
549
<p>The <a href="qwidget.html#fontInfo">fontInfo</a>() function reports the actual font that is being used by the widget.</p>
 
550
<p>As long as no special font has been set, or after setFont(QFont()) is called, this is either a special font for the widget class, the parent's font or (if this widget is a top level widget), the default application font.</p>
 
551
<p>This code fragment sets a 12 point helvetica bold font:</p>
 
552
<pre>&nbsp;   QFont f(&quot;Helvetica&quot;, 12, QFont::Bold);
 
553
    setFont(f);</pre>
 
554
<p>In addition to setting the font, setFont() informs all children about the change.</p>
 
555
<p>Access functions:</p>
 
556
<ul>
 
557
<li><div class="fn"/><b>const QFont &amp; font () const</b></li>
 
558
<li><div class="fn"/><b>void setFont ( const QFont &amp; )</b></li>
 
559
</ul>
 
560
<p>See also <a href="qwidget.html#fontInfo">fontInfo</a>() and <a href="qwidget.html#fontMetrics">fontMetrics</a>().</p>
 
561
<h3 class="fn"><a name="frameGeometry-prop"></a>frameGeometry : const <a href="qrect.html">QRect</a></h3>
 
562
<p>This property holds geometry of the widget relative to its parent including any window frame.</p>
 
563
<p>See the <a href="geometry.html">Window Geometry documentation</a> for an overview of geometry issues with windows.</p>
 
564
<p>Access functions:</p>
 
565
<ul>
 
566
<li><div class="fn"/><b>QRect frameGeometry () const</b></li>
 
567
</ul>
 
568
<p>See also <a href="qwidget.html#geometry-prop">geometry</a>(), <a href="qwidget.html#x-prop">x</a>(), <a href="qwidget.html#y-prop">y</a>(), and <a href="qwidget.html#pos-prop">pos</a>().</p>
 
569
<h3 class="fn"><a name="frameSize-prop"></a>frameSize : const <a href="qsize.html">QSize</a></h3>
 
570
<p>This property holds the size of the widget including any window frame.</p>
 
571
<p>Access functions:</p>
 
572
<ul>
 
573
<li><div class="fn"/><b>QSize frameSize () const</b></li>
 
574
</ul>
 
575
<h3 class="fn"><a name="fullScreen-prop"></a>fullScreen : const bool</h3>
 
576
<p>This property holds whether the widget is full screen.</p>
 
577
<p>Access functions:</p>
 
578
<ul>
 
579
<li><div class="fn"/><b>bool isFullScreen () const</b></li>
 
580
</ul>
 
581
<p>See also <a href="qwidget.html#windowState">windowState</a>(), <a href="qwidget.html#minimized-prop">minimized</a>, and <a href="qwidget.html#maximized-prop">maximized</a>.</p>
 
582
<h3 class="fn"><a name="geometry-prop"></a>geometry : <a href="qrect.html">QRect</a></h3>
 
583
<p>This property holds the geometry of the widget relative to its parent and excluding the window frame.</p>
 
584
<p>When changing the geometry, the widget, if visible, receives a move event (<a href="qwidget.html#moveEvent">moveEvent</a>()) and/or a resize event (<a href="qwidget.html#resizeEvent">resizeEvent</a>()) immediately. If the widget is not currently visible, it is guaranteed to receive appropriate events before it is shown.</p>
 
585
<p>The size component is adjusted if it lies outside the range defined by <a href="qwidget.html#minimumSize-prop">minimumSize</a>() and <a href="qwidget.html#maximumSize-prop">maximumSize</a>().</p>
 
586
<p><b>Warning:</b> Calling setGeometry() inside <a href="qwidget.html#resizeEvent">resizeEvent</a>() or <a href="qwidget.html#moveEvent">moveEvent</a>() can lead to infinite recursion.</p>
 
587
<p>See the <a href="geometry.html">Window Geometry documentation</a> for an overview of window geometry.</p>
 
588
<p>Access functions:</p>
 
589
<ul>
 
590
<li><div class="fn"/><b>const QRect &amp; geometry () const</b></li>
 
591
<li><div class="fn"/><b>void setGeometry ( int <i>x</i>, int <i>y</i>, int <i>w</i>, int <i>h</i> )</b></li>
 
592
<li><div class="fn"/><b>void setGeometry ( const QRect &amp; )</b></li>
 
593
</ul>
 
594
<p>See also <a href="qwidget.html#frameGeometry-prop">frameGeometry</a>(), <a href="qwidget.html#rect-prop">rect</a>(), <a href="qwidget.html#pos-prop">move</a>(), <a href="qwidget.html#size-prop">resize</a>(), <a href="qwidget.html#moveEvent">moveEvent</a>(), <a href="qwidget.html#resizeEvent">resizeEvent</a>(), <a href="qwidget.html#minimumSize-prop">minimumSize</a>(), and <a href="qwidget.html#maximumSize-prop">maximumSize</a>().</p>
 
595
<h3 class="fn"><a name="height-prop"></a>height : const int</h3>
 
596
<p>This property holds the height of the widget excluding any window frame.</p>
 
597
<p>See the <a href="geometry.html">Window Geometry documentation</a> for an overview of window geometry.</p>
 
598
<p>Access functions:</p>
 
599
<ul>
 
600
<li><div class="fn"/><b>int height () const</b></li>
 
601
</ul>
 
602
<p>See also <a href="qwidget.html#geometry-prop">geometry</a>, <a href="qwidget.html#width-prop">width</a>, and <a href="qwidget.html#size-prop">size</a>.</p>
 
603
<h3 class="fn"><a name="isActiveWindow-prop"></a>isActiveWindow : const bool</h3>
 
604
<p>This property holds whether this widget's window is the active window.</p>
 
605
<p>The active window is the window that contains the widget that has keyboard focus.</p>
 
606
<p>When popup windows are visible, this property is true for both the active window <i>and</i> for the popup.</p>
 
607
<p>Access functions:</p>
 
608
<ul>
 
609
<li><div class="fn"/><b>bool isActiveWindow () const</b></li>
 
610
</ul>
 
611
<p>See also <a href="qwidget.html#activateWindow">activateWindow</a>() and <a href="qapplication.html#activeWindow">QApplication::activeWindow</a>().</p>
 
612
<h3 class="fn"><a name="layoutDirection-prop"></a>layoutDirection : <a href="qt.html#LayoutDirection-enum">Qt::LayoutDirection</a></h3>
 
613
<p>This property holds the layout direction for this widget.</p>
 
614
<p>Access functions:</p>
 
615
<ul>
 
616
<li><div class="fn"/><b>Qt::LayoutDirection layoutDirection () const</b></li>
 
617
<li><div class="fn"/><b>void setLayoutDirection ( Qt::LayoutDirection <i>direction</i> )</b></li>
 
618
<li><div class="fn"/><b>void unsetLayoutDirection ()</b></li>
 
619
</ul>
 
620
<p>See also <a href="qapplication.html#layoutDirection-prop">QApplication::layoutDirection</a>.</p>
 
621
<h3 class="fn"><a name="maximized-prop"></a>maximized : const bool</h3>
 
622
<p>This property holds whether this widget is maximized.</p>
 
623
<p>This property is only relevant for windows.</p>
 
624
<p>Note that due to limitations in some window-systems, this does not always report the expected results (e.g. if the user on <a href="winsystem.html#x11">X11</a> maximizes the window via the window manager, Qt has no way of distinguishing this from any other resize). This is expected to improve as window manager protocols evolve.</p>
 
625
<p>Access functions:</p>
 
626
<ul>
 
627
<li><div class="fn"/><b>bool isMaximized () const</b></li>
 
628
</ul>
 
629
<p>See also <a href="qwidget.html#windowState">windowState</a>(), <a href="qwidget.html#showMaximized">showMaximized</a>(), <a href="qwidget.html#visible-prop">visible</a>, <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), <a href="qwidget.html#showNormal">showNormal</a>(), and <a href="qwidget.html#minimized-prop">minimized</a>.</p>
 
630
<h3 class="fn"><a name="maximumHeight-prop"></a>maximumHeight : int</h3>
 
631
<p>This property holds the widget's maximum height.</p>
 
632
<p>This property corresponds to <a href="qwidget.html#maximumSize-prop">maximumSize</a>().<a href="qwidget.html#height-prop">height</a>().</p>
 
633
<p>Access functions:</p>
 
634
<ul>
 
635
<li><div class="fn"/><b>int maximumHeight () const</b></li>
 
636
<li><div class="fn"/><b>void setMaximumHeight ( int <i>maxh</i> )</b></li>
 
637
</ul>
 
638
<p>See also <a href="qwidget.html#maximumSize-prop">maximumSize</a> and <a href="qwidget.html#maximumWidth-prop">maximumWidth</a>.</p>
 
639
<h3 class="fn"><a name="maximumSize-prop"></a>maximumSize : <a href="qsize.html">QSize</a></h3>
 
640
<p>This property holds the widget's maximum size.</p>
 
641
<p>The widget cannot be resized to a larger size than the maximum widget size.</p>
 
642
<p>Access functions:</p>
 
643
<ul>
 
644
<li><div class="fn"/><b>QSize maximumSize () const</b></li>
 
645
<li><div class="fn"/><b>void setMaximumSize ( const QSize &amp; )</b></li>
 
646
<li><div class="fn"/><b>void setMaximumSize ( int <i>maxw</i>, int <i>maxh</i> )</b></li>
 
647
</ul>
 
648
<p>See also <a href="qwidget.html#maximumWidth-prop">maximumWidth</a>, <a href="qwidget.html#maximumHeight-prop">maximumHeight</a>, <a href="qwidget.html#minimumSize-prop">minimumSize</a>, and <a href="qwidget.html#sizeIncrement-prop">sizeIncrement</a>.</p>
 
649
<h3 class="fn"><a name="maximumWidth-prop"></a>maximumWidth : int</h3>
 
650
<p>This property holds the widget's maximum width.</p>
 
651
<p>This property corresponds to <a href="qwidget.html#maximumSize-prop">maximumSize</a>().<a href="qwidget.html#width-prop">width</a>().</p>
 
652
<p>Access functions:</p>
 
653
<ul>
 
654
<li><div class="fn"/><b>int maximumWidth () const</b></li>
 
655
<li><div class="fn"/><b>void setMaximumWidth ( int <i>maxw</i> )</b></li>
 
656
</ul>
 
657
<p>See also <a href="qwidget.html#maximumSize-prop">maximumSize</a> and <a href="qwidget.html#maximumHeight-prop">maximumHeight</a>.</p>
 
658
<h3 class="fn"><a name="minimized-prop"></a>minimized : const bool</h3>
 
659
<p>This property holds whether this widget is minimized (iconified).</p>
 
660
<p>This property is only relevant for windows.</p>
 
661
<p>Access functions:</p>
 
662
<ul>
 
663
<li><div class="fn"/><b>bool isMinimized () const</b></li>
 
664
</ul>
 
665
<p>See also <a href="qwidget.html#showMinimized">showMinimized</a>(), <a href="qwidget.html#visible-prop">visible</a>, <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), <a href="qwidget.html#showNormal">showNormal</a>(), and <a href="qwidget.html#maximized-prop">maximized</a>.</p>
 
666
<h3 class="fn"><a name="minimumHeight-prop"></a>minimumHeight : int</h3>
 
667
<p>This property holds the widget's minimum height.</p>
 
668
<p>This property corresponds to <a href="qwidget.html#minimumSize-prop">minimumSize</a>().<a href="qwidget.html#height-prop">height</a>().</p>
 
669
<p>Access functions:</p>
 
670
<ul>
 
671
<li><div class="fn"/><b>int minimumHeight () const</b></li>
 
672
<li><div class="fn"/><b>void setMinimumHeight ( int <i>minh</i> )</b></li>
 
673
</ul>
 
674
<p>See also <a href="qwidget.html#minimumSize-prop">minimumSize</a> and <a href="qwidget.html#minimumWidth-prop">minimumWidth</a>.</p>
 
675
<h3 class="fn"><a name="minimumSize-prop"></a>minimumSize : <a href="qsize.html">QSize</a></h3>
 
676
<p>This property holds the widget's minimum size.</p>
 
677
<p>The widget cannot be resized to a smaller size than the minimum widget size. The widget's size is forced to the minimum size if the current size is smaller.</p>
 
678
<p>The minimum size set by this function will override the minimum size defined by <a href="qlayout.html">QLayout</a>.</p>
 
679
<p>Access functions:</p>
 
680
<ul>
 
681
<li><div class="fn"/><b>QSize minimumSize () const</b></li>
 
682
<li><div class="fn"/><b>void setMinimumSize ( const QSize &amp; )</b></li>
 
683
<li><div class="fn"/><b>void setMinimumSize ( int <i>minw</i>, int <i>minh</i> )</b></li>
 
684
</ul>
 
685
<p>See also <a href="qwidget.html#minimumWidth-prop">minimumWidth</a>, <a href="qwidget.html#minimumHeight-prop">minimumHeight</a>, <a href="qwidget.html#maximumSize-prop">maximumSize</a>, and <a href="qwidget.html#sizeIncrement-prop">sizeIncrement</a>.</p>
 
686
<h3 class="fn"><a name="minimumSizeHint-prop"></a>minimumSizeHint : const <a href="qsize.html">QSize</a></h3>
 
687
<p>This property holds the recommended minimum size for the widget.</p>
 
688
<p>If the value of this property is an invalid size, no minimum size is recommended.</p>
 
689
<p>The default implementation of minimumSizeHint() returns an invalid size if there is no layout for this widget, and returns the layout's minimum size otherwise. Most built-in widgets reimplement minimumSizeHint().</p>
 
690
<p><a href="qlayout.html">QLayout</a> will never resize a widget to a size smaller than the minimum size hint unless <a href="qwidget.html#minimumSize-prop">minimumSize</a>() is set or the size policy is set to <tt>QSizePolicy::Ignore</tt>. If <a href="qwidget.html#minimumSize-prop">minimumSize</a>() is set, the minimum size hint will be ignored.</p>
 
691
<p>Access functions:</p>
 
692
<ul>
 
693
<li><div class="fn"/><b>virtual QSize minimumSizeHint () const</b></li>
 
694
</ul>
 
695
<p>See also <a href="qsize.html#isValid">QSize::isValid</a>(), <a href="qwidget.html#size-prop">resize</a>(), <a href="qwidget.html#minimumSize-prop">setMinimumSize</a>(), and <a href="qwidget.html#sizePolicy-prop">sizePolicy</a>().</p>
 
696
<h3 class="fn"><a name="minimumWidth-prop"></a>minimumWidth : int</h3>
 
697
<p>This property holds the widget's minimum width.</p>
 
698
<p>This property corresponds to <a href="qwidget.html#minimumSize-prop">minimumSize</a>().<a href="qwidget.html#width-prop">width</a>().</p>
 
699
<p>Access functions:</p>
 
700
<ul>
 
701
<li><div class="fn"/><b>int minimumWidth () const</b></li>
 
702
<li><div class="fn"/><b>void setMinimumWidth ( int <i>minw</i> )</b></li>
 
703
</ul>
 
704
<p>See also <a href="qwidget.html#minimumSize-prop">minimumSize</a> and <a href="qwidget.html#minimumHeight-prop">minimumHeight</a>.</p>
 
705
<h3 class="fn"><a name="modal-prop"></a>modal : const bool</h3>
 
706
<p>This property holds whether the widget is a modal widget.</p>
 
707
<p>This property only makes sense for windows. A modal widget prevents widgets in all other windows from getting any input.</p>
 
708
<p>Access functions:</p>
 
709
<ul>
 
710
<li><div class="fn"/><b>bool isModal () const</b></li>
 
711
</ul>
 
712
<p>See also <a href="qwidget.html#isWindow">isWindow</a>() and <a href="qdialog.html">QDialog</a>.</p>
 
713
<h3 class="fn"><a name="mouseTracking-prop"></a>mouseTracking : bool</h3>
 
714
<p>This property holds whether mouse tracking is enabled for the widget.</p>
 
715
<p>If mouse tracking is disabled (the default), the widget only receives mouse move events when at least one mouse button is pressed while the mouse is being moved.</p>
 
716
<p>If mouse tracking is enabled, the widget receives mouse move events even if no buttons are pressed.</p>
 
717
<p>Access functions:</p>
 
718
<ul>
 
719
<li><div class="fn"/><b>bool hasMouseTracking () const</b></li>
 
720
<li><div class="fn"/><b>void setMouseTracking ( bool <i>enable</i> )</b></li>
 
721
</ul>
 
722
<p>See also <a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>().</p>
 
723
<h3 class="fn"><a name="normalGeometry-prop"></a>normalGeometry : const <a href="qrect.html">QRect</a></h3>
 
724
<p>This property holds the geometry a toplevel widget has when it is not maximized or fullscreen.</p>
 
725
<p>For child widgets this property always holds an empty rect.</p>
 
726
<p>Access functions:</p>
 
727
<ul>
 
728
<li><div class="fn"/><b>QRect normalGeometry () const</b></li>
 
729
</ul>
 
730
<p>See also <a href="qwidget.html#windowState">QWidget::windowState</a>() and <a href="qwidget.html#geometry-prop">QWidget::geometry</a>.</p>
 
731
<h3 class="fn"><a name="palette-prop"></a>palette : <a href="qpalette.html">QPalette</a></h3>
 
732
<p>This property holds the widget's palette.</p>
 
733
<p>As long as no special palette has been set, this is either a special palette for the widget class, the parent's palette or (if this widget is a top level widget), the default application palette.</p>
 
734
<p>Access functions:</p>
 
735
<ul>
 
736
<li><div class="fn"/><b>const QPalette &amp; palette () const</b></li>
 
737
<li><div class="fn"/><b>void setPalette ( const QPalette &amp; )</b></li>
 
738
</ul>
 
739
<p>See also <a href="qapplication.html#palette">QApplication::palette</a>().</p>
 
740
<h3 class="fn"><a name="pos-prop"></a>pos : <a href="qpoint.html">QPoint</a></h3>
 
741
<p>This property holds the position of the widget within its parent widget.</p>
 
742
<p>If the widget is a window, the position is that of the widget on the desktop, including its frame.</p>
 
743
<p>When changing the position, the widget, if visible, receives a move event (<a href="qwidget.html#moveEvent">moveEvent</a>()) immediately. If the widget is not currently visible, it is guaranteed to receive an event before it is shown.</p>
 
744
<p>move() is virtual, and all other overloaded move() implementations in Qt call it.</p>
 
745
<p><b>Warning:</b> Calling move() or <a href="qwidget.html#geometry-prop">setGeometry</a>() inside <a href="qwidget.html#moveEvent">moveEvent</a>() can lead to infinite recursion.</p>
 
746
<p>See the <a href="geometry.html">Window Geometry documentation</a> for an overview of window geometry.</p>
 
747
<p>Access functions:</p>
 
748
<ul>
 
749
<li><div class="fn"/><b>QPoint pos () const</b></li>
 
750
<li><div class="fn"/><b>void move ( int <i>x</i>, int <i>y</i> )</b></li>
 
751
<li><div class="fn"/><b>void move ( const QPoint &amp; )</b></li>
 
752
</ul>
 
753
<p>See also <a href="qwidget.html#frameGeometry-prop">frameGeometry</a>, <a href="qwidget.html#size-prop">size</a>, <a href="qwidget.html#x-prop">x</a>(), and <a href="qwidget.html#y-prop">y</a>().</p>
 
754
<h3 class="fn"><a name="rect-prop"></a>rect : const <a href="qrect.html">QRect</a></h3>
 
755
<p>This property holds the internal geometry of the widget excluding any window frame.</p>
 
756
<p>The rect property equals <a href="qrect.html">QRect</a>(0, 0, <a href="qwidget.html#width-prop">width</a>(), <a href="qwidget.html#height-prop">height</a>()).</p>
 
757
<p>See the <a href="geometry.html">Window Geometry documentation</a> for an overview of window geometry.</p>
 
758
<p>Access functions:</p>
 
759
<ul>
 
760
<li><div class="fn"/><b>QRect rect () const</b></li>
 
761
</ul>
 
762
<p>See also <a href="qwidget.html#size-prop">size</a>.</p>
 
763
<h3 class="fn"><a name="size-prop"></a>size : <a href="qsize.html">QSize</a></h3>
 
764
<p>This property holds the size of the widget excluding any window frame.</p>
 
765
<p>If the widget is visible when it is being resized, it receives a resize event (<a href="qwidget.html#resizeEvent">resizeEvent</a>()) immediately. If the widget is not currently visible, it is guaranteed to receive an event before it is shown.</p>
 
766
<p>The size is adjusted if it lies outside the range defined by <a href="qwidget.html#minimumSize-prop">minimumSize</a>() and <a href="qwidget.html#maximumSize-prop">maximumSize</a>(). For windows, the minimum size is always at least <a href="qsize.html">QSize</a>(1, 1), and it might be larger, depending on the window manager.</p>
 
767
<p><b>Warning:</b> Calling resize() or <a href="qwidget.html#geometry-prop">setGeometry</a>() inside <a href="qwidget.html#resizeEvent">resizeEvent</a>() can lead to infinite recursion.</p>
 
768
<p>Access functions:</p>
 
769
<ul>
 
770
<li><div class="fn"/><b>QSize size () const</b></li>
 
771
<li><div class="fn"/><b>void resize ( int <i>w</i>, int <i>h</i> )</b></li>
 
772
<li><div class="fn"/><b>void resize ( const QSize &amp; )</b></li>
 
773
</ul>
 
774
<p>See also <a href="qwidget.html#pos-prop">pos</a>, <a href="qwidget.html#geometry-prop">geometry</a>, <a href="qwidget.html#minimumSize-prop">minimumSize</a>, <a href="qwidget.html#maximumSize-prop">maximumSize</a>, and <a href="qwidget.html#resizeEvent">resizeEvent</a>().</p>
 
775
<h3 class="fn"><a name="sizeHint-prop"></a>sizeHint : const <a href="qsize.html">QSize</a></h3>
 
776
<p>This property holds the recommended size for the widget.</p>
 
777
<p>If the value of this property is an invalid size, no size is recommended.</p>
 
778
<p>The default implementation of sizeHint() returns an invalid size if there is no layout for this widget, and returns the layout's preferred size otherwise.</p>
 
779
<p>Access functions:</p>
 
780
<ul>
 
781
<li><div class="fn"/><b>virtual QSize sizeHint () const</b></li>
 
782
</ul>
 
783
<p>See also <a href="qsize.html#isValid">QSize::isValid</a>(), <a href="qwidget.html#minimumSizeHint-prop">minimumSizeHint</a>(), <a href="qwidget.html#sizePolicy-prop">sizePolicy</a>(), <a href="qwidget.html#minimumSize-prop">setMinimumSize</a>(), and <a href="qwidget.html#updateGeometry">updateGeometry</a>().</p>
 
784
<h3 class="fn"><a name="sizeIncrement-prop"></a>sizeIncrement : <a href="qsize.html">QSize</a></h3>
 
785
<p>This property holds the size increment of the widget.</p>
 
786
<p>When the user resizes the window, the size will move in steps of sizeIncrement().<a href="qwidget.html#width-prop">width</a>() pixels horizontally and sizeIncrement.<a href="qwidget.html#height-prop">height</a>() pixels vertically, with <a href="qwidget.html#baseSize-prop">baseSize</a>() as the basis. Preferred widget sizes are for non-negative integers <i>i</i> and <i>j</i>:</p>
 
787
<pre>&nbsp;   width = baseSize().width() + i * sizeIncrement().width();
 
788
    height = baseSize().height() + j * sizeIncrement().height();</pre>
 
789
<p>Note that while you can set the size increment for all widgets, it only affects windows.</p>
 
790
<p><b>Warning:</b> The size increment has no effect under Windows, and may be disregarded by the window manager on X.</p>
 
791
<p>Access functions:</p>
 
792
<ul>
 
793
<li><div class="fn"/><b>QSize sizeIncrement () const</b></li>
 
794
<li><div class="fn"/><b>void setSizeIncrement ( const QSize &amp; )</b></li>
 
795
<li><div class="fn"/><b>void setSizeIncrement ( int <i>w</i>, int <i>h</i> )</b></li>
 
796
</ul>
 
797
<p>See also <a href="qwidget.html#size-prop">size</a>, <a href="qwidget.html#minimumSize-prop">minimumSize</a>, and <a href="qwidget.html#maximumSize-prop">maximumSize</a>.</p>
 
798
<h3 class="fn"><a name="sizePolicy-prop"></a>sizePolicy : <a href="qsizepolicy.html">QSizePolicy</a></h3>
 
799
<p>This property holds the default layout behavior of the widget.</p>
 
800
<p>If there is a <a href="qlayout.html">QLayout</a> that manages this widget's children, the size policy specified by that layout is used. If there is no such <a href="qlayout.html">QLayout</a>, the result of this function is used.</p>
 
801
<p>The default policy is Preferred/Preferred, which means that the widget can be freely resized, but prefers to be the size <a href="qwidget.html#sizeHint-prop">sizeHint</a>() returns. Button-like widgets set the size policy to specify that they may stretch horizontally, but are fixed vertically. The same applies to lineedit controls (such as <a href="qlineedit.html">QLineEdit</a>, <a href="qspinbox.html">QSpinBox</a> or an editable <a href="qcombobox.html">QComboBox</a>) and other horizontally orientated widgets (such as <a href="qprogressbar.html">QProgressBar</a>). <a href="qtoolbutton.html">QToolButton</a>'s are normally square, so they allow growth in both directions. Widgets that support different directions (such as <a href="qslider.html">QSlider</a>, <a href="qscrollbar.html">QScrollBar</a> or <a href="porting4.html#qheader">QHeader</a>) specify stretching in the respective direction only. Widgets that can provide scrollbars (usually subclasses of <a href="porting4.html#qscrollview">QScrollView</a>) tend to specify that they can use additional space, and that they can make do with less than <a href="qwidget.html#sizeHint-prop">sizeHint</a>().</p>
 
802
<p>Access functions:</p>
 
803
<ul>
 
804
<li><div class="fn"/><b>QSizePolicy sizePolicy () const</b></li>
 
805
<li><div class="fn"/><b>void setSizePolicy ( QSizePolicy )</b></li>
 
806
<li><div class="fn"/><b>void setSizePolicy ( QSizePolicy::Policy <i>horizontal</i>, QSizePolicy::Policy <i>vertical</i> )</b></li>
 
807
</ul>
 
808
<p>See also <a href="qwidget.html#sizeHint-prop">sizeHint</a>(), <a href="qlayout.html">QLayout</a>, <a href="qsizepolicy.html">QSizePolicy</a>, and <a href="qwidget.html#updateGeometry">updateGeometry</a>().</p>
 
809
<h3 class="fn"><a name="statusTip-prop"></a>statusTip : <a href="qstring.html">QString</a></h3>
 
810
<p>This property holds the widget's status tip.</p>
 
811
<p>Access functions:</p>
 
812
<ul>
 
813
<li><div class="fn"/><b>QString statusTip () const</b></li>
 
814
<li><div class="fn"/><b>void setStatusTip ( const QString &amp; )</b></li>
 
815
</ul>
 
816
<p>See also <a href="qwidget.html#toolTip-prop">toolTip</a> and <a href="qwidget.html#whatsThis-prop">whatsThis</a>.</p>
 
817
<h3 class="fn"><a name="toolTip-prop"></a>toolTip : <a href="qstring.html">QString</a></h3>
 
818
<p>This property holds the widget's tooltip.</p>
 
819
<p>Access functions:</p>
 
820
<ul>
 
821
<li><div class="fn"/><b>QString toolTip () const</b></li>
 
822
<li><div class="fn"/><b>void setToolTip ( const QString &amp; )</b></li>
 
823
</ul>
 
824
<p>See also <a href="qtooltip.html">QToolTip</a>, <a href="qwidget.html#statusTip-prop">statusTip</a>, and <a href="qwidget.html#whatsThis-prop">whatsThis</a>.</p>
 
825
<h3 class="fn"><a name="updatesEnabled-prop"></a>updatesEnabled : bool</h3>
 
826
<p>This property holds whether updates are enabled.</p>
 
827
<p>An updates enabled widget receives paint events and has a system background; a disabled widget does not. This also implies that calling <a href="qwidget.html#update">update</a>() and <a href="qwidget.html#repaint">repaint</a>() has no effect if updates are disabled.</p>
 
828
<p>setUpdatesEnabled() is normally used to disable updates for a short period of time, for instance to avoid screen flicker during large changes. In Qt, widgets normally do not generate screen flicker, but on <a href="winsystem.html#x11">X11</a> the server might erase regions on the screen when widgets get hidden before they can be replaced by other widgets. Disabling updates solves this.</p>
 
829
<p>Example:</p>
 
830
<pre>&nbsp;   setUpdatesEnabled(false);
 
831
    bigVisualChanges();
 
832
    setUpdatesEnabled(true);</pre>
 
833
<p>Disabling a widget implicitly disables all its children. Enabling respectively enables all child widgets unless they have been explicitly disabled. Re-enabling updates implicitly calls <a href="qwidget.html#update">update</a>() on the widget.</p>
 
834
<p>Access functions:</p>
 
835
<ul>
 
836
<li><div class="fn"/><b>bool updatesEnabled () const</b></li>
 
837
<li><div class="fn"/><b>void setUpdatesEnabled ( bool <i>enable</i> )</b></li>
 
838
</ul>
 
839
<p>See also <a href="qwidget.html#paintEvent">paintEvent</a>().</p>
 
840
<h3 class="fn"><a name="visible-prop"></a>visible : bool</h3>
 
841
<p>This property holds whether the widget is visible.</p>
 
842
<p>Calling setVisible(true) or <a href="qwidget.html#show">show</a>() sets the widget to visible status if all its parent widgets up to the window are visible. If an ancestor is not visible, the widget won't become visible until all its ancestors are shown. If its size or position has changed, Qt guarantees that a widget gets move and resize events just before it is shown. If the widget has not been resized yet, Qt will adjust the widget's size to a useful default using <a href="qwidget.html#adjustSize">adjustSize</a>().</p>
 
843
<p>Calling setVisible(false) or <a href="qwidget.html#hide">hide</a>() hides a widget explicitly. An explicitly hidden widget will never become visible, even if all its ancestors become visible, unless you show it.</p>
 
844
<p>A widget receives show and hide events when its visibility status changes. Between a hide and a show event, there is no need to waste CPU cycles preparing or displaying information to the user. A video application, for example, might simply stop generating new frames.</p>
 
845
<p>A widget that happens to be obscured by other windows on the screen is considered to be visible. The same applies to iconified windows and windows that exist on another virtual desktop (on platforms that support this concept). A widget receives spontaneous show and hide events when its mapping status is changed by the window system, e.g. a spontaneous hide event when the user minimizes the window, and a spontaneous show event when the window is restored again.</p>
 
846
<p>You almost never have to reimplement the setVisible() function. If you need to change some settings before a widget is shown, use <a href="qwidget.html#showEvent">showEvent</a>() instead. If you need to do some delayed initialization use the Polish event delivered to the <a href="qwidget.html#event">event</a>() method</p>
 
847
<p>Access functions:</p>
 
848
<ul>
 
849
<li><div class="fn"/><b>bool isVisible () const</b></li>
 
850
<li><div class="fn"/><b>virtual void setVisible ( bool <i>visible</i> )</b></li>
 
851
</ul>
 
852
<p>See also <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), <a href="qwidget.html#isHidden">isHidden</a>(), <a href="qwidget.html#isVisibleTo">isVisibleTo</a>(), <a href="qwidget.html#minimized-prop">isMinimized</a>(), <a href="qwidget.html#showEvent">showEvent</a>(), and <a href="qwidget.html#hideEvent">hideEvent</a>().</p>
 
853
<h3 class="fn"><a name="whatsThis-prop"></a>whatsThis : <a href="qstring.html">QString</a></h3>
 
854
<p>This property holds the widget's What's This help text.</p>
 
855
<p>Access functions:</p>
 
856
<ul>
 
857
<li><div class="fn"/><b>QString whatsThis () const</b></li>
 
858
<li><div class="fn"/><b>void setWhatsThis ( const QString &amp; )</b></li>
 
859
</ul>
 
860
<p>See also <a href="qwhatsthis.html">QWhatsThis</a>, <a href="qwidget.html#toolTip-prop">QWidget::toolTip</a>, and <a href="qwidget.html#statusTip-prop">QWidget::statusTip</a>.</p>
 
861
<h3 class="fn"><a name="width-prop"></a>width : const int</h3>
 
862
<p>This property holds the width of the widget excluding any window frame.</p>
 
863
<p>See the <a href="geometry.html">Window Geometry documentation</a> for an overview of window geometry.</p>
 
864
<p>Access functions:</p>
 
865
<ul>
 
866
<li><div class="fn"/><b>int width () const</b></li>
 
867
</ul>
 
868
<p>See also <a href="qwidget.html#geometry-prop">geometry</a>, <a href="qwidget.html#height-prop">height</a>, and <a href="qwidget.html#size-prop">size</a>.</p>
 
869
<h3 class="fn"><a name="windowFlags-prop"></a>windowFlags : <a href="qt.html#WindowType-enum">Qt::WindowFlags</a></h3>
 
870
<p>Window flags are a combination of a type (e.g. <a href="qt.html#WindowType-enum">Qt::Dialog</a>) and zero or more hints to the window system (e.g. <a href="qt.html#WindowType-enum">Qt::FramelessWindowHint</a>).</p>
 
871
<p>If the widget had type <a href="qt.html#WindowType-enum">Qt::Widget</a> or <a href="qt.html#WindowType-enum">Qt::SubWindow</a> and becomes a window (<a href="qt.html#WindowType-enum">Qt::Window</a>, <a href="qt.html#WindowType-enum">Qt::Dialog</a>, etc.), it is put at position (0, 0) on the desktop. If the widget is a window and becomes a <a href="qt.html#WindowType-enum">Qt::Widget</a> or <a href="qt.html#WindowType-enum">Qt::SubWindow</a>, it is put at position (0, 0) relative to its parent widget.</p>
 
872
<p>Access functions:</p>
 
873
<ul>
 
874
<li><div class="fn"/><b>Qt::WindowFlags windowFlags () const</b></li>
 
875
<li><div class="fn"/><b>void setWindowFlags ( Qt::WindowFlags <i>type</i> )</b></li>
 
876
</ul>
 
877
<p>See also <a href="qwidget.html#windowType">windowType</a>().</p>
 
878
<h3 class="fn"><a name="windowIcon-prop"></a>windowIcon : <a href="qicon.html">QIcon</a></h3>
 
879
<p>This property holds the widget's icon.</p>
 
880
<p>This property only makes sense for windows. If no icon has been set, windowIcon() returns the application icon (<a href="qapplication.html#windowIcon-prop">QApplication::windowIcon</a>()).</p>
 
881
<p>Access functions:</p>
 
882
<ul>
 
883
<li><div class="fn"/><b>QIcon windowIcon () const</b></li>
 
884
<li><div class="fn"/><b>void setWindowIcon ( const QIcon &amp; <i>icon</i> )</b></li>
 
885
</ul>
 
886
<p>See also <a href="qwidget.html#windowIconText-prop">windowIconText</a> and <a href="qwidget.html#windowTitle-prop">windowTitle</a>.</p>
 
887
<h3 class="fn"><a name="windowIconText-prop"></a>windowIconText : <a href="qstring.html">QString</a></h3>
 
888
<p>This property holds the widget's icon text.</p>
 
889
<p>This property only makes sense for windows. If no icon text has been set, this functions returns an empty string.</p>
 
890
<p>Access functions:</p>
 
891
<ul>
 
892
<li><div class="fn"/><b>QString windowIconText () const</b></li>
 
893
<li><div class="fn"/><b>void setWindowIconText ( const QString &amp; )</b></li>
 
894
</ul>
 
895
<p>See also <a href="qwidget.html#windowIcon-prop">windowIcon</a> and <a href="qwidget.html#windowTitle-prop">windowTitle</a>.</p>
 
896
<h3 class="fn"><a name="windowModified-prop"></a>windowModified : bool</h3>
 
897
<p>This property holds whether the document shown in the window has unsaved changes.</p>
 
898
<p>A modified window is a window whose content has changed but has not been saved to disk. This flag will have different effects varied by the platform. On Mac OS X the close button will have a modified look; on other platforms, the window title will have an '*' (asterisk).</p>
 
899
<p>The window title must contain a &quot;[*]&quot; placeholder, which indicates where the '*' should appear. Normally, it should appear right after the file name (e.g., &quot;document1.txt[*] - Text Editor&quot;). If the window isn't modified, the placeholder is simply removed.</p>
 
900
<p>Access functions:</p>
 
901
<ul>
 
902
<li><div class="fn"/><b>bool isWindowModified () const</b></li>
 
903
<li><div class="fn"/><b>void setWindowModified ( bool )</b></li>
 
904
</ul>
 
905
<p>See also <a href="qwidget.html#windowTitle-prop">windowTitle</a>.</p>
 
906
<h3 class="fn"><a name="windowOpacity-prop"></a>windowOpacity : double</h3>
 
907
<p>This property holds the level of opacity for the window.</p>
 
908
<p>The valid range of opacity is from 1.0 (completely opaque) to 0.0 (completely transparent).</p>
 
909
<p>By default the value of this property is 1.0.</p>
 
910
<p>This feature is only present on Mac OS X and Windows 2000 and up.</p>
 
911
<p><b>Warning:</b> Changing this property from opaque to transparent might issue a paint event that needs to be processed before the window is displayed correctly. This affects mainly the use of <a href="qpixmap.html#grabWindow">QPixmap::grabWindow</a>(). Also note that semi-transparent windows update and resize significantly slower than opaque windows.</p>
 
912
<p>Access functions:</p>
 
913
<ul>
 
914
<li><div class="fn"/><b>qreal windowOpacity () const</b></li>
 
915
<li><div class="fn"/><b>void setWindowOpacity ( qreal <i>level</i> )</b></li>
 
916
</ul>
 
917
<h3 class="fn"><a name="windowTitle-prop"></a>windowTitle : <a href="qstring.html">QString</a></h3>
 
918
<p>This property holds the window title (caption).</p>
 
919
<p>This property only makes sense for windows. If no caption has been set, the title is an empty string.</p>
 
920
<p>If you use the <a href="qwidget.html#windowModified-prop">windowModified</a> mechanism, the window title must contain a &quot;[*]&quot; placeholder, which indicates where the '*' should appear. Normally, it should appear right after the file name (e.g., &quot;document1.txt[*] - Text Editor&quot;). If the <a href="qwidget.html#windowModified-prop">windowModified</a> property is false (the default), the placeholder is simply removed.</p>
 
921
<p>Access functions:</p>
 
922
<ul>
 
923
<li><div class="fn"/><b>QString windowTitle () const</b></li>
 
924
<li><div class="fn"/><b>void setWindowTitle ( const QString &amp; )</b></li>
 
925
</ul>
 
926
<p>See also <a href="qwidget.html#windowIcon-prop">windowIcon</a>, <a href="qwidget.html#windowIconText-prop">windowIconText</a>, and <a href="qwidget.html#windowModified-prop">windowModified</a>.</p>
 
927
<h3 class="fn"><a name="x-prop"></a>x : const int</h3>
 
928
<p>This property holds the x coordinate of the widget relative to its parent including any window frame.</p>
 
929
<p>See the <a href="geometry.html">Window Geometry documentation</a> for an overview of window geometry.</p>
 
930
<p>Access functions:</p>
 
931
<ul>
 
932
<li><div class="fn"/><b>int x () const</b></li>
 
933
</ul>
 
934
<p>See also <a href="qwidget.html#frameGeometry-prop">frameGeometry</a>, <a href="qwidget.html#y-prop">y</a>, and <a href="qwidget.html#pos-prop">pos</a>.</p>
 
935
<h3 class="fn"><a name="y-prop"></a>y : const int</h3>
 
936
<p>This property holds the y coordinate of the widget relative to its parent and including any window frame.</p>
 
937
<p>See the <a href="geometry.html">Window Geometry documentation</a> for an overview of window geometry.</p>
 
938
<p>Access functions:</p>
 
939
<ul>
 
940
<li><div class="fn"/><b>int y () const</b></li>
 
941
</ul>
 
942
<p>See also <a href="qwidget.html#frameGeometry-prop">frameGeometry</a>, <a href="qwidget.html#x-prop">x</a>, and <a href="qwidget.html#pos-prop">pos</a>.</p>
 
943
<hr />
 
944
<h2>Member Function Documentation</h2>
 
945
<h3 class="fn"><a name="QWidget"></a>QWidget::QWidget ( QWidget * <i>parent</i> = 0, <a href="qt.html#WFlags-typedef">Qt::WFlags</a> <i>f</i> = 0 )</h3>
 
946
<p>Constructs a widget which is a child of <i>parent</i>, with widget flags set to <i>f</i>.</p>
 
947
<p>If <i>parent</i> is 0, the new widget becomes a window. If <i>parent</i> is another widget, this widget becomes a child window inside <i>parent</i>. The new widget is deleted when its <i>parent</i> is deleted.</p>
 
948
<p>The widget flags argument, <i>f</i>, is normally 0, but it can be set to customize the frame of a window (i.e. <i>parent</i> must be 0). To customize the frame, use a value composed from the bitwise OR of any of the <a href="qt.html#WindowType-enum">window flags</a>.</p>
 
949
<p>If you add a child widget to an already visible widget you must explicitly show the child to make it visible.</p>
 
950
<p>Note that the <a href="winsystem.html#x11">X11</a> version of Qt may not be able to deliver all combinations of style flags on all systems. This is because on <a href="winsystem.html#x11">X11</a>, Qt can only ask the window manager, and the window manager can override the application's settings. On Windows, Qt can set whatever flags you want.</p>
 
951
<h3 class="fn"><a name="dtor.QWidget"></a>QWidget::~QWidget ()</h3>
 
952
<p>Destroys the widget.</p>
 
953
<p>All this widget's children are deleted first. The application exits if this widget is the main widget.</p>
 
954
<h3 class="fn"><a name="actionEvent"></a>void QWidget::actionEvent ( <a href="qactionevent.html">QActionEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
955
<p>This event handler is called with the given <i>event</i> whenever the widget's actions are changed.</p>
 
956
<p>See also <a href="qwidget.html#addAction">addAction</a>(), <a href="qwidget.html#insertAction">insertAction</a>(), <a href="qwidget.html#removeAction">removeAction</a>(), <a href="qwidget.html#actions">actions</a>(), and <a href="qactionevent.html">QActionEvent</a>.</p>
 
957
<h3 class="fn"><a name="actions"></a><a href="qlist.html">QList</a>&lt;<a href="qaction.html">QAction</a> *&gt; QWidget::actions () const</h3>
 
958
<p>Returns the (possibly empty) list of this widget's actions.</p>
 
959
<h3 class="fn"><a name="activateWindow"></a>void QWidget::activateWindow ()</h3>
 
960
<p>Sets the top-level widget containing this widget to be the active window.</p>
 
961
<p>An active window is a visible top-level window that has the keyboard input focus.</p>
 
962
<p>This function performs the same operation as clicking the mouse on the title bar of a top-level window. On <a href="winsystem.html#x11">X11</a>, the result depends on the Window Manager. If you want to ensure that the window is stacked on top as well you should also call <a href="qwidget.html#raise">raise</a>(). Note that the window must be visible, otherwise activateWindow() has no effect.</p>
 
963
<p>On Windows, if you are calling this when the application is not currently the active one then it will not make it the active window. It will flash the task bar entry blue to indicate that the window has done something. This is because Microsoft do not allow an application to interrupt what the user is currently doing in another application.</p>
 
964
<p>See also <a href="qwidget.html#isActiveWindow-prop">isActiveWindow</a>(), <a href="qwidget.html#window">window</a>(), and <a href="qwidget.html#show">show</a>().</p>
 
965
<h3 class="fn"><a name="addAction"></a>void QWidget::addAction ( <a href="qaction.html">QAction</a> * <i>action</i> )</h3>
 
966
<p>Appends the action <i>action</i> to this widget's list of actions.</p>
 
967
<p>All QWidgets have list of QActions, 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="qwidget.html#actions">actions</a>()) is to create a context <a href="qmenu.html">QMenu</a>.</p>
 
968
<p>See also <a href="qwidget.html#removeAction">removeAction</a>() and <a href="qmenu.html">QMenu</a>.</p>
 
969
<h3 class="fn"><a name="addActions"></a>void QWidget::addActions ( <a href="qlist.html">QList</a>&lt;<a href="qaction.html">QAction</a> *&gt; <i>actions</i> )</h3>
 
970
<p>Appends the actions <i>actions</i> to this widget's list of actions.</p>
 
971
<p>See also <a href="qwidget.html#removeAction">removeAction</a>(), <a href="qmenu.html">QMenu</a>, and <a href="qwidget.html#addAction">addAction</a>().</p>
 
972
<h3 class="fn"><a name="adjustSize"></a>void QWidget::adjustSize ()</h3>
 
973
<p>Adjusts the size of the widget to fit the contents.</p>
 
974
<p>Uses <a href="qwidget.html#sizeHint-prop">sizeHint</a>() if valid (i.e if the size hint's width and height are &gt;= 0), otherwise sets the size to the children rectangle (the union of all child widget geometries). For toplevel widgets, the function also takes the screen size into account.</p>
 
975
<p>See also <a href="qwidget.html#sizeHint-prop">sizeHint</a>() and <a href="qwidget.html#childrenRect-prop">childrenRect</a>().</p>
 
976
<h3 class="fn"><a name="backgroundRole"></a><a href="qpalette.html#ColorRole-enum">QPalette::ColorRole</a> QWidget::backgroundRole () const</h3>
 
977
<p>Returns the background role of the widget.</p>
 
978
<p>The background role defines the brush from the widget's <a href="qwidget.html#palette-prop">palette</a> that is used to render the background.</p>
 
979
<p>If no explicit background role is set, the widget inherts its parent widget's background role.</p>
 
980
<p>See also <a href="qwidget.html#setBackgroundRole">setBackgroundRole</a>() and <a href="qwidget.html#foregroundRole">foregroundRole</a>().</p>
 
981
<h3 class="fn"><a name="changeEvent"></a>void QWidget::changeEvent ( <a href="qevent.html">QEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
982
<p>This event handler can be reimplemented to handle state changes.</p>
 
983
<p>The state being changed in this event can be retrieved through event <i>e</i>.</p>
 
984
<h3 class="fn"><a name="childAt"></a>QWidget * QWidget::childAt ( int <i>x</i>, int <i>y</i> ) const</h3>
 
985
<p>Returns the visible child widget at the position (<i>x</i>, <i>y</i>) in the widget's coordinate system. If there is no visible child widget at the specified position, the function returns 0.</p>
 
986
<h3 class="fn"><a name="childAt-4"></a>QWidget * QWidget::childAt ( const <a href="qpoint.html">QPoint</a> &amp; <i>p</i> ) const</h3>
 
987
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
988
<p>Returns the visible child widget at point <i>p</i> in the widget's own coordinate system.</p>
 
989
<h3 class="fn"><a name="clearFocus"></a>void QWidget::clearFocus ()</h3>
 
990
<p>Takes keyboard input focus from the widget.</p>
 
991
<p>If the widget has active focus, a <a href="qwidget.html#focusOutEvent">focus out event</a> is sent to this widget to tell it that it is about to lose the focus.</p>
 
992
<p>This widget must enable focus setting in order to get the keyboard input focus, i.e. it must call <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>().</p>
 
993
<p>See also <a href="qwidget.html#focus-prop">hasFocus</a>(), <a href="qwidget.html#setFocus">setFocus</a>(), <a href="qwidget.html#focusInEvent">focusInEvent</a>(), <a href="qwidget.html#focusOutEvent">focusOutEvent</a>(), <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>(), and <a href="qapplication.html#focusWidget">QApplication::focusWidget</a>().</p>
 
994
<h3 class="fn"><a name="clearMask"></a>void QWidget::clearMask ()</h3>
 
995
<p>Removes any mask set by <a href="qwidget.html#setMask">setMask</a>().</p>
 
996
<p>See also <a href="qwidget.html#setMask">setMask</a>().</p>
 
997
<h3 class="fn"><a name="close"></a>bool QWidget::close ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
998
<p>Closes this widget. Returns true if the widget was closed; otherwise returns false.</p>
 
999
<p>First it sends the widget a <a href="qcloseevent.html">QCloseEvent</a>. The widget is <a href="qwidget.html#hide">hidden</a> if it <a href="qevent.html#accept">accepts</a> the close event. If it <a href="qevent.html#ignore">ignores</a> the event, nothing happens. The default implementation of <a href="qwidget.html#closeEvent">QWidget::closeEvent</a>() accepts the close event.</p>
 
1000
<p>If the widget has the <tt>Qt::WA_DeleteOnClose</tt> flag, the widget is also deleted. A close events is delivered to the widget no matter if the widget is visible or not.</p>
 
1001
<p>The <a href="qapplication.html#lastWindowClosed">QApplication::lastWindowClosed</a>() signal is emitted when the last visible top level widget with the <a href="qt.html#WidgetAttribute-enum">Qt::WA_QuitOnClose</a> attribute set is closed. By default this attribute is set for all widgets except transient top level widgets such as splash screens, popup menus, and dialogs.</p>
 
1002
<h3 class="fn"><a name="closeEvent"></a>void QWidget::closeEvent ( <a href="qcloseevent.html">QCloseEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1003
<p>This event handler, for event <i>e</i>, can be reimplemented in a subclass to receive widget close events.</p>
 
1004
<p>See also <a href="qwidget.html#event">event</a>(), <a href="qwidget.html#hide">hide</a>(), <a href="qwidget.html#close">close</a>(), and <a href="qcloseevent.html">QCloseEvent</a>.</p>
 
1005
<h3 class="fn"><a name="contentsRect"></a><a href="qrect.html">QRect</a> QWidget::contentsRect () const</h3>
 
1006
<p>Returns the area inside the widget's margins.</p>
 
1007
<p>See also <a href="qwidget.html#setContentsMargins">setContentsMargins</a>() and <a href="qwidget.html#getContentsMargins">getContentsMargins</a>().</p>
 
1008
<h3 class="fn"><a name="contextMenuEvent"></a>void QWidget::contextMenuEvent ( <a href="qcontextmenuevent.html">QContextMenuEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1009
<p>This event handler, for event <i>e</i>, can be reimplemented in a subclass to receive widget context menu events.</p>
 
1010
<p>The handler is called when the widget's <a href="qwidget.html#contextMenuPolicy-prop">contextMenuPolicy</a> is <a href="qt.html#ContextMenuPolicy-enum">Qt::DefaultContextMenu</a>.</p>
 
1011
<p>The default implementation calls e-&gt;ignore(), which rejects the context event. See the <a href="qcontextmenuevent.html">QContextMenuEvent</a> documentation for more details.</p>
 
1012
<p>See also <a href="qwidget.html#event">event</a>(), <a href="qcontextmenuevent.html">QContextMenuEvent</a>, and <a href="qwidget.html#customContextMenuRequested">customContextMenuRequested</a>().</p>
 
1013
<h3 class="fn"><a name="create"></a>void QWidget::create ( WId <i>window</i> = 0, bool <i>initializeWindow</i> = true, bool <i>destroyOldWindow</i> = true )&nbsp;&nbsp;<tt> [protected]</tt></h3>
 
1014
<p>Creates a new widget window if <i>window</i> is 0, otherwise sets the widget's window to <i>window</i>.</p>
 
1015
<p>Initializes the window (sets the geometry etc.) if <i>initializeWindow</i> is true. If <i>initializeWindow</i> is false, no initialization is performed. This parameter only makes sense if <i>window</i> is a valid window.</p>
 
1016
<p>Destroys the old window if <i>destroyOldWindow</i> is true. If <i>destroyOldWindow</i> is false, you are responsible for destroying the window yourself (using platform native code).</p>
 
1017
<p>The <a href="qwidget.html">QWidget</a> constructor calls create(0,true,true) to create a window for this widget.</p>
 
1018
<h3 class="fn"><a name="customContextMenuRequested"></a>void QWidget::customContextMenuRequested ( const <a href="qpoint.html">QPoint</a> &amp; <i>pos</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
1019
<p>This signal is emitted when the widget's <a href="qwidget.html#contextMenuPolicy-prop">contextMenuPolicy</a> is <a href="qt.html#ContextMenuPolicy-enum">Qt::CustomContextMenu</a>, and the user has requested a context menu on the widget. The position <i>pos</i> is the position of the request in widget coordinates.</p>
 
1020
<p>See also <a href="qwidget.html#mapToGlobal">mapToGlobal</a>(), <a href="qmenu.html">QMenu</a>, and <a href="qwidget.html#contextMenuPolicy-prop">contextMenuPolicy</a>.</p>
 
1021
<h3 class="fn"><a name="destroy"></a>void QWidget::destroy ( bool <i>destroyWindow</i> = true, bool <i>destroySubWindows</i> = true )&nbsp;&nbsp;<tt> [protected]</tt></h3>
 
1022
<p>Frees up window system resources. Destroys the widget window if <i>destroyWindow</i> is true.</p>
 
1023
<p>destroy() calls itself recursively for all the child widgets, passing <i>destroySubWindows</i> for the <i>destroyWindow</i> parameter. To have more control over destruction of subwidgets, destroy subwidgets selectively first.</p>
 
1024
<p>This function is usually called from the <a href="qwidget.html">QWidget</a> destructor.</p>
 
1025
<h3 class="fn"><a name="dragEnterEvent"></a>void QWidget::dragEnterEvent ( <a href="qdragenterevent.html">QDragEnterEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1026
<p>This event handler is called when a drag is in progress and the mouse enters this widget. The event is passed in the <i>event</i> parameter.</p>
 
1027
<p>See the <a href="dnd.html">Drag-and-drop documentation</a> for an overview of how to provide drag-and-drop in your application.</p>
 
1028
<p>See also <a href="porting4.html#qtextdrag">QTextDrag</a>, <a href="porting4.html#qimagedrag">QImageDrag</a>, and <a href="qdragenterevent.html">QDragEnterEvent</a>.</p>
 
1029
<h3 class="fn"><a name="dragLeaveEvent"></a>void QWidget::dragLeaveEvent ( <a href="qdragleaveevent.html">QDragLeaveEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1030
<p>This event handler is called when a drag is in progress and the mouse leaves this widget. The event is passed in the <i>event</i> parameter.</p>
 
1031
<p>See the <a href="dnd.html">Drag-and-drop documentation</a> for an overview of how to provide drag-and-drop in your application.</p>
 
1032
<p>See also <a href="porting4.html#qtextdrag">QTextDrag</a>, <a href="porting4.html#qimagedrag">QImageDrag</a>, and <a href="qdragleaveevent.html">QDragLeaveEvent</a>.</p>
 
1033
<h3 class="fn"><a name="dragMoveEvent"></a>void QWidget::dragMoveEvent ( <a href="qdragmoveevent.html">QDragMoveEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1034
<p>This event handler is called if a drag is in progress, and when any of the following conditions occurs: the cursor enters this widget, the cursor moves within this widget, or a modifier key is pressed on the keyboard while this widget has the focus. The event is passed in the <i>event</i> parameter.</p>
 
1035
<p>See the <a href="dnd.html">Drag-and-drop documentation</a> for an overview of how to provide drag-and-drop in your application.</p>
 
1036
<p>See also <a href="porting4.html#qtextdrag">QTextDrag</a>, <a href="porting4.html#qimagedrag">QImageDrag</a>, and <a href="qdragmoveevent.html">QDragMoveEvent</a>.</p>
 
1037
<h3 class="fn"><a name="dropEvent"></a>void QWidget::dropEvent ( <a href="qdropevent.html">QDropEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1038
<p>This event handler is called when the drag is dropped on this widget which are passed in the <i>event</i> parameter.</p>
 
1039
<p>See the <a href="dnd.html">Drag-and-drop documentation</a> for an overview of how to provide drag-and-drop in your application.</p>
 
1040
<p>See also <a href="porting4.html#qtextdrag">QTextDrag</a>, <a href="porting4.html#qimagedrag">QImageDrag</a>, and <a href="qdropevent.html">QDropEvent</a>.</p>
 
1041
<h3 class="fn"><a name="ensurePolished"></a>void QWidget::ensurePolished () const</h3>
 
1042
<p>Ensures that the widget has been polished by <a href="qstyle.html">QStyle</a> (i.e., has a proper font and palette).</p>
 
1043
<p><a href="qwidget.html">QWidget</a> calls this function after it has been fully constructed but before it is shown the very first time. You can call this function if you want to ensure that the widget is polished before doing an operation (e.g., the correct font size might be needed in the widget's <a href="qwidget.html#sizeHint-prop">sizeHint</a>() reimplementation).</p>
 
1044
<p>Polishing is useful for final initialization that must happen after all constructors (from base classes as well as from subclasses) have been called.</p>
 
1045
<p>If you need to change some settings when a widget is polished, reimplement <a href="qwidget.html#event">event</a>() and handle the <a href="qevent.html#Type-enum">QEvent::Polish</a> event type.</p>
 
1046
<p>Note: The function is declared const so that it can be called from other const functions (e.g., <a href="qwidget.html#sizeHint-prop">sizeHint</a>()).</p>
 
1047
<p>See also <a href="qwidget.html#event">event</a>().</p>
 
1048
<h3 class="fn"><a name="enterEvent"></a>void QWidget::enterEvent ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1049
<p>This event handler can be reimplemented in a subclass to receive widget enter events which are passed in the <i>event</i> parameter.</p>
 
1050
<p>An event is sent to the widget when the mouse cursor enters the widget.</p>
 
1051
<p>See also <a href="qwidget.html#leaveEvent">leaveEvent</a>(), <a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>(), and <a href="qwidget.html#event">event</a>().</p>
 
1052
<h3 class="fn"><a name="event"></a>bool QWidget::event ( <a href="qevent.html">QEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1053
<p>This is the main event handler; it handles event <i>e</i>. You can reimplement this function in a subclass, but we recommend using one of the specialized event handlers instead.</p>
 
1054
<p>Key press and release events are treated differently from other events. event() checks for Tab and Shift+Tab and tries to move the focus appropriately. If there is no widget to move the focus to (or the key press is not Tab or Shift+Tab), event() calls <a href="qwidget.html#keyPressEvent">keyPressEvent</a>().</p>
 
1055
<p>Mouse and tablet event handling is also slightly special: only when the widget is <a href="qwidget.html#enabled-prop">enabled</a>, event() will call the specialized handlers such as <a href="qwidget.html#mousePressEvent">mousePressEvent</a>(); otherwise it will discard the event.</p>
 
1056
<p>This function returns true if the event was recognized, otherwise it returns false. If the recognized event was accepted (see <a href="qevent.html#accepted-prop">QEvent::accepted</a>), any further processing such as event propagation to the parent widget stops.</p>
 
1057
<p>Reimplemented from <a href="qobject.html#event">QObject</a>.</p>
 
1058
<p>See also <a href="qwidget.html#closeEvent">closeEvent</a>(), <a href="qwidget.html#focusInEvent">focusInEvent</a>(), <a href="qwidget.html#focusOutEvent">focusOutEvent</a>(), <a href="qwidget.html#enterEvent">enterEvent</a>(), <a href="qwidget.html#keyPressEvent">keyPressEvent</a>(), <a href="qwidget.html#keyReleaseEvent">keyReleaseEvent</a>(), <a href="qwidget.html#leaveEvent">leaveEvent</a>(), <a href="qwidget.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a>(), <a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>(), <a href="qwidget.html#mousePressEvent">mousePressEvent</a>(), <a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>(), <a href="qwidget.html#moveEvent">moveEvent</a>(), <a href="qwidget.html#paintEvent">paintEvent</a>(), <a href="qwidget.html#resizeEvent">resizeEvent</a>(), <a href="qobject.html#event">QObject::event</a>(), and <a href="qobject.html#timerEvent">QObject::timerEvent</a>().</p>
 
1059
<h3 class="fn"><a name="find"></a>QWidget * QWidget::find ( WId <i>id</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
 
1060
<p>Returns a pointer to the widget with window identifer/handle <i>id</i>.</p>
 
1061
<p>The window identifier type depends on the underlying window system, see <tt>qwindowdefs.h</tt> for the actual definition. If there is no widget with this identifier, 0 is returned.</p>
 
1062
<h3 class="fn"><a name="focusInEvent"></a>void QWidget::focusInEvent ( <a href="qfocusevent.html">QFocusEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1063
<p>This event handler can be reimplemented in a subclass to receive keyboard focus events (focus received) for the widget. The event is passed in the <i>event</i> parameter</p>
 
1064
<p>A widget normally must <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>() to something other than <tt>Qt::NoFocus</tt> in order to receive focus events. (Note that the application programmer can call <a href="qwidget.html#setFocus">setFocus</a>() on any widget, even those that do not normally accept focus.)</p>
 
1065
<p>The default implementation updates the widget (except for windows that do not specify a <a href="qwidget.html#focusPolicy-prop">focusPolicy</a>()).</p>
 
1066
<p>See also <a href="qwidget.html#focusOutEvent">focusOutEvent</a>(), <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>(), <a href="qwidget.html#keyPressEvent">keyPressEvent</a>(), <a href="qwidget.html#keyReleaseEvent">keyReleaseEvent</a>(), <a href="qwidget.html#event">event</a>(), and <a href="qfocusevent.html">QFocusEvent</a>.</p>
 
1067
<h3 class="fn"><a name="focusNextChild"></a>bool QWidget::focusNextChild ()&nbsp;&nbsp;<tt> [protected]</tt></h3>
 
1068
<p>Finds a new widget to give the keyboard focus to, as appropriate for <b>Tab</b>, and returns true if it can find a new widget, or false if it can't.</p>
 
1069
<p>This is the same as focusNextPrevChild(true).</p>
 
1070
<p>See also <a href="qwidget.html#focusPreviousChild">focusPreviousChild</a>().</p>
 
1071
<h3 class="fn"><a name="focusNextPrevChild"></a>bool QWidget::focusNextPrevChild ( bool <i>next</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1072
<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, or false if it can't.</p>
 
1073
<p>If <i>next</i> is true, this function searches &quot;forwards&quot;, if <i>next</i> is false, it searches &quot;backwards&quot;.</p>
 
1074
<p>Sometimes, you will want to reimplement this function. For example, a web browser might reimplement it to move its &quot;current active link&quot; forward or backward, and call focusNextPrevChild() only when it reaches the last or first link on the &quot;page&quot;.</p>
 
1075
<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 thus gain control of focus traversal for all child widgets.</p>
 
1076
<p>See also <a href="qwidget.html#focusNextChild">focusNextChild</a>() and <a href="qwidget.html#focusPreviousChild">focusPreviousChild</a>().</p>
 
1077
<h3 class="fn"><a name="focusOutEvent"></a>void QWidget::focusOutEvent ( <a href="qfocusevent.html">QFocusEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1078
<p>This event handler can be reimplemented in a subclass to receive keyboard focus events (focus lost) for the widget. The events is passed in the <i>event</i> parameter.</p>
 
1079
<p>A widget normally must <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>() to something other than <tt>Qt::NoFocus</tt> in order to receive focus events. (Note that the application programmer can call <a href="qwidget.html#setFocus">setFocus</a>() on any widget, even those that do not normally accept focus.)</p>
 
1080
<p>The default implementation updates the widget (except for windows that do not specify a <a href="qwidget.html#focusPolicy-prop">focusPolicy</a>()).</p>
 
1081
<p>See also <a href="qwidget.html#focusInEvent">focusInEvent</a>(), <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>(), <a href="qwidget.html#keyPressEvent">keyPressEvent</a>(), <a href="qwidget.html#keyReleaseEvent">keyReleaseEvent</a>(), <a href="qwidget.html#event">event</a>(), and <a href="qfocusevent.html">QFocusEvent</a>.</p>
 
1082
<h3 class="fn"><a name="focusPreviousChild"></a>bool QWidget::focusPreviousChild ()&nbsp;&nbsp;<tt> [protected]</tt></h3>
 
1083
<p>Finds a new widget to give the keyboard focus to, as appropriate for <b>Shift+Tab</b>, and returns true if it can find a new widget, or false if it can't.</p>
 
1084
<p>This is the same as focusNextPrevChild(false).</p>
 
1085
<p>See also <a href="qwidget.html#focusNextChild">focusNextChild</a>().</p>
 
1086
<h3 class="fn"><a name="focusProxy"></a>QWidget * QWidget::focusProxy () const</h3>
 
1087
<p>Returns the focus proxy, or 0 if there is no focus proxy.</p>
 
1088
<p>See also <a href="qwidget.html#setFocusProxy">setFocusProxy</a>().</p>
 
1089
<h3 class="fn"><a name="focusWidget"></a>QWidget * QWidget::focusWidget () const</h3>
 
1090
<p>Returns the last child of this widget that setFocus had been called on. For top level widgets this is the widget that will get focus in case this window gets activated</p>
 
1091
<p>This is not the same as <a href="qapplication.html#focusWidget">QApplication::focusWidget</a>(), which returns the focus widget in the currently active window.</p>
 
1092
<h3 class="fn"><a name="fontInfo"></a><a href="qfontinfo.html">QFontInfo</a> QWidget::fontInfo () const</h3>
 
1093
<p>Returns the font info for the widget's current font. Equivalent to QFontInto(widget-&gt;<a href="qwidget.html#font-prop">font</a>()).</p>
 
1094
<p>See also <a href="qwidget.html#font-prop">font</a>(), <a href="qwidget.html#fontMetrics">fontMetrics</a>(), and <a href="qwidget.html#font-prop">setFont</a>().</p>
 
1095
<h3 class="fn"><a name="fontMetrics"></a><a href="qfontmetrics.html">QFontMetrics</a> QWidget::fontMetrics () const</h3>
 
1096
<p>Returns the font metrics for the widget's current font. Equivalent to <a href="qfontmetrics.html">QFontMetrics</a>(widget-&gt;<a href="qwidget.html#font-prop">font</a>()).</p>
 
1097
<p>See also <a href="qwidget.html#font-prop">font</a>(), <a href="qwidget.html#fontInfo">fontInfo</a>(), and <a href="qwidget.html#font-prop">setFont</a>().</p>
 
1098
<h3 class="fn"><a name="foregroundRole"></a><a href="qpalette.html#ColorRole-enum">QPalette::ColorRole</a> QWidget::foregroundRole () const</h3>
 
1099
<p>Returns the foreground role.</p>
 
1100
<p>The foreground role defines the color from the widget's <a href="qwidget.html#palette-prop">palette</a> that is used to draw the foreground.</p>
 
1101
<p>If no explicit foreground role is set, the function returns a role that contrasts with the background role.</p>
 
1102
<p>See also <a href="qwidget.html#setForegroundRole">setForegroundRole</a>() and <a href="qwidget.html#backgroundRole">backgroundRole</a>().</p>
 
1103
<h3 class="fn"><a name="getContentsMargins"></a>void QWidget::getContentsMargins ( int * <i>left</i>, int * <i>top</i>, int * <i>right</i>, int * <i>bottom</i> ) const</h3>
 
1104
<p>Returns the widget's contents margins for <i>left</i>, <i>top</i>, <i>right</i>, and <i>bottom</i>.</p>
 
1105
<p>See also <a href="qwidget.html#setContentsMargins">setContentsMargins</a>() and <a href="qwidget.html#contentsRect">contentsRect</a>().</p>
 
1106
<h3 class="fn"><a name="getDC"></a>HDC QWidget::getDC () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
1107
<p>Returns the window system handle of the widget, for low-level access. Using this function is not portable.</p>
 
1108
<p>An HDC aquired with getDC() has to be released with <a href="qwidget.html#releaseDC">releaseDC</a>().</p>
 
1109
<p><b>Warning:</b> Using this function is not portable.</p>
 
1110
<p>Reimplemented from <a href="qpaintdevice.html#getDC">QPaintDevice</a>.</p>
 
1111
<h3 class="fn"><a name="grabKeyboard"></a>void QWidget::grabKeyboard ()</h3>
 
1112
<p>Grabs the keyboard input.</p>
 
1113
<p>This widget reveives all keyboard events until <a href="qwidget.html#releaseKeyboard">releaseKeyboard</a>() is called; other widgets get no keyboard events at all. Mouse events are not affected. Use <a href="qwidget.html#grabMouse">grabMouse</a>() if you want to grab that.</p>
 
1114
<p>The focus widget is not affected, except that it doesn't receive any keyboard events. <a href="qwidget.html#setFocus">setFocus</a>() moves the focus as usual, but the new focus widget receives keyboard events only after <a href="qwidget.html#releaseKeyboard">releaseKeyboard</a>() is called.</p>
 
1115
<p>If a different widget is currently grabbing keyboard input, that widget's grab is released first.</p>
 
1116
<p>See also <a href="qwidget.html#releaseKeyboard">releaseKeyboard</a>(), <a href="qwidget.html#grabMouse">grabMouse</a>(), <a href="qwidget.html#releaseMouse">releaseMouse</a>(), and <a href="qwidget.html#focusWidget">focusWidget</a>().</p>
 
1117
<h3 class="fn"><a name="grabMouse"></a>void QWidget::grabMouse ()</h3>
 
1118
<p>Grabs the mouse input.</p>
 
1119
<p>This widget receives all mouse events until <a href="qwidget.html#releaseMouse">releaseMouse</a>() is called; other widgets get no mouse events at all. Keyboard events are not affected. Use <a href="qwidget.html#grabKeyboard">grabKeyboard</a>() if you want to grab that.</p>
 
1120
<p><b>Warning:</b> Bugs in mouse-grabbing applications very often lock the terminal. Use this function with extreme caution, and consider using the <tt>-nograb</tt> command line option while debugging.</p>
 
1121
<p>It is almost never necessary to grab the mouse when using Qt, as Qt grabs and releases it sensibly. In particular, Qt grabs the mouse when a mouse button is pressed and keeps it until the last button is released.</p>
 
1122
<p>Note that only visible widgets can grab mouse input. If <a href="qwidget.html#visible-prop">isVisible</a>() returns false for a widget, that widget cannot call grabMouse().</p>
 
1123
<p><a href="qwidget.html#focusWidget">focusWidget</a>()</p>
 
1124
<p>See also <a href="qwidget.html#releaseMouse">releaseMouse</a>(), <a href="qwidget.html#grabKeyboard">grabKeyboard</a>(), <a href="qwidget.html#releaseKeyboard">releaseKeyboard</a>(), and <a href="qwidget.html#grabKeyboard">grabKeyboard</a>().</p>
 
1125
<h3 class="fn"><a name="grabMouse-2"></a>void QWidget::grabMouse ( const <a href="qcursor.html">QCursor</a> &amp; <i>cursor</i> )</h3>
 
1126
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
1127
<p>Grabs the mouse input and changes the cursor shape.</p>
 
1128
<p>The cursor will assume shape <i>cursor</i> (for as long as the mouse focus is grabbed) and this widget will be the only one to receive mouse events until <a href="qwidget.html#releaseMouse">releaseMouse</a>() is called().</p>
 
1129
<p><b>Warning:</b> Grabbing the mouse might lock the terminal.</p>
 
1130
<p>See also <a href="qwidget.html#releaseMouse">releaseMouse</a>(), <a href="qwidget.html#grabKeyboard">grabKeyboard</a>(), <a href="qwidget.html#releaseKeyboard">releaseKeyboard</a>(), and <a href="qwidget.html#cursor-prop">setCursor</a>().</p>
 
1131
<h3 class="fn"><a name="grabShortcut"></a>int QWidget::grabShortcut ( const <a href="qkeysequence.html">QKeySequence</a> &amp; <i>key</i>, <a href="qt.html#ShortcutContext-enum">Qt::ShortcutContext</a> <i>context</i> = Qt::WindowShortcut )</h3>
 
1132
<p>Adds a shortcut to Qt's shortcut system that watches for the given <i>key</i> sequence in the given <i>context</i>. If the <i>context</i> is not <tt>OnApplication</tt>, the shortcut is local to this widget; otherwise it applies to the application as a whole.</p>
 
1133
<p>If the same <i>key</i> sequence has been grabbed by several widgets, when the <i>key</i> sequence 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>
 
1134
<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>
 
1135
<p>See also <a href="qwidget.html#releaseShortcut">releaseShortcut</a>() and <a href="qwidget.html#setShortcutEnabled">setShortcutEnabled</a>().</p>
 
1136
<h3 class="fn"><a name="heightForWidth"></a>int QWidget::heightForWidth ( int <i>w</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
1137
<p>Returns the preferred height for this widget, given the width <i>w</i>.</p>
 
1138
<p>If this widget has a layout, the default implementation returns the layout's preferred height. if there is no layout, the default implementation returns -1 indicating that the preferred height does not depend on the width.</p>
 
1139
<h3 class="fn"><a name="hide"></a>void QWidget::hide ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
1140
<p>Hides the widget. This function is equivalent to setVisible(false).</p>
 
1141
<p>See also <a href="qwidget.html#hideEvent">hideEvent</a>(), <a href="qwidget.html#isHidden">isHidden</a>(), <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#visible-prop">setVisible</a>(), <a href="qwidget.html#visible-prop">isVisible</a>(), and <a href="qwidget.html#close">close</a>().</p>
 
1142
<h3 class="fn"><a name="hideEvent"></a>void QWidget::hideEvent ( <a href="qhideevent.html">QHideEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1143
<p>This event handler can be reimplemented in a subclass to receive widget hide events. The event is passed in the <i>event</i> parameter.</p>
 
1144
<p>Hide events are sent to widgets immediately after they have been hidden.</p>
 
1145
<p>Note: A widget receives spontaneous show and hide events when its mapping status is changed by the window system, e.g. a spontaneous hide event when the user minimizes the window, and a spontaneous show event when the window is restored again. After receiving a spontaneous hide event, a widget is still considered visible in the sense of <a href="qwidget.html#visible-prop">isVisible</a>().</p>
 
1146
<p>See also <a href="qwidget.html#visible-prop">visible</a>, <a href="qwidget.html#event">event</a>(), and <a href="qhideevent.html">QHideEvent</a>.</p>
 
1147
<h3 class="fn"><a name="inputContext"></a><a href="qinputcontext.html">QInputContext</a> * QWidget::inputContext ()</h3>
 
1148
<p>This function returns the <a href="qinputcontext.html">QInputContext</a> for this widget. By default the input context is inherited from the widgets parent. For toplevels it is inherited from <a href="qapplication.html">QApplication</a>.</p>
 
1149
<p>You can override this and set a special input context for this widget by using the <a href="qwidget.html#setInputContext">setInputContext</a>() method.</p>
 
1150
<p>See also <a href="qwidget.html#setInputContext">setInputContext</a>().</p>
 
1151
<h3 class="fn"><a name="inputMethodEvent"></a>void QWidget::inputMethodEvent ( <a href="qinputmethodevent.html">QInputMethodEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1152
<p>This event handler, for event <i>e</i>, can be reimplemented in a subclass to receive Input Method composition events. This handler is called when the state of the input method changes.</p>
 
1153
<p>The default implementation calls e-&gt;ignore(), which rejects the Input Method event. See the <a href="qinputmethodevent.html">QInputMethodEvent</a> documentation for more details.</p>
 
1154
<p>See also <a href="qwidget.html#event">event</a>() and <a href="qinputmethodevent.html">QInputMethodEvent</a>.</p>
 
1155
<h3 class="fn"><a name="inputMethodQuery"></a><a href="qvariant.html">QVariant</a> QWidget::inputMethodQuery ( <a href="qt.html#InputMethodQuery-enum">Qt::InputMethodQuery</a> <i>query</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
1156
<p>This method is only relevant for input widgets. It is used by the input method to query a set of properties of the widget to be able to support complex input method operations as support for surrounding text and reconversions.</p>
 
1157
<p><i>query</i> specifies which property is queried.</p>
 
1158
<p>See also <a href="qwidget.html#inputMethodEvent">inputMethodEvent</a>(), <a href="qinputmethodevent.html">QInputMethodEvent</a>, and <a href="qinputcontext.html">QInputContext</a>.</p>
 
1159
<h3 class="fn"><a name="insertAction"></a>void QWidget::insertAction ( <a href="qaction.html">QAction</a> * <i>before</i>, <a href="qaction.html">QAction</a> * <i>action</i> )</h3>
 
1160
<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>
 
1161
<p>See also <a href="qwidget.html#addAction">addAction</a>().</p>
 
1162
<h3 class="fn"><a name="insertActions"></a>void QWidget::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>
 
1163
<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>
 
1164
<p>See also <a href="qwidget.html#removeAction">removeAction</a>(), <a href="qmenu.html">QMenu</a>, and <a href="qwidget.html#insertAction">insertAction</a>().</p>
 
1165
<h3 class="fn"><a name="isAncestorOf"></a>bool QWidget::isAncestorOf ( const QWidget * <i>child</i> ) const</h3>
 
1166
<p>Returns true if this widget is a parent, (or grandparent and so on to any level), of the given <i>child</i>, and both widgets are within the same window; otherwise returns false.</p>
 
1167
<h3 class="fn"><a name="isEnabledTo"></a>bool QWidget::isEnabledTo ( QWidget * <i>ancestor</i> ) const</h3>
 
1168
<p>Returns true if this widget would become enabled if <i>ancestor</i> is enabled; otherwise returns false.</p>
 
1169
<p>This is the case if neither the widget itself nor every parent up to but excluding <i>ancestor</i> has been explicitly disabled.</p>
 
1170
<p>isEnabledTo(0) is equivalent to <a href="qwidget.html#enabled-prop">isEnabled</a>().</p>
 
1171
<p>See also <a href="qwidget.html#enabled-prop">setEnabled</a>() and <a href="qwidget.html#enabled-prop">enabled</a>.</p>
 
1172
<h3 class="fn"><a name="isHidden"></a>bool QWidget::isHidden () const</h3>
 
1173
<p>Returns true if the widget is hidden, otherwise returns false.</p>
 
1174
<p>A hidden widget will only become visible when <a href="qwidget.html#show">show</a>() is called on it. It will not be automatically shown when the parent is shown.</p>
 
1175
<p>To check visiblity, use !<a href="qwidget.html#visible-prop">isVisible</a>() instead (notice the exclamation mark).</p>
 
1176
<p>isHidden() implies !<a href="qwidget.html#visible-prop">isVisible</a>(), but a widget can be not visible and not hidden at the same time. This is the case for widgets that are children of widgets that are not visible.</p>
 
1177
<p>Widgets are hidden if they were created as independent windows or as children of visible widgets, or if <a href="qwidget.html#hide">hide</a>() or setVisible(false) was called.</p>
 
1178
<h3 class="fn"><a name="isVisibleTo"></a>bool QWidget::isVisibleTo ( QWidget * <i>ancestor</i> ) const</h3>
 
1179
<p>Returns true if this widget would become visible if <i>ancestor</i> is shown; otherwise returns false.</p>
 
1180
<p>The true case occurs if neither the widget itself nor any parent up to but excluding <i>ancestor</i> has been explicitly hidden.</p>
 
1181
<p>This function will still return true if the widget is obscured by other windows on the screen, but could be physically visible if it or they were to be moved.</p>
 
1182
<p>isVisibleTo(0) is identical to <a href="qwidget.html#visible-prop">isVisible</a>().</p>
 
1183
<p>See also <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), and <a href="qwidget.html#visible-prop">isVisible</a>().</p>
 
1184
<h3 class="fn"><a name="isWindow"></a>bool QWidget::isWindow () const</h3>
 
1185
<p>whether the widget is an independent window</p>
 
1186
<p>A window is a widget that isn't visually the child of any other widget and that usually has a frame and a <a href="qwidget.html#windowTitle-prop">window title</a>.</p>
 
1187
<p>A window can have a <a href="qwidget.html#parentWidget">parent widget</a>. It will then be grouped with its parent and deleted when the parent is deleted, minimized when the parent is minimized etc. If supported by the window manager, it will also have a common taskbar entry with its parent.</p>
 
1188
<p><a href="qdialog.html">QDialog</a> and <a href="qmainwindow.html">QMainWindow</a> widgets are by default windows, even if a parent widget is specified in the constructor. This behavior is specified by the <a href="qt.html#WindowType-enum">Qt::Window</a> flag.</p>
 
1189
<p>See also <a href="qwidget.html#window">window</a>(), <a href="qwidget.html#modal-prop">isModal</a>(), and <a href="qwidget.html#parentWidget">parentWidget</a>().</p>
 
1190
<h3 class="fn"><a name="keyPressEvent"></a>void QWidget::keyPressEvent ( <a href="qkeyevent.html">QKeyEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1191
<p>This event handler, for event <i>e</i>, can be reimplemented in a subclass to receive key press events for the widget.</p>
 
1192
<p>A widget must call <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>() to accept focus initially and have focus in order to receive a key press event.</p>
 
1193
<p>If you reimplement this handler, it is very important that you <a href="qkeyevent.html">ignore()</a> the event if you do not understand it, so that the widget's parent can interpret it.</p>
 
1194
<p>The default implementation closes popup widgets if the user presses Esc. Otherwise the event is ignored.</p>
 
1195
<p>See also <a href="qwidget.html#keyReleaseEvent">keyReleaseEvent</a>(), <a href="qevent.html#ignore">QKeyEvent::ignore</a>(), <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>(), <a href="qwidget.html#focusInEvent">focusInEvent</a>(), <a href="qwidget.html#focusOutEvent">focusOutEvent</a>(), <a href="qwidget.html#event">event</a>(), and <a href="qkeyevent.html">QKeyEvent</a>.</p>
 
1196
<h3 class="fn"><a name="keyReleaseEvent"></a>void QWidget::keyReleaseEvent ( <a href="qkeyevent.html">QKeyEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1197
<p>This event handler, for event <i>e</i>, can be reimplemented in a subclass to receive key release events for the widget.</p>
 
1198
<p>A widget must <a href="qwidget.html#focusPolicy-prop">accept focus</a> initially and <a href="qwidget.html#focus-prop">have focus</a> in order to receive a key release event.</p>
 
1199
<p>If you reimplement this handler, it is very important that you <a href="qkeyevent.html">ignore()</a> the release if you do not understand it, so that the widget's parent can interpret it.</p>
 
1200
<p>The default implementation ignores the event.</p>
 
1201
<p>See also <a href="qwidget.html#keyPressEvent">keyPressEvent</a>(), <a href="qevent.html#ignore">QKeyEvent::ignore</a>(), <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>(), <a href="qwidget.html#focusInEvent">focusInEvent</a>(), <a href="qwidget.html#focusOutEvent">focusOutEvent</a>(), <a href="qwidget.html#event">event</a>(), and <a href="qkeyevent.html">QKeyEvent</a>.</p>
 
1202
<h3 class="fn"><a name="keyboardGrabber"></a>QWidget * QWidget::keyboardGrabber ()&nbsp;&nbsp;<tt> [static]</tt></h3>
 
1203
<p>Returns the widget that is currently grabbing the keyboard input.</p>
 
1204
<p>If no widget in this application is currently grabbing the keyboard, 0 is returned.</p>
 
1205
<p>See also <a href="qwidget.html#grabMouse">grabMouse</a>() and <a href="qwidget.html#mouseGrabber">mouseGrabber</a>().</p>
 
1206
<h3 class="fn"><a name="layout"></a><a href="qlayout.html">QLayout</a> * QWidget::layout () const</h3>
 
1207
<p>Returns the layout engine that manages the geometry of this widget's children.</p>
 
1208
<p>If the widget does not have a layout, layout() returns 0.</p>
 
1209
<p>See also <a href="qwidget.html#setLayout">setLayout</a>() and <a href="qwidget.html#sizePolicy-prop">sizePolicy</a>().</p>
 
1210
<h3 class="fn"><a name="leaveEvent"></a>void QWidget::leaveEvent ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1211
<p>This event handler can be reimplemented in a subclass to receive widget leave events which are passed in the <i>event</i> parameter.</p>
 
1212
<p>A leave event is sent to the widget when the mouse cursor leaves the widget.</p>
 
1213
<p>See also <a href="qwidget.html#enterEvent">enterEvent</a>(), <a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>(), and <a href="qwidget.html#event">event</a>().</p>
 
1214
<h3 class="fn"><a name="lower"></a>void QWidget::lower ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
1215
<p>Lowers the widget to the bottom of the parent widget's stack.</p>
 
1216
<p>After this call the widget will be visually behind (and therefore obscured by) any overlapping sibling widgets.</p>
 
1217
<p>See also <a href="qwidget.html#raise">raise</a>() and <a href="qwidget.html#stackUnder">stackUnder</a>().</p>
 
1218
<h3 class="fn"><a name="macEvent"></a>bool QWidget::macEvent ( EventHandlerCallRef <i>caller</i>, EventRef <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1219
<p>This special event handler can be reimplemented in a subclass to receive native Macintosh events which are passed from the <i>caller</i> with the event details in the <i>event</i> parameter.</p>
 
1220
<p>In your reimplementation of this function, if you want to stop the event being handled by Qt, return true. If you return false, this native event is passed back to Qt, which translates the event into a Qt event and sends it to the widget.</p>
 
1221
<p><b>Warning:</b> This function is not portable.</p>
 
1222
<p>See also <a href="qapplication.html#macEventFilter">QApplication::macEventFilter</a>().</p>
 
1223
<h3 class="fn"><a name="mapFrom"></a><a href="qpoint.html">QPoint</a> QWidget::mapFrom ( QWidget * <i>parent</i>, const <a href="qpoint.html">QPoint</a> &amp; <i>pos</i> ) const</h3>
 
1224
<p>Translates the widget coordinate <i>pos</i> from the coordinate system of <i>parent</i> to this widget's coordinate system. The <i>parent</i> must not be 0 and must be a parent of the calling widget.</p>
 
1225
<p>See also <a href="qwidget.html#mapTo">mapTo</a>(), <a href="qwidget.html#mapFromParent">mapFromParent</a>(), <a href="qwidget.html#mapFromGlobal">mapFromGlobal</a>(), and <a href="qwidget.html#underMouse">underMouse</a>().</p>
 
1226
<h3 class="fn"><a name="mapFromGlobal"></a><a href="qpoint.html">QPoint</a> QWidget::mapFromGlobal ( const <a href="qpoint.html">QPoint</a> &amp; <i>pos</i> ) const</h3>
 
1227
<p>Translates the global screen coordinate <i>pos</i> to widget coordinates.</p>
 
1228
<p>See also <a href="qwidget.html#mapToGlobal">mapToGlobal</a>(), <a href="qwidget.html#mapFrom">mapFrom</a>(), and <a href="qwidget.html#mapFromParent">mapFromParent</a>().</p>
 
1229
<h3 class="fn"><a name="mapFromParent"></a><a href="qpoint.html">QPoint</a> QWidget::mapFromParent ( const <a href="qpoint.html">QPoint</a> &amp; <i>pos</i> ) const</h3>
 
1230
<p>Translates the parent widget coordinate <i>pos</i> to widget coordinates.</p>
 
1231
<p>Same as <a href="qwidget.html#mapFromGlobal">mapFromGlobal</a>() if the widget has no parent.</p>
 
1232
<p>See also <a href="qwidget.html#mapToParent">mapToParent</a>(), <a href="qwidget.html#mapFrom">mapFrom</a>(), <a href="qwidget.html#mapFromGlobal">mapFromGlobal</a>(), and <a href="qwidget.html#underMouse">underMouse</a>().</p>
 
1233
<h3 class="fn"><a name="mapTo"></a><a href="qpoint.html">QPoint</a> QWidget::mapTo ( QWidget * <i>parent</i>, const <a href="qpoint.html">QPoint</a> &amp; <i>pos</i> ) const</h3>
 
1234
<p>Translates the widget coordinate <i>pos</i> to the coordinate system of <i>parent</i>. The <i>parent</i> must not be 0 and must be a parent of the calling widget.</p>
 
1235
<p>See also <a href="qwidget.html#mapFrom">mapFrom</a>(), <a href="qwidget.html#mapToParent">mapToParent</a>(), <a href="qwidget.html#mapToGlobal">mapToGlobal</a>(), and <a href="qwidget.html#underMouse">underMouse</a>().</p>
 
1236
<h3 class="fn"><a name="mapToGlobal"></a><a href="qpoint.html">QPoint</a> QWidget::mapToGlobal ( const <a href="qpoint.html">QPoint</a> &amp; <i>pos</i> ) const</h3>
 
1237
<p>Translates the widget coordinate <i>pos</i> to global screen coordinates. For example, <tt>mapToGlobal(QPoint(0,0))</tt> would give the global coordinates of the top-left pixel of the widget.</p>
 
1238
<p>See also <a href="qwidget.html#mapFromGlobal">mapFromGlobal</a>(), <a href="qwidget.html#mapTo">mapTo</a>(), and <a href="qwidget.html#mapToParent">mapToParent</a>().</p>
 
1239
<h3 class="fn"><a name="mapToParent"></a><a href="qpoint.html">QPoint</a> QWidget::mapToParent ( const <a href="qpoint.html">QPoint</a> &amp; <i>pos</i> ) const</h3>
 
1240
<p>Translates the widget coordinate <i>pos</i> to a coordinate in the parent widget.</p>
 
1241
<p>Same as <a href="qwidget.html#mapToGlobal">mapToGlobal</a>() if the widget has no parent.</p>
 
1242
<p>See also <a href="qwidget.html#mapFromParent">mapFromParent</a>(), <a href="qwidget.html#mapTo">mapTo</a>(), <a href="qwidget.html#mapToGlobal">mapToGlobal</a>(), and <a href="qwidget.html#underMouse">underMouse</a>().</p>
 
1243
<h3 class="fn"><a name="mask"></a><a href="qregion.html">QRegion</a> QWidget::mask () const</h3>
 
1244
<p>Returns the mask currently set on a widget. If no mask is set the return value will be an empty region.</p>
 
1245
<p>See also <a href="qwidget.html#setMask">setMask</a>(), <a href="qwidget.html#clearMask">clearMask</a>(), and <a href="qregion.html#isEmpty">QRegion::isEmpty</a>().</p>
 
1246
<h3 class="fn"><a name="metric"></a>int QWidget::metric ( <a href="qpaintdevice.html#PaintDeviceMetric-enum">PaintDeviceMetric</a> <i>m</i> ) const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1247
<p>Internal implementation of the virtual <a href="qpaintdevice.html#metric">QPaintDevice::metric</a>() function.</p>
 
1248
<p><i>m</i> is the metric to get.</p>
 
1249
<p>Reimplemented from <a href="qpaintdevice.html#metric">QPaintDevice</a>.</p>
 
1250
<h3 class="fn"><a name="mouseDoubleClickEvent"></a>void QWidget::mouseDoubleClickEvent ( <a href="qmouseevent.html">QMouseEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1251
<p>This event handler, for event <i>e</i>, can be reimplemented in a subclass to receive mouse double click events for the widget.</p>
 
1252
<p>The default implementation generates a normal mouse press event.</p>
 
1253
<p>Note that the widgets gets a <a href="qwidget.html#mousePressEvent">mousePressEvent</a>() and a <a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>() before the mouseDoubleClickEvent().</p>
 
1254
<p>See also <a href="qwidget.html#mousePressEvent">mousePressEvent</a>(), <a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>(), <a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>(), <a href="qwidget.html#event">event</a>(), and <a href="qmouseevent.html">QMouseEvent</a>.</p>
 
1255
<h3 class="fn"><a name="mouseGrabber"></a>QWidget * QWidget::mouseGrabber ()&nbsp;&nbsp;<tt> [static]</tt></h3>
 
1256
<p>Returns the widget that is currently grabbing the mouse input.</p>
 
1257
<p>If no widget in this application is currently grabbing the mouse, 0 is returned.</p>
 
1258
<p>See also <a href="qwidget.html#grabMouse">grabMouse</a>() and <a href="qwidget.html#keyboardGrabber">keyboardGrabber</a>().</p>
 
1259
<h3 class="fn"><a name="mouseMoveEvent"></a>void QWidget::mouseMoveEvent ( <a href="qmouseevent.html">QMouseEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1260
<p>This event handler, for event <i>e</i>, can be reimplemented in a subclass to receive mouse move events for the widget.</p>
 
1261
<p>If mouse tracking is switched off, mouse move events only occur if a mouse button is pressed while the mouse is being moved. If mouse tracking is switched on, mouse move events occur even if no mouse button is pressed.</p>
 
1262
<p><a href="qmouseevent.html#pos">QMouseEvent::pos</a>() reports the position of the mouse cursor, relative to this widget. For press and release events, the position is usually the same as the position of the last mouse move event, but it might be different if the user's hand shakes. This is a feature of the underlying window system, not Qt.</p>
 
1263
<p>See also <a href="qwidget.html#mouseTracking-prop">setMouseTracking</a>(), <a href="qwidget.html#mousePressEvent">mousePressEvent</a>(), <a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>(), <a href="qwidget.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a>(), <a href="qwidget.html#event">event</a>(), and <a href="qmouseevent.html">QMouseEvent</a>.</p>
 
1264
<h3 class="fn"><a name="mousePressEvent"></a>void QWidget::mousePressEvent ( <a href="qmouseevent.html">QMouseEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1265
<p>This event handler, for event <i>e</i>, can be reimplemented in a subclass to receive mouse press events for the widget.</p>
 
1266
<p>If you create new widgets in the mousePressEvent() the <a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>() may not end up where you expect, depending on the underlying window system (or <a href="winsystem.html#x11">X11</a> window manager), the widgets' location and maybe more.</p>
 
1267
<p>The default implementation implements the closing of popup widgets when you click outside the window. For other widget types it does nothing.</p>
 
1268
<p>See also <a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>(), <a href="qwidget.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a>(), <a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>(), <a href="qwidget.html#event">event</a>(), and <a href="qmouseevent.html">QMouseEvent</a>.</p>
 
1269
<h3 class="fn"><a name="mouseReleaseEvent"></a>void QWidget::mouseReleaseEvent ( <a href="qmouseevent.html">QMouseEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1270
<p>This event handler, for event <i>e</i>, can be reimplemented in a subclass to receive mouse release events for the widget.</p>
 
1271
<p>See also <a href="qwidget.html#mousePressEvent">mousePressEvent</a>(), <a href="qwidget.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a>(), <a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>(), <a href="qwidget.html#event">event</a>(), and <a href="qmouseevent.html">QMouseEvent</a>.</p>
 
1272
<h3 class="fn"><a name="moveEvent"></a>void QWidget::moveEvent ( <a href="qmoveevent.html">QMoveEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1273
<p>This event handler can be reimplemented in a subclass to receive widget move events which are passed in the <i>event</i> parameter. When the widget receives this event, it is already at the new position.</p>
 
1274
<p>The old position is accessible through <a href="qmoveevent.html#oldPos">QMoveEvent::oldPos</a>().</p>
 
1275
<p>See also <a href="qwidget.html#resizeEvent">resizeEvent</a>(), <a href="qwidget.html#event">event</a>(), <a href="qwidget.html#pos-prop">move</a>(), and <a href="qmoveevent.html">QMoveEvent</a>.</p>
 
1276
<h3 class="fn"><a name="nextInFocusChain"></a>QWidget * QWidget::nextInFocusChain () const</h3>
 
1277
<p>Returns the next widget in this widget's focus chain.</p>
 
1278
<h3 class="fn"><a name="overrideWindowFlags"></a>void QWidget::overrideWindowFlags ( <a href="qt.html#WindowType-enum">Qt::WindowFlags</a> <i>flags</i> )</h3>
 
1279
<p>Sets the window flags for the widget to <i>flags</i>, <i>without</i> telling the window system.</p>
 
1280
<p><b>Warning:</b> Do not call this function unless you really know what you're doing.</p>
 
1281
<p>See also <a href="qwidget.html#windowFlags-prop">setWindowFlags</a>().</p>
 
1282
<h3 class="fn"><a name="paintEngine"></a><a href="qpaintengine.html">QPaintEngine</a> * QWidget::paintEngine () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
1283
<p>Returns the widget's paint engine.</p>
 
1284
<p>Reimplemented from <a href="qpaintdevice.html#paintEngine">QPaintDevice</a>.</p>
 
1285
<h3 class="fn"><a name="paintEvent"></a>void QWidget::paintEvent ( <a href="qpaintevent.html">QPaintEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1286
<p>This event handler can be reimplemented in a subclass to receive paint events which are passed in the <i>event</i> parameter.</p>
 
1287
<p>A paint event is a request to repaint all or part of the widget. It can happen as a result of <a href="qwidget.html#repaint">repaint</a>() or <a href="qwidget.html#update">update</a>(), or because the widget was obscured and has now been uncovered, or for many other reasons.</p>
 
1288
<p>Many widgets can simply repaint their entire surface when asked to, but some slow widgets need to optimize by painting only the requested region: <a href="qpaintevent.html#region">QPaintEvent::region</a>(). This speed optimization does not change the result, as painting is clipped to that region during event processing. <a href="qlistview.html">QListView</a> and <a href="qtableview.html">QTableView</a> do this, for example.</p>
 
1289
<p>Qt also tries to speed up painting by merging multiple paint events into one. When <a href="qwidget.html#update">update</a>() is called several times or the window system sends several paint events, Qt merges these events into one event with a larger region (see <a href="qregion.html#unite">QRegion::unite</a>()). <a href="qwidget.html#repaint">repaint</a>() does not permit this optimization, so we suggest using <a href="qwidget.html#update">update</a>() when possible.</p>
 
1290
<p>When the paint event occurs, the update region has normally been erased, so that you're painting on the widget's background.</p>
 
1291
<p>The background can be set using <a href="qwidget.html#setBackgroundRole">setBackgroundRole</a>() and <a href="qwidget.html#palette-prop">setPalette</a>().</p>
 
1292
<p>From Qt 4.0, <a href="qwidget.html">QWidget</a> automatically double-buffers its painting, so there's no need to write double-buffering code in paintEvent() to avoid flicker.</p>
 
1293
<p>Note: Under <a href="winsystem.html#x11">X11</a> it is possible to toggle the global double buffering by calling <tt>qt_x11_set_global_double_buffer()</tt>. Example usage:</p>
 
1294
<pre>&nbsp;   ...
 
1295
    extern void qt_x11_set_global_double_buffer(bool);
 
1296
    qt_x11_set_global_double_buffer(false);
 
1297
    ...</pre>
 
1298
<p>See also <a href="qwidget.html#event">event</a>(), <a href="qwidget.html#repaint">repaint</a>(), <a href="qwidget.html#update">update</a>(), <a href="qpainter.html">QPainter</a>, <a href="qpixmap.html">QPixmap</a>, and <a href="qpaintevent.html">QPaintEvent</a>.</p>
 
1299
<h3 class="fn"><a name="parentWidget"></a>QWidget * QWidget::parentWidget () const</h3>
 
1300
<p>Returns the parent of this widget, or 0 if it does not have any parent widget.</p>
 
1301
<h3 class="fn"><a name="qwsEvent"></a>bool QWidget::qwsEvent ( <a href="qwsevent.html">QWSEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1302
<p>This special event handler can be reimplemented in a subclass to receive native Qt/Embedded events which are passed in the <i>event</i> parameter.</p>
 
1303
<p>In your reimplementation of this function, if you want to stop the event being handled by Qt, return true. If you return false, this native event is passed back to Qt, which translates the event into a Qt event and sends it to the widget.</p>
 
1304
<p><b>Warning:</b> This function is not portable.</p>
 
1305
<p>See also <a href="qapplication.html#qwsEventFilter">QApplication::qwsEventFilter</a>().</p>
 
1306
<h3 class="fn"><a name="raise"></a>void QWidget::raise ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
1307
<p>Raises this widget to the top of the parent widget's stack.</p>
 
1308
<p>After this call the widget will be visually in front of any overlapping sibling widgets.</p>
 
1309
<p>See also <a href="qwidget.html#lower">lower</a>() and <a href="qwidget.html#stackUnder">stackUnder</a>().</p>
 
1310
<h3 class="fn"><a name="releaseDC"></a>void QWidget::releaseDC ( HDC <i>hdc</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
1311
<p>Releases the HDC <i>hdc</i> aquired by a previous call to <a href="qwidget.html#getDC">getDC</a>().</p>
 
1312
<p><b>Warning:</b> Using this function is not portable.</p>
 
1313
<p>Reimplemented from <a href="qpaintdevice.html#releaseDC">QPaintDevice</a>.</p>
 
1314
<h3 class="fn"><a name="releaseKeyboard"></a>void QWidget::releaseKeyboard ()</h3>
 
1315
<p>Releases the keyboard grab.</p>
 
1316
<p>See also <a href="qwidget.html#grabKeyboard">grabKeyboard</a>(), <a href="qwidget.html#grabMouse">grabMouse</a>(), and <a href="qwidget.html#releaseMouse">releaseMouse</a>().</p>
 
1317
<h3 class="fn"><a name="releaseMouse"></a>void QWidget::releaseMouse ()</h3>
 
1318
<p>Releases the mouse grab.</p>
 
1319
<p>See also <a href="qwidget.html#grabMouse">grabMouse</a>(), <a href="qwidget.html#grabKeyboard">grabKeyboard</a>(), and <a href="qwidget.html#releaseKeyboard">releaseKeyboard</a>().</p>
 
1320
<h3 class="fn"><a name="releaseShortcut"></a>void QWidget::releaseShortcut ( int <i>id</i> )</h3>
 
1321
<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>
 
1322
<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>
 
1323
<p>See also <a href="qwidget.html#grabShortcut">grabShortcut</a>() and <a href="qwidget.html#setShortcutEnabled">setShortcutEnabled</a>().</p>
 
1324
<h3 class="fn"><a name="removeAction"></a>void QWidget::removeAction ( <a href="qaction.html">QAction</a> * <i>action</i> )</h3>
 
1325
<p>Removes the action <i>action</i> from this widget's list of actions.</p>
 
1326
<h3 class="fn"><a name="repaint"></a>void QWidget::repaint ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
1327
<p>Repaints the widget directly by calling <a href="qwidget.html#paintEvent">paintEvent</a>() immediately, unless updates are disabled or the widget is hidden.</p>
 
1328
<p>We suggest only using repaint() if you need an immediate repaint, for example during animation. In almost all circumstances <a href="qwidget.html#update">update</a>() is better, as it permits Qt to optimize for speed and minimize flicker.</p>
 
1329
<p><b>Warning:</b> If you call repaint() in a function which may itself be called from <a href="qwidget.html#paintEvent">paintEvent</a>(), you may get infinite recursion. The <a href="qwidget.html#update">update</a>() function never causes recursion.</p>
 
1330
<p>See also <a href="qwidget.html#update">update</a>(), <a href="qwidget.html#paintEvent">paintEvent</a>(), and <a href="qwidget.html#updatesEnabled-prop">setUpdatesEnabled</a>().</p>
 
1331
<h3 class="fn"><a name="repaint-6"></a>void QWidget::repaint ( int <i>x</i>, int <i>y</i>, int <i>w</i>, int <i>h</i> )</h3>
 
1332
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
1333
<p>This version repaints a rectangle (<i>x</i>, <i>y</i>, <i>w</i>, <i>h</i>) inside the widget.</p>
 
1334
<p>If <i>w</i> is negative, it is replaced with <tt>width() - x</tt>, and if <i>h</i> is negative, it is replaced width <tt>height() - y</tt>.</p>
 
1335
<h3 class="fn"><a name="repaint-7"></a>void QWidget::repaint ( const <a href="qrect.html">QRect</a> &amp; <i>r</i> )</h3>
 
1336
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
1337
<p>This version repaints a rectangle <i>r</i> inside the widget.</p>
 
1338
<h3 class="fn"><a name="repaint-8"></a>void QWidget::repaint ( const <a href="qregion.html">QRegion</a> &amp; <i>rgn</i> )</h3>
 
1339
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
1340
<p>This version repaints a region <i>rgn</i> inside the widget.</p>
 
1341
<h3 class="fn"><a name="resetInputContext"></a>void QWidget::resetInputContext ()&nbsp;&nbsp;<tt> [protected]</tt></h3>
 
1342
<p>This function is called when text widgets need to be neutral state to execute text operations properly. See qlineedit.cpp and qtextedit.cpp as example.</p>
 
1343
<p>Ordinary reset that along with changing focus to another widget, moving the cursor, etc, is implicitly handled via unfocusInputContext() because whether reset or not when such situation is a responsibility of input methods. So we delegate the responsibility to the input context via unfocusInputContext(). See 'Preedit preservation' section of the class description of <a href="qinputcontext.html">QInputContext</a> for further information.</p>
 
1344
<p>See also <a href="qinputcontext.html">QInputContext</a> and <a href="qinputcontext.html#reset">QInputContext::reset</a>().</p>
 
1345
<h3 class="fn"><a name="resizeEvent"></a>void QWidget::resizeEvent ( <a href="qresizeevent.html">QResizeEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1346
<p>This event handler can be reimplemented in a subclass to receive widget resize events which are passed in the <i>event</i> parameter. When resizeEvent() is called, the widget already has its new geometry. The old size is accessible through <a href="qresizeevent.html#oldSize">QResizeEvent::oldSize</a>().</p>
 
1347
<p>The widget will be erased and receive a paint event immediately after processing the resize event. No drawing need be (or should be) done inside this handler.</p>
 
1348
<p>See also <a href="qwidget.html#moveEvent">moveEvent</a>(), <a href="qwidget.html#event">event</a>(), <a href="qwidget.html#size-prop">resize</a>(), <a href="qresizeevent.html">QResizeEvent</a>, and <a href="qwidget.html#paintEvent">paintEvent</a>().</p>
 
1349
<h3 class="fn"><a name="scroll"></a>void QWidget::scroll ( int <i>dx</i>, int <i>dy</i> )</h3>
 
1350
<p>Scrolls the widget including its children <i>dx</i> pixels to the right and <i>dy</i> downwards. Both <i>dx</i> and <i>dy</i> may be negative.</p>
 
1351
<p>After scrolling, scroll() sends a paint event for the the part that is read but not written. For example, when scrolling 10 pixels rightwards, the leftmost ten pixels of the widget need repainting. The paint event may be delivered immediately or later, depending on some heuristics (note that you might have to force processing of paint events using <a href="qcoreapplication.html#sendPostedEvents">QApplication::sendPostedEvents</a>() when using scroll() and <a href="qwidget.html#pos-prop">move</a>() in combination).</p>
 
1352
<p>See also <a href="porting4.html#qscrollview">QScrollView</a> and <a href="qimage-qt3.html#bitBlt">bitBlt</a>().</p>
 
1353
<h3 class="fn"><a name="scroll-2"></a>void QWidget::scroll ( int <i>dx</i>, int <i>dy</i>, const <a href="qrect.html">QRect</a> &amp; <i>r</i> )</h3>
 
1354
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
1355
<p>This version only scrolls <i>r</i> and does not move the children of the widget.</p>
 
1356
<p>If <i>r</i> is empty or invalid, the result is undefined.</p>
 
1357
<p>See also <a href="porting4.html#qscrollview">QScrollView</a> and <a href="qimage-qt3.html#bitBlt">bitBlt</a>().</p>
 
1358
<h3 class="fn"><a name="setAttribute"></a>void QWidget::setAttribute ( <a href="qt.html#WidgetAttribute-enum">Qt::WidgetAttribute</a> <i>attribute</i>, bool <i>on</i> = true )</h3>
 
1359
<p>Sets the attribute <i>attribute</i> on this widget if <i>on</i> is true; otherwise clears the attribute.</p>
 
1360
<p>See also <a href="qwidget.html#testAttribute">testAttribute</a>().</p>
 
1361
<h3 class="fn"><a name="setBackgroundRole"></a>void QWidget::setBackgroundRole ( <a href="qpalette.html#ColorRole-enum">QPalette::ColorRole</a> <i>role</i> )</h3>
 
1362
<p>Sets the background role of the widget to <i>role</i>.</p>
 
1363
<p>The background role defines the brush from the widget's <a href="qwidget.html#palette-prop">palette</a> that is used to render the background.</p>
 
1364
<p>If <i>role</i> is <tt>QPalette::NoRole</tt>, then the widget inherits its parent's background role.</p>
 
1365
<p>See also <a href="qwidget.html#backgroundRole">backgroundRole</a>() and <a href="qwidget.html#foregroundRole">foregroundRole</a>().</p>
 
1366
<h3 class="fn"><a name="setContentsMargins"></a>void QWidget::setContentsMargins ( int <i>left</i>, int <i>top</i>, int <i>right</i>, int <i>bottom</i> )</h3>
 
1367
<p>Sets the margins around the contents of the widget to have the sizes <i>left</i>, <i>top</i>, <i>right</i>, and <i>bottom</i>. The margins are used by the layout system, and may be used by subclasses to specify the area to draw in (e.g. excluding the frame).</p>
 
1368
<p>Changing the margins will trigger a <a href="qwidget.html#resizeEvent">resizeEvent</a>().</p>
 
1369
<p>See also <a href="qwidget.html#contentsRect">contentsRect</a>() and <a href="qwidget.html#getContentsMargins">getContentsMargins</a>().</p>
 
1370
<h3 class="fn"><a name="setDisabled"></a>void QWidget::setDisabled ( bool <i>disable</i> )&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
1371
<p>Disables widget input events if <i>disable</i> is true; otherwise enables input events.</p>
 
1372
<p>See the <a href="qwidget.html#enabled-prop">enabled</a> documentation for more information.</p>
 
1373
<p>See also <a href="qwidget.html#isEnabledTo">isEnabledTo</a>(), <a href="qkeyevent.html">QKeyEvent</a>, <a href="qmouseevent.html">QMouseEvent</a>, and <a href="qwidget.html#changeEvent">changeEvent</a>().</p>
 
1374
<h3 class="fn"><a name="setFixedHeight"></a>void QWidget::setFixedHeight ( int <i>h</i> )</h3>
 
1375
<p>Sets both the minimum and maximum heights of the widget to <i>h</i> without changing the widths. Provided for convenience.</p>
 
1376
<p>See also <a href="qwidget.html#sizeHint-prop">sizeHint</a>(), <a href="qwidget.html#minimumSize-prop">minimumSize</a>(), <a href="qwidget.html#maximumSize-prop">maximumSize</a>(), and <a href="qwidget.html#setFixedSize">setFixedSize</a>().</p>
 
1377
<h3 class="fn"><a name="setFixedSize"></a>void QWidget::setFixedSize ( const <a href="qsize.html">QSize</a> &amp; <i>s</i> )</h3>
 
1378
<p>Sets both the minimum and maximum sizes of the widget to <i>s</i>, thereby preventing it from ever growing or shrinking.</p>
 
1379
<p>This will override the default size constraints set by <a href="qlayout.html">QLayout</a>.</p>
 
1380
<p>Alternatively, if you want the widget to have a fixed size based on its contents, you can call QLayout::setSizeConstraint(<a href="qlayout.html#SizeConstraint-enum">QLayout::SetFixedSize</a>);</p>
 
1381
<p>See also <a href="qwidget.html#maximumSize-prop">maximumSize</a> and <a href="qwidget.html#minimumSize-prop">minimumSize</a>.</p>
 
1382
<h3 class="fn"><a name="setFixedSize-2"></a>void QWidget::setFixedSize ( int <i>w</i>, int <i>h</i> )</h3>
 
1383
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
1384
<p>Sets the width of the widget to <i>w</i> and the height to <i>h</i>.</p>
 
1385
<h3 class="fn"><a name="setFixedWidth"></a>void QWidget::setFixedWidth ( int <i>w</i> )</h3>
 
1386
<p>Sets both the minimum and maximum width of the widget to <i>w</i> without changing the heights. Provided for convenience.</p>
 
1387
<p>See also <a href="qwidget.html#sizeHint-prop">sizeHint</a>(), <a href="qwidget.html#minimumSize-prop">minimumSize</a>(), <a href="qwidget.html#maximumSize-prop">maximumSize</a>(), and <a href="qwidget.html#setFixedSize">setFixedSize</a>().</p>
 
1388
<h3 class="fn"><a name="setFocus"></a>void QWidget::setFocus ( <a href="qt.html#FocusReason-enum">Qt::FocusReason</a> <i>reason</i> )</h3>
 
1389
<p>Gives the keyboard input focus to this widget (or its focus proxy) if this widget or one of its parents is the <a href="qwidget.html#isActiveWindow-prop">active window</a>. The <i>reason</i> argument will be passed into any focus event sent from this function, it is used to give an explanation of what caused the widget to get focus.</p>
 
1390
<p>First, a focus out event is sent to the focus widget (if any) to tell it that it is about to lose the focus. Then a focus in event is sent to this widget to tell it that it just received the focus. (Nothing happens if the focus in and focus out widgets are the same.)</p>
 
1391
<p>setFocus() gives focus to a widget regardless of its focus policy, but does not clear any keyboard grab (see <a href="qwidget.html#grabKeyboard">grabKeyboard</a>()).</p>
 
1392
<p>Be aware that if the widget is hidden, it will not accept focus.</p>
 
1393
<p><b>Warning:</b> If you call setFocus() in a function which may itself be called from <a href="qwidget.html#focusOutEvent">focusOutEvent</a>() or <a href="qwidget.html#focusInEvent">focusInEvent</a>(), you may get an infinite recursion.</p>
 
1394
<p><a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>() <a href="qapplication.html#focusWidget">QApplication::focusWidget</a>() <a href="qwidget.html#grabKeyboard">grabKeyboard</a>() <a href="qwidget.html#grabMouse">grabMouse</a>(), {Keyboard Focus}</p>
 
1395
<p>See also <a href="qwidget.html#focus-prop">hasFocus</a>(), <a href="qwidget.html#clearFocus">clearFocus</a>(), <a href="qwidget.html#focusInEvent">focusInEvent</a>(), and <a href="qwidget.html#focusOutEvent">focusOutEvent</a>().</p>
 
1396
<h3 class="fn"><a name="setFocus-2"></a>void QWidget::setFocus ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
1397
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
1398
<p>Gives the keyboard input focus to this widget (or its focus proxy) if this widget or one of its parents is the <a href="qwidget.html#isActiveWindow-prop">active window</a>.</p>
 
1399
<h3 class="fn"><a name="setFocusProxy"></a>void QWidget::setFocusProxy ( QWidget * <i>w</i> )</h3>
 
1400
<p>Sets the widget's focus proxy to widget <i>w</i>. If <i>w</i> is 0, the function resets this widget to have no focus proxy.</p>
 
1401
<p>Some widgets can &quot;have focus&quot;, but create a child widget, such as <a href="qlineedit.html">QLineEdit</a>, to actually handle the focus. In this case, the widget can set the line edit to be its focus proxy.</p>
 
1402
<p>setFocusProxy() sets the widget which will actually get focus when &quot;this widget&quot; gets it. If there is a focus proxy, <a href="qwidget.html#setFocus">setFocus</a>() and <a href="qwidget.html#focus-prop">hasFocus</a>() operate on the focus proxy.</p>
 
1403
<p>See also <a href="qwidget.html#focusProxy">focusProxy</a>().</p>
 
1404
<h3 class="fn"><a name="setForegroundRole"></a>void QWidget::setForegroundRole ( <a href="qpalette.html#ColorRole-enum">QPalette::ColorRole</a> <i>role</i> )</h3>
 
1405
<p>Sets the foreground role of the widget to <i>role</i>.</p>
 
1406
<p>The foreground role defines the color from the widget's <a href="qwidget.html#palette-prop">palette</a> that is used to draw the foreground.</p>
 
1407
<p>If <i>role</i> is <tt>QPalette::NoRole</tt>, the widget uses a foreground role that contrasts with the background role.</p>
 
1408
<p>See also <a href="qwidget.html#foregroundRole">foregroundRole</a>() and <a href="qwidget.html#backgroundRole">backgroundRole</a>().</p>
 
1409
<h3 class="fn"><a name="setHidden"></a>void QWidget::setHidden ( bool <i>hidden</i> )&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
1410
<p>Convenience function, equivalent to setVisible(!<i>hidden</i>).</p>
 
1411
<h3 class="fn"><a name="setInputContext"></a>void QWidget::setInputContext ( <a href="qinputcontext.html">QInputContext</a> * <i>context</i> )</h3>
 
1412
<p>This function sets the input context <i>context</i> on this widget.</p>
 
1413
<p>See also <a href="qwidget.html#inputContext">inputContext</a>().</p>
 
1414
<h3 class="fn"><a name="setLayout"></a>void QWidget::setLayout ( <a href="qlayout.html">QLayout</a> * <i>l</i> )</h3>
 
1415
<p>Sets the layout engine for this widget to <i>l</i>.</p>
 
1416
<p>There can be only one top-level layout for a widget.</p>
 
1417
<p>See also <a href="qwidget.html#layout">layout</a>().</p>
 
1418
<h3 class="fn"><a name="setMask"></a>void QWidget::setMask ( const <a href="qbitmap.html">QBitmap</a> &amp; <i>bitmap</i> )</h3>
 
1419
<p>Causes only the pixels of the widget for which <i>bitmap</i> has a corresponding 1 bit to be visible. If the region includes pixels outside the <a href="qwidget.html#rect-prop">rect</a>() of the widget, window system controls in that area may or may not be visible, depending on the platform.</p>
 
1420
<p>Note that this effect can be slow if the region is particularly complex.</p>
 
1421
<p>The following code shows how an image with an alpha channel can be used to generate a mask for a widget:</p>
 
1422
<pre>&nbsp;       QLabel topLevelLabel;
 
1423
        QPixmap pixmap(&quot;:/images/tux.png&quot;);
 
1424
        topLevelLabel.setPixmap(pixmap);
 
1425
        topLevelLabel.setMask(pixmap.mask());</pre>
 
1426
<p>The label shown by this code is masked using the image it contains, giving the appearance that an irregularly-shaped image is being drawn directly onto the screen.</p>
 
1427
<p>See also <a href="qwidget.html#clearMask">clearMask</a>().</p>
 
1428
<h3 class="fn"><a name="setMask-2"></a>void QWidget::setMask ( const <a href="qregion.html">QRegion</a> &amp; <i>region</i> )</h3>
 
1429
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
1430
<p>Causes only the parts of the widget which overlap <i>region</i> to be visible. If the region includes pixels outside the <a href="qwidget.html#rect-prop">rect</a>() of the widget, window system controls in that area may or may not be visible, depending on the platform.</p>
 
1431
<p>Note that this effect can be slow if the region is particularly complex.</p>
 
1432
<p>See also <a href="qwidget.html#setMask">setMask</a>() and <a href="qwidget.html#clearMask">clearMask</a>().</p>
 
1433
<h3 class="fn"><a name="setParent"></a>void QWidget::setParent ( QWidget * <i>parent</i> )</h3>
 
1434
<p>Sets the parent of the widget to <i>parent</i>. The widget is moved to position (0, 0) in its new parent.</p>
 
1435
<p>If the new parent widget is in a different window, the reparented widget and its children are appended to the end of the <a href="qwidget.html#focusPolicy-prop">tab chain</a> of the new parent widget, in the same internal order as before. If one of the moved widgets had keyboard focus, setParent() calls <a href="qwidget.html#clearFocus">clearFocus</a>() for that widget.</p>
 
1436
<p>If the new parent widget is in the same window as the old parent, setting the parent doesn't change the tab order or keyboard focus.</p>
 
1437
<p>If the &quot;new&quot; parent widget is the old parent widget, this function does nothing.</p>
 
1438
<p><b>Warning:</b> It is very unlikely that you will ever need this function. If you have a widget that changes its content dynamically, it is far easier to use <a href="qstackedwidget.html">QStackedWidget</a>.</p>
 
1439
<p>See also <a href="qwidget.html#windowFlags-prop">setWindowFlags</a>().</p>
 
1440
<h3 class="fn"><a name="setParent-2"></a>void QWidget::setParent ( QWidget * <i>parent</i>, <a href="qt.html#WFlags-typedef">Qt::WFlags</a> <i>f</i> )</h3>
 
1441
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
1442
<p>This function also takes widget flags, <i>f</i> as an argument.</p>
 
1443
<h3 class="fn"><a name="setShortcutEnabled"></a>void QWidget::setShortcutEnabled ( int <i>id</i>, bool <i>enable</i> = true )</h3>
 
1444
<p>If <i>enable</i> is true, the shortcut with the given <i>id</i> is enabled; otherwise the shortcut is disabled.</p>
 
1445
<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>
 
1446
<p>See also <a href="qwidget.html#grabShortcut">grabShortcut</a>() and <a href="qwidget.html#releaseShortcut">releaseShortcut</a>().</p>
 
1447
<h3 class="fn"><a name="setStyle"></a>void QWidget::setStyle ( <a href="qstyle.html">QStyle</a> * <i>style</i> )</h3>
 
1448
<p>Sets the widget's GUI style to <i>style</i>. Ownership of the style object is not transferred.</p>
 
1449
<p>If no style is set, the widget uses the application's style, <a href="qapplication.html#style">QApplication::style</a>() instead.</p>
 
1450
<p>Setting a widget's style has no effect on existing or future child widgets.</p>
 
1451
<p><b>Warning:</b> This function is particularly useful for demonstration purposes, where you want to show Qt's styling capabilities. Real applications should avoid it and use one consistent GUI style instead.</p>
 
1452
<p>See also <a href="qwidget.html#style">style</a>(), <a href="qstyle.html">QStyle</a>, <a href="qapplication.html#style">QApplication::style</a>(), and <a href="qapplication.html#setStyle">QApplication::setStyle</a>().</p>
 
1453
<h3 class="fn"><a name="setTabOrder"></a>void QWidget::setTabOrder ( QWidget * <i>first</i>, QWidget * <i>second</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
 
1454
<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>
 
1455
<p>Note that since the tab order of the <i>second</i> widget is changed, you should order a chain like this:</p>
 
1456
<pre>&nbsp;   setTabOrder(a, b); // a to b
 
1457
    setTabOrder(b, c); // a to b to c
 
1458
    setTabOrder(c, d); // a to b to c to d</pre>
 
1459
<p><i>not</i> like this:</p>
 
1460
<pre>&nbsp;   setTabOrder(c, d); // c to d   WRONG
 
1461
    setTabOrder(a, b); // a to b AND c to d
 
1462
    setTabOrder(b, c); // a to b to c, but not c to d</pre>
 
1463
<p>If <i>first</i> or <i>second</i> has a focus proxy, setTabOrder() correctly substitutes the proxy.</p>
 
1464
<p>See also <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>(), <a href="qwidget.html#setFocusProxy">setFocusProxy</a>(), and <a href="focus.html">Keyboard Focus</a>.</p>
 
1465
<h3 class="fn"><a name="setWindowRole"></a>void QWidget::setWindowRole ( const <a href="qstring.html">QString</a> &amp; <i>role</i> )</h3>
 
1466
<p>Sets the window's role to <i>role</i>. This only makes sense for windows on <a href="winsystem.html#x11">X11</a>.</p>
 
1467
<h3 class="fn"><a name="setWindowState"></a>void QWidget::setWindowState ( <a href="qt.html#WindowState-enum">Qt::WindowStates</a> <i>windowState</i> )</h3>
 
1468
<p>Sets the window state to <i>windowState</i>. The window state is a OR'ed combination of <a href="qt.html#WindowState-enum">Qt::WindowState</a>: <tt>Qt::WindowMinimized</tt>, <tt>Qt::WindowMaximized</tt>, <tt>Qt::WindowFullScreen</tt> and <tt>Qt::WindowActive</tt>.</p>
 
1469
<p>If the window is not visible (i.e. <a href="qwidget.html#visible-prop">isVisible</a>() returns false), the window state will take effect when <a href="qwidget.html#show">show</a>() is called. For visible windows, the change is immediate. For example, to toggle between full-screen and mormal mode, use the following code:</p>
 
1470
<pre>&nbsp;   w-&gt;setWindowState(w-&gt;windowState() ^ Qt::WindowFullScreen);</pre>
 
1471
<p>In order to restore and activate a minimized window (while preserving its maximized and/or full-screen state), use the following:</p>
 
1472
<pre>&nbsp;   w-&gt;setWindowState(w-&gt;windowState() &amp; ~Qt::WindowMinimized | Qt::WindowActive);</pre>
 
1473
<p>Note: On some window systems <tt>Qt::WindowActive</tt> is not immediate, and may be ignored in certain cases.</p>
 
1474
<p>See also <a href="qt.html#WindowState-enum">Qt::WindowState</a> and <a href="qwidget.html#windowState">windowState</a>().</p>
 
1475
<h3 class="fn"><a name="show"></a>void QWidget::show ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
1476
<p>Shows the widget and its child widgets. This function is equivalent to setVisible(true).</p>
 
1477
<p>See also <a href="qwidget.html#showEvent">showEvent</a>(), <a href="qwidget.html#hide">hide</a>(), <a href="qwidget.html#visible-prop">setVisible</a>(), <a href="qwidget.html#showMinimized">showMinimized</a>(), <a href="qwidget.html#showMaximized">showMaximized</a>(), <a href="qwidget.html#showNormal">showNormal</a>(), and <a href="qwidget.html#visible-prop">isVisible</a>().</p>
 
1478
<h3 class="fn"><a name="showEvent"></a>void QWidget::showEvent ( <a href="qshowevent.html">QShowEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1479
<p>This event handler can be reimplemented in a subclass to receive widget show events which are passed in the <i>event</i> parameter.</p>
 
1480
<p>Non-spontaneous show events are sent to widgets immediately before they are shown. The spontaneous show events of windows are delivered afterwards.</p>
 
1481
<p>Note: A widget receives spontaneous show and hide events when its mapping status is changed by the window system, e.g. a spontaneous hide event when the user minimizes the window, and a spontaneous show event when the window is restored again. After receiving a spontaneous hide event, a widget is still considered visible in the sense of <a href="qwidget.html#visible-prop">isVisible</a>().</p>
 
1482
<p>See also <a href="qwidget.html#visible-prop">visible</a>, <a href="qwidget.html#event">event</a>(), and <a href="qshowevent.html">QShowEvent</a>.</p>
 
1483
<h3 class="fn"><a name="showFullScreen"></a>void QWidget::showFullScreen ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
1484
<p>Shows the widget in full-screen mode.</p>
 
1485
<p>Calling this function only affects windows.</p>
 
1486
<p>To return from full-screen mode, call <a href="qwidget.html#showNormal">showNormal</a>().</p>
 
1487
<p>Full-screen mode works fine under Windows, but has certain problems under X. These problems are due to limitations of the ICCCM protocol that specifies the communication between <a href="winsystem.html#x11">X11</a> clients and the window manager. ICCCM simply does not understand the concept of non-decorated full-screen windows. Therefore, the best we can do is to request a borderless window and place and resize it to fill the entire screen. Depending on the window manager, this may or may not work. The borderless window is requested using MOTIF hints, which are at least partially supported by virtually all modern window managers.</p>
 
1488
<p>An alternative would be to bypass the window manager entirely and create a window with the <a href="qt.html#WindowType-enum">Qt::WX11BypassWM</a> flag. This has other severe problems though, like totally broken keyboard focus and very strange effects on desktop changes or when the user raises other windows.</p>
 
1489
<p><a href="winsystem.html#x11">X11</a> window managers that follow modern post-ICCCM specifications support full-screen mode properly.</p>
 
1490
<p>See also <a href="qwidget.html#showNormal">showNormal</a>(), <a href="qwidget.html#showMaximized">showMaximized</a>(), <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), and <a href="qwidget.html#visible-prop">isVisible</a>().</p>
 
1491
<h3 class="fn"><a name="showMaximized"></a>void QWidget::showMaximized ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
1492
<p>Shows the widget maximized.</p>
 
1493
<p>Calling this function only affects <a href="qwidget.html#isWindow">windows</a>.</p>
 
1494
<p>On <a href="winsystem.html#x11">X11</a>, this function may not work properly with certain window managers. See <a href="geometry.html">Window Geometry</a> for an explanation.</p>
 
1495
<p>See also <a href="qwidget.html#setWindowState">setWindowState</a>(), <a href="qwidget.html#showNormal">showNormal</a>(), <a href="qwidget.html#showMinimized">showMinimized</a>(), <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), and <a href="qwidget.html#visible-prop">isVisible</a>().</p>
 
1496
<h3 class="fn"><a name="showMinimized"></a>void QWidget::showMinimized ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
1497
<p>Shows the widget minimized, as an icon.</p>
 
1498
<p>Calling this function only affects <a href="qwidget.html#isWindow">windows</a>.</p>
 
1499
<p>See also <a href="qwidget.html#showNormal">showNormal</a>(), <a href="qwidget.html#showMaximized">showMaximized</a>(), <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), <a href="qwidget.html#visible-prop">isVisible</a>(), and <a href="qwidget.html#minimized-prop">isMinimized</a>().</p>
 
1500
<h3 class="fn"><a name="showNormal"></a>void QWidget::showNormal ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
1501
<p>Restores the widget after it has been maximized or minimized.</p>
 
1502
<p>Calling this function only affects <a href="qwidget.html#isWindow">windows</a>.</p>
 
1503
<p>See also <a href="qwidget.html#setWindowState">setWindowState</a>(), <a href="qwidget.html#showMinimized">showMinimized</a>(), <a href="qwidget.html#showMaximized">showMaximized</a>(), <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), and <a href="qwidget.html#visible-prop">isVisible</a>().</p>
 
1504
<h3 class="fn"><a name="stackUnder"></a>void QWidget::stackUnder ( QWidget * <i>w</i> )</h3>
 
1505
<p>Places the widget under <i>w</i> in the parent widget's stack.</p>
 
1506
<p>To make this work, the widget itself and <i>w</i> must be siblings.</p>
 
1507
<p>See also <a href="qwidget.html#raise">raise</a>() and <a href="qwidget.html#lower">lower</a>().</p>
 
1508
<h3 class="fn"><a name="style"></a><a href="qstyle.html">QStyle</a> * QWidget::style () const</h3>
 
1509
<p>Returns the GUI style for this widget</p>
 
1510
<p>See also <a href="qwidget.html#setStyle">QWidget::setStyle</a>(), <a href="qapplication.html#setStyle">QApplication::setStyle</a>(), and <a href="qapplication.html#style">QApplication::style</a>().</p>
 
1511
<h3 class="fn"><a name="tabletEvent"></a>void QWidget::tabletEvent ( <a href="qtabletevent.html">QTabletEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1512
<p>This event handler, for event <i>e</i>, can be reimplemented in a subclass to receive tablet events for the widget.</p>
 
1513
<p>If you reimplement this handler, it is very important that you <a href="qtabletevent.html">ignore()</a> the event if you do not handle it, so that the widget's parent can interpret it.</p>
 
1514
<p>The default implementation ignores the event.</p>
 
1515
<p>See also <a href="qevent.html#ignore">QTabletEvent::ignore</a>(), <a href="qevent.html#accept">QTabletEvent::accept</a>(), <a href="qwidget.html#event">event</a>(), and <a href="qtabletevent.html">QTabletEvent</a>.</p>
 
1516
<h3 class="fn"><a name="testAttribute"></a>bool QWidget::testAttribute ( <a href="qt.html#WidgetAttribute-enum">Qt::WidgetAttribute</a> <i>attribute</i> ) const</h3>
 
1517
<p>Returns true if attribute <i>attribute</i> is set on this widget; otherwise returns false.</p>
 
1518
<p>See also <a href="qwidget.html#setAttribute">setAttribute</a>().</p>
 
1519
<h3 class="fn"><a name="underMouse"></a>bool QWidget::underMouse () const</h3>
 
1520
<p>Returns true if the widget is under the mouse cursor; otherwise returns false.</p>
 
1521
<p>This value is not updated properly during drag and drop operations.</p>
 
1522
<p>See also <a href="qwidget.html#enterEvent">enterEvent</a>() and <a href="qwidget.html#leaveEvent">leaveEvent</a>().</p>
 
1523
<h3 class="fn"><a name="update"></a>void QWidget::update ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
 
1524
<p>Updates the widget unless updates are disabled or the widget is hidden.</p>
 
1525
<p>This function does not cause an immediate repaint; instead it schedules a paint event for processing when Qt returns to the main event loop. This permits Qt to optimize for more speed and less flicker than a call to <a href="qwidget.html#repaint">repaint</a>() does.</p>
 
1526
<p>Calling update() several times normally results in just one <a href="qwidget.html#paintEvent">paintEvent</a>() call.</p>
 
1527
<p>Qt normally erases the widget's area before the <a href="qwidget.html#paintEvent">paintEvent</a>() call. If the <tt>Qt::WRepaintNoErase</tt> widget flag is set, the widget is responsible for painting all its pixels itself.</p>
 
1528
<p>See also <a href="qwidget.html#repaint">repaint</a>(), <a href="qwidget.html#paintEvent">paintEvent</a>(), and <a href="qwidget.html#updatesEnabled-prop">setUpdatesEnabled</a>().</p>
 
1529
<h3 class="fn"><a name="update-2"></a>void QWidget::update ( int <i>x</i>, int <i>y</i>, int <i>w</i>, int <i>h</i> )</h3>
 
1530
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
1531
<p>This version updates a rectangle (<i>x</i>, <i>y</i>, <i>w</i>, <i>h</i>) inside the widget.</p>
 
1532
<h3 class="fn"><a name="update-3"></a>void QWidget::update ( const <a href="qrect.html">QRect</a> &amp; <i>r</i> )</h3>
 
1533
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
1534
<p>This version updates a rectangle <i>r</i> inside the widget.</p>
 
1535
<h3 class="fn"><a name="update-4"></a>void QWidget::update ( const <a href="qregion.html">QRegion</a> &amp; <i>rgn</i> )</h3>
 
1536
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
1537
<p>This version repaints a region <i>rgn</i> inside the widget.</p>
 
1538
<h3 class="fn"><a name="updateGeometry"></a>void QWidget::updateGeometry ()</h3>
 
1539
<p>Notifies the layout system that this widget has changed and may need to change geometry.</p>
 
1540
<p>Call this function if the <a href="qwidget.html#sizeHint-prop">sizeHint</a>() or <a href="qwidget.html#sizePolicy-prop">sizePolicy</a>() have changed.</p>
 
1541
<p>For explicitly hidden widgets, updateGeometry() is a no-op. The layout system will be notified as soon as the widget is shown.</p>
 
1542
<h3 class="fn"><a name="updateMicroFocus"></a>void QWidget::updateMicroFocus ()&nbsp;&nbsp;<tt> [protected]</tt></h3>
 
1543
<p>Updates the widget's micro focus.</p>
 
1544
<p>See also <a href="qinputcontext.html">QInputContext</a>.</p>
 
1545
<h3 class="fn"><a name="visibleRegion"></a><a href="qregion.html">QRegion</a> QWidget::visibleRegion () const</h3>
 
1546
<p>Returns the unobscured region where paint events can occur.</p>
 
1547
<p>For visible widgets, this is an approximation of the area not covered by other widgets; otherwise, this is an empty region.</p>
 
1548
<p>The <a href="qwidget.html#repaint">repaint</a>() function calls this function if necessary, so in general you do not need to call it.</p>
 
1549
<h3 class="fn"><a name="wheelEvent"></a>void QWidget::wheelEvent ( <a href="qwheelevent.html">QWheelEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1550
<p>This event handler, for event <i>e</i>, can be reimplemented in a subclass to receive wheel events for the widget.</p>
 
1551
<p>If you reimplement this handler, it is very important that you <a href="qwheelevent.html">ignore()</a> the event if you do not handle it, so that the widget's parent can interpret it.</p>
 
1552
<p>The default implementation ignores the event.</p>
 
1553
<p>See also <a href="qevent.html#ignore">QWheelEvent::ignore</a>(), <a href="qevent.html#accept">QWheelEvent::accept</a>(), <a href="qwidget.html#event">event</a>(), and <a href="qwheelevent.html">QWheelEvent</a>.</p>
 
1554
<h3 class="fn"><a name="winEvent"></a>bool QWidget::winEvent ( MSG * <i>message</i>, long * <i>result</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1555
<p>This special event handler can be reimplemented in a subclass to receive native Windows events which are passed in the <i>message</i> parameter.</p>
 
1556
<p>In your reimplementation of this function, if you want to stop the event being handled by Qt, return true and set <i>result</i> to the value that the window procedure should return. If you return false, this native event is passed back to Qt, which translates the event into a Qt event and sends it to the widget.</p>
 
1557
<p><b>Warning:</b> This function is not portable.</p>
 
1558
<p>See also <a href="qcoreapplication.html#winEventFilter">QApplication::winEventFilter</a>().</p>
 
1559
<h3 class="fn"><a name="winId"></a>WId QWidget::winId () const</h3>
 
1560
<p>Returns the window system identifier of the widget.</p>
 
1561
<p>Portable in principle, but if you use it you are probably about to do something non-portable. Be careful.</p>
 
1562
<p>See also <a href="qwidget.html#find">find</a>().</p>
 
1563
<h3 class="fn"><a name="window"></a>QWidget * QWidget::window () const</h3>
 
1564
<p>Returns the window for this widget, i.e. the next ancestor widget that has (or could have) a window-system frame.</p>
 
1565
<p>If the widget is a window, the widget itself is returned.</p>
 
1566
<p>Typical usage is changing the window title:</p>
 
1567
<pre>&nbsp;   aWidget-&gt;window()-&gt;setWindowTitle(&quot;New Window Title&quot;);</pre>
 
1568
<p>See also <a href="qwidget.html#isWindow">isWindow</a>().</p>
 
1569
<h3 class="fn"><a name="windowRole"></a><a href="qstring.html">QString</a> QWidget::windowRole () const</h3>
 
1570
<p>Returns the window's role, or an empty string.</p>
 
1571
<p>See also <a href="qwidget.html#windowIcon-prop">windowIcon</a> and <a href="qwidget.html#windowTitle-prop">windowTitle</a>.</p>
 
1572
<h3 class="fn"><a name="windowState"></a><a href="qt.html#WindowState-enum">Qt::WindowStates</a> QWidget::windowState () const</h3>
 
1573
<p>Returns the current window state. The window state is a OR'ed combination of <a href="qt.html#WindowState-enum">Qt::WindowState</a>: <tt>Qt::WindowMinimized</tt>, <tt>Qt::WindowMaximized</tt>, <tt>Qt::WindowFullScreen</tt> and <tt>Qt::WindowActive</tt>.</p>
 
1574
<p>See also <a href="qt.html#WindowState-enum">Qt::WindowState</a> and <a href="qwidget.html#setWindowState">setWindowState</a>().</p>
 
1575
<h3 class="fn"><a name="windowType"></a><a href="qt.html#WindowType-enum">Qt::WindowType</a> QWidget::windowType () const</h3>
 
1576
<p>Returns the window type of this widget. This is identical to <a href="qwidget.html#windowFlags-prop">windowFlags</a>() &amp; <a href="qt.html#WindowType-enum">Qt::WindowType_Mask</a>.</p>
 
1577
<p>See also <a href="qwidget.html#windowFlags-prop">windowFlags</a>.</p>
 
1578
<h3 class="fn"><a name="x11Event"></a>bool QWidget::x11Event ( XEvent * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
1579
<p>This special event handler can be reimplemented in a subclass to receive native <a href="winsystem.html#x11">X11</a> events which are passed in the <i>event</i> parameter.</p>
 
1580
<p>In your reimplementation of this function, if you want to stop the event being handled by Qt, return true. If you return false, this native event is passed back to Qt, which translates the event into a Qt event and sends it to the widget.</p>
 
1581
<p><b>Warning:</b> This function is not portable.</p>
 
1582
<p>See also <a href="qapplication.html#x11EventFilter">QApplication::x11EventFilter</a>().</p>
 
1583
<h3 class="fn"><a name="x11PictureHandle"></a><a href="qt.html#HANDLE-typedef">Qt::HANDLE</a> QWidget::x11PictureHandle () const</h3>
 
1584
<p>Returns the <a href="winsystem.html#x11">X11</a> Picture handle of the widget for XRender support. Use of this function is not portable. This function will return 0 if XRender support is not compiled into Qt, if the XRender extension is not supported on the <a href="winsystem.html#x11">X11</a> display, or if the handle could not be created.</p>
 
1585
<p /><address><hr /><div align="center">
 
1586
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
1587
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
1588
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
1589
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
1590
</tr></table></div></address></body>
 
1591
</html>