source: trunk/doc/html/qwidget.html@ 190

Last change on this file since 190 was 190, checked in by rudi, 14 years ago

reference documentation added

File size: 234.9 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/kernel/qwidget.cpp:69 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>QWidget Class</title>
7<style type="text/css"><!--
8fn { margin-left: 1cm; text-indent: -1cm; }
9a:link { color: #004faf; text-decoration: none }
10a:visited { color: #672967; text-decoration: none }
11body { background: #ffffff; color: black; }
12--></style>
13</head>
14<body>
15
16<table border="0" cellpadding="0" cellspacing="0" width="100%">
17<tr bgcolor="#E5E5E5">
18<td valign=center>
19 <a href="index.html">
20<font color="#004faf">Home</font></a>
21 | <a href="classes.html">
22<font color="#004faf">All&nbsp;Classes</font></a>
23 | <a href="mainclasses.html">
24<font color="#004faf">Main&nbsp;Classes</font></a>
25 | <a href="annotated.html">
26<font color="#004faf">Annotated</font></a>
27 | <a href="groups.html">
28<font color="#004faf">Grouped&nbsp;Classes</font></a>
29 | <a href="functions.html">
30<font color="#004faf">Functions</font></a>
31</td>
32<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QWidget Class Reference</h1>
33
34<p>The QWidget class is the base class of all user interface objects.
35<a href="#details">More...</a>
36<p><tt>#include &lt;<a href="qwidget-h.html">qwidget.h</a>&gt;</tt>
37<p>Inherits <a href="qobject.html">QObject</a> and <a href="qpaintdevice.html">QPaintDevice</a>.
38<p>Inherited by <a href="qaxwidget.html">QAxWidget</a>, <a href="qbutton.html">QButton</a>, <a href="qframe.html">QFrame</a>, <a href="qdialog.html">QDialog</a>, <a href="qcombobox.html">QComboBox</a>, <a href="qdatabrowser.html">QDataBrowser</a>, <a href="qdataview.html">QDataView</a>, <a href="qdatetimeeditbase.html">QDateTimeEditBase</a>, <a href="qdatetimeedit.html">QDateTimeEdit</a>, <a href="qdesktopwidget.html">QDesktopWidget</a>, <a href="qdial.html">QDial</a>, <a href="qdockarea.html">QDockArea</a>, <a href="qglwidget.html">QGLWidget</a>, <a href="qheader.html">QHeader</a>, <a href="qmainwindow.html">QMainWindow</a>, <a href="qmotifwidget.html">QMotifWidget</a>, <a href="qnpwidget.html">QNPWidget</a>, <a href="qscrollbar.html">QScrollBar</a>, <a href="qsizegrip.html">QSizeGrip</a>, <a href="qslider.html">QSlider</a>, <a href="qspinbox.html">QSpinBox</a>, <a href="qsplashscreen.html">QSplashScreen</a>, <a href="qstatusbar.html">QStatusBar</a>, <a href="qtabbar.html">QTabBar</a>, <a href="qtabwidget.html">QTabWidget</a>, <a href="qworkspace.html">QWorkspace</a>, and <a href="qxtwidget.html">QXtWidget</a>.
39<p><a href="qwidget-members.html">List of all member functions.</a>
40<h2>Public Members</h2>
41<ul>
42<li class=fn>explicit <a href="#QWidget"><b>QWidget</b></a> ( QWidget&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0, WFlags&nbsp;f = 0 )</li>
43<li class=fn><a href="#~QWidget"><b>~QWidget</b></a> ()</li>
44<li class=fn>WId <a href="#winId"><b>winId</b></a> () const</li>
45<li class=fn>QStyle &amp; <a href="#style"><b>style</b></a> () const</li>
46<li class=fn>void <a href="#setStyle"><b>setStyle</b></a> ( QStyle&nbsp;*&nbsp;style )</li>
47<li class=fn>QStyle * <a href="#setStyle-2"><b>setStyle</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;style )</li>
48<li class=fn>bool <a href="#isTopLevel"><b>isTopLevel</b></a> () const</li>
49<li class=fn>bool <a href="#isDialog"><b>isDialog</b></a> () const</li>
50<li class=fn>bool <a href="#isPopup"><b>isPopup</b></a> () const</li>
51<li class=fn>bool <a href="#isDesktop"><b>isDesktop</b></a> () const</li>
52<li class=fn>bool <a href="#isModal"><b>isModal</b></a> () const</li>
53<li class=fn>bool <a href="#isEnabled"><b>isEnabled</b></a> () const</li>
54<li class=fn>bool <a href="#isEnabledTo"><b>isEnabledTo</b></a> ( QWidget&nbsp;*&nbsp;ancestor ) const</li>
55<li class=fn>bool isEnabledToTLW () const &nbsp;<em>(obsolete)</em></li>
56<li class=fn>QRect <a href="#frameGeometry"><b>frameGeometry</b></a> () const</li>
57<li class=fn>const QRect &amp; <a href="#geometry"><b>geometry</b></a> () const</li>
58<li class=fn>int <a href="#x"><b>x</b></a> () const</li>
59<li class=fn>int <a href="#y"><b>y</b></a> () const</li>
60<li class=fn>QPoint <a href="#pos"><b>pos</b></a> () const</li>
61<li class=fn>QSize <a href="#frameSize"><b>frameSize</b></a> () const</li>
62<li class=fn>QSize <a href="#size"><b>size</b></a> () const</li>
63<li class=fn>int <a href="#width"><b>width</b></a> () const</li>
64<li class=fn>int <a href="#height"><b>height</b></a> () const</li>
65<li class=fn>QRect <a href="#rect"><b>rect</b></a> () const</li>
66<li class=fn>QRect <a href="#childrenRect"><b>childrenRect</b></a> () const</li>
67<li class=fn>QRegion <a href="#childrenRegion"><b>childrenRegion</b></a> () const</li>
68<li class=fn>QSize <a href="#minimumSize"><b>minimumSize</b></a> () const</li>
69<li class=fn>QSize <a href="#maximumSize"><b>maximumSize</b></a> () const</li>
70<li class=fn>int <a href="#minimumWidth"><b>minimumWidth</b></a> () const</li>
71<li class=fn>int <a href="#minimumHeight"><b>minimumHeight</b></a> () const</li>
72<li class=fn>int <a href="#maximumWidth"><b>maximumWidth</b></a> () const</li>
73<li class=fn>int <a href="#maximumHeight"><b>maximumHeight</b></a> () const</li>
74<li class=fn>void <a href="#setMinimumSize"><b>setMinimumSize</b></a> ( const QSize &amp; )</li>
75<li class=fn>virtual void <a href="#setMinimumSize-2"><b>setMinimumSize</b></a> ( int&nbsp;minw, int&nbsp;minh )</li>
76<li class=fn>void <a href="#setMaximumSize"><b>setMaximumSize</b></a> ( const QSize &amp; )</li>
77<li class=fn>virtual void <a href="#setMaximumSize-2"><b>setMaximumSize</b></a> ( int&nbsp;maxw, int&nbsp;maxh )</li>
78<li class=fn>void <a href="#setMinimumWidth"><b>setMinimumWidth</b></a> ( int&nbsp;minw )</li>
79<li class=fn>void <a href="#setMinimumHeight"><b>setMinimumHeight</b></a> ( int&nbsp;minh )</li>
80<li class=fn>void <a href="#setMaximumWidth"><b>setMaximumWidth</b></a> ( int&nbsp;maxw )</li>
81<li class=fn>void <a href="#setMaximumHeight"><b>setMaximumHeight</b></a> ( int&nbsp;maxh )</li>
82<li class=fn>QSize <a href="#sizeIncrement"><b>sizeIncrement</b></a> () const</li>
83<li class=fn>void <a href="#setSizeIncrement"><b>setSizeIncrement</b></a> ( const QSize &amp; )</li>
84<li class=fn>virtual void <a href="#setSizeIncrement-2"><b>setSizeIncrement</b></a> ( int&nbsp;w, int&nbsp;h )</li>
85<li class=fn>QSize <a href="#baseSize"><b>baseSize</b></a> () const</li>
86<li class=fn>void <a href="#setBaseSize"><b>setBaseSize</b></a> ( const QSize &amp; )</li>
87<li class=fn>void <a href="#setBaseSize-2"><b>setBaseSize</b></a> ( int&nbsp;basew, int&nbsp;baseh )</li>
88<li class=fn>void <a href="#setFixedSize"><b>setFixedSize</b></a> ( const&nbsp;QSize&nbsp;&amp;&nbsp;s )</li>
89<li class=fn>void <a href="#setFixedSize-2"><b>setFixedSize</b></a> ( int&nbsp;w, int&nbsp;h )</li>
90<li class=fn>void <a href="#setFixedWidth"><b>setFixedWidth</b></a> ( int&nbsp;w )</li>
91<li class=fn>void <a href="#setFixedHeight"><b>setFixedHeight</b></a> ( int&nbsp;h )</li>
92<li class=fn>QPoint <a href="#mapToGlobal"><b>mapToGlobal</b></a> ( const&nbsp;QPoint&nbsp;&amp;&nbsp;pos ) const</li>
93<li class=fn>QPoint <a href="#mapFromGlobal"><b>mapFromGlobal</b></a> ( const&nbsp;QPoint&nbsp;&amp;&nbsp;pos ) const</li>
94<li class=fn>QPoint <a href="#mapToParent"><b>mapToParent</b></a> ( const&nbsp;QPoint&nbsp;&amp;&nbsp;pos ) const</li>
95<li class=fn>QPoint <a href="#mapFromParent"><b>mapFromParent</b></a> ( const&nbsp;QPoint&nbsp;&amp;&nbsp;pos ) const</li>
96<li class=fn>QPoint <a href="#mapTo"><b>mapTo</b></a> ( QWidget&nbsp;*&nbsp;parent, const&nbsp;QPoint&nbsp;&amp;&nbsp;pos ) const</li>
97<li class=fn>QPoint <a href="#mapFrom"><b>mapFrom</b></a> ( QWidget&nbsp;*&nbsp;parent, const&nbsp;QPoint&nbsp;&amp;&nbsp;pos ) const</li>
98<li class=fn>QWidget * <a href="#topLevelWidget"><b>topLevelWidget</b></a> () const</li>
99<li class=fn>BackgroundMode <a href="#backgroundMode"><b>backgroundMode</b></a> () const</li>
100<li class=fn>virtual void <a href="#setBackgroundMode"><b>setBackgroundMode</b></a> ( BackgroundMode )</li>
101<li class=fn>void <a href="#setBackgroundMode-2"><b>setBackgroundMode</b></a> ( BackgroundMode&nbsp;m, BackgroundMode&nbsp;visual )</li>
102<li class=fn>const QColor &amp; <a href="#foregroundColor"><b>foregroundColor</b></a> () const</li>
103<li class=fn>const QColor &amp; <a href="#eraseColor"><b>eraseColor</b></a> () const</li>
104<li class=fn>virtual void <a href="#setEraseColor"><b>setEraseColor</b></a> ( const&nbsp;QColor&nbsp;&amp;&nbsp;color )</li>
105<li class=fn>const QPixmap * <a href="#erasePixmap"><b>erasePixmap</b></a> () const</li>
106<li class=fn>virtual void <a href="#setErasePixmap"><b>setErasePixmap</b></a> ( const&nbsp;QPixmap&nbsp;&amp;&nbsp;pixmap )</li>
107<li class=fn>const QColorGroup &amp; <a href="#colorGroup"><b>colorGroup</b></a> () const</li>
108<li class=fn>const QPalette &amp; <a href="#palette"><b>palette</b></a> () const</li>
109<li class=fn>bool <a href="#ownPalette"><b>ownPalette</b></a> () const</li>
110<li class=fn>virtual void <a href="#setPalette"><b>setPalette</b></a> ( const QPalette &amp; )</li>
111<li class=fn>void <a href="#unsetPalette"><b>unsetPalette</b></a> ()</li>
112<li class=fn>const QColor &amp; <a href="#paletteForegroundColor"><b>paletteForegroundColor</b></a> () const</li>
113<li class=fn>void <a href="#setPaletteForegroundColor"><b>setPaletteForegroundColor</b></a> ( const QColor &amp; )</li>
114<li class=fn>const QColor &amp; <a href="#paletteBackgroundColor"><b>paletteBackgroundColor</b></a> () const</li>
115<li class=fn>virtual void <a href="#setPaletteBackgroundColor"><b>setPaletteBackgroundColor</b></a> ( const QColor &amp; )</li>
116<li class=fn>const QPixmap * <a href="#paletteBackgroundPixmap"><b>paletteBackgroundPixmap</b></a> () const</li>
117<li class=fn>virtual void <a href="#setPaletteBackgroundPixmap"><b>setPaletteBackgroundPixmap</b></a> ( const QPixmap &amp; )</li>
118<li class=fn>const QBrush &amp; <a href="#backgroundBrush"><b>backgroundBrush</b></a> () const</li>
119<li class=fn>QFont <a href="#font"><b>font</b></a> () const</li>
120<li class=fn>bool <a href="#ownFont"><b>ownFont</b></a> () const</li>
121<li class=fn>virtual void <a href="#setFont"><b>setFont</b></a> ( const QFont &amp; )</li>
122<li class=fn>void <a href="#unsetFont"><b>unsetFont</b></a> ()</li>
123<li class=fn>QFontMetrics <a href="#fontMetrics"><b>fontMetrics</b></a> () const</li>
124<li class=fn>QFontInfo <a href="#fontInfo"><b>fontInfo</b></a> () const</li>
125<li class=fn>const QCursor &amp; <a href="#cursor"><b>cursor</b></a> () const</li>
126<li class=fn>bool <a href="#ownCursor"><b>ownCursor</b></a> () const</li>
127<li class=fn>virtual void <a href="#setCursor"><b>setCursor</b></a> ( const QCursor &amp; )</li>
128<li class=fn>virtual void <a href="#unsetCursor"><b>unsetCursor</b></a> ()</li>
129<li class=fn>QString <a href="#caption"><b>caption</b></a> () const</li>
130<li class=fn>const QPixmap * <a href="#icon"><b>icon</b></a> () const</li>
131<li class=fn>QString <a href="#iconText"><b>iconText</b></a> () const</li>
132<li class=fn>bool <a href="#hasMouseTracking"><b>hasMouseTracking</b></a> () const</li>
133<li class=fn>bool <a href="#hasMouse"><b>hasMouse</b></a> () const</li>
134<li class=fn>virtual void <a href="#setMask"><b>setMask</b></a> ( const&nbsp;QBitmap&nbsp;&amp;&nbsp;bitmap )</li>
135<li class=fn>virtual void <a href="#setMask-2"><b>setMask</b></a> ( const&nbsp;QRegion&nbsp;&amp;&nbsp;region )</li>
136<li class=fn>void <a href="#clearMask"><b>clearMask</b></a> ()</li>
137<li class=fn>const QColor &amp; backgroundColor () const &nbsp;<em>(obsolete)</em></li>
138<li class=fn>virtual void setBackgroundColor ( const&nbsp;QColor&nbsp;&amp;&nbsp;c ) &nbsp;<em>(obsolete)</em></li>
139<li class=fn>const QPixmap * backgroundPixmap () const &nbsp;<em>(obsolete)</em></li>
140<li class=fn>virtual void setBackgroundPixmap ( const&nbsp;QPixmap&nbsp;&amp;&nbsp;pm ) &nbsp;<em>(obsolete)</em></li>
141<li class=fn>enum <a href="#FocusPolicy-enum"><b>FocusPolicy</b></a> { NoFocus = 0, TabFocus = 0x1, ClickFocus = 0x2, StrongFocus = TabFocus | ClickFocus | 0x8, WheelFocus = StrongFocus | 0x4 }</li>
142<li class=fn>bool <a href="#isActiveWindow"><b>isActiveWindow</b></a> () const</li>
143<li class=fn>virtual void <a href="#setActiveWindow"><b>setActiveWindow</b></a> ()</li>
144<li class=fn>bool <a href="#isFocusEnabled"><b>isFocusEnabled</b></a> () const</li>
145<li class=fn>FocusPolicy <a href="#focusPolicy"><b>focusPolicy</b></a> () const</li>
146<li class=fn>virtual void <a href="#setFocusPolicy"><b>setFocusPolicy</b></a> ( FocusPolicy )</li>
147<li class=fn>bool <a href="#hasFocus"><b>hasFocus</b></a> () const</li>
148<li class=fn>virtual void <a href="#setFocusProxy"><b>setFocusProxy</b></a> ( QWidget&nbsp;*&nbsp;w )</li>
149<li class=fn>QWidget * <a href="#focusProxy"><b>focusProxy</b></a> () const</li>
150<li class=fn>void <a href="#setInputMethodEnabled"><b>setInputMethodEnabled</b></a> ( bool&nbsp;b )</li>
151<li class=fn>bool <a href="#isInputMethodEnabled"><b>isInputMethodEnabled</b></a> () const</li>
152<li class=fn>void <a href="#grabMouse"><b>grabMouse</b></a> ()</li>
153<li class=fn>void <a href="#grabMouse-2"><b>grabMouse</b></a> ( const&nbsp;QCursor&nbsp;&amp;&nbsp;cursor )</li>
154<li class=fn>void <a href="#releaseMouse"><b>releaseMouse</b></a> ()</li>
155<li class=fn>void <a href="#grabKeyboard"><b>grabKeyboard</b></a> ()</li>
156<li class=fn>void <a href="#releaseKeyboard"><b>releaseKeyboard</b></a> ()</li>
157<li class=fn>bool <a href="#isUpdatesEnabled"><b>isUpdatesEnabled</b></a> () const</li>
158<li class=fn>virtual bool <a href="#close-2"><b>close</b></a> ( bool&nbsp;alsoDelete )</li>
159<li class=fn>bool <a href="#isVisible"><b>isVisible</b></a> () const</li>
160<li class=fn>bool <a href="#isVisibleTo"><b>isVisibleTo</b></a> ( QWidget&nbsp;*&nbsp;ancestor ) const</li>
161<li class=fn>bool isVisibleToTLW () const &nbsp;<em>(obsolete)</em></li>
162<li class=fn>QRect visibleRect () const &nbsp;<em>(obsolete)</em></li>
163<li class=fn>bool <a href="#isHidden"><b>isHidden</b></a> () const</li>
164<li class=fn>bool <a href="#isShown"><b>isShown</b></a> () const</li>
165<li class=fn>bool <a href="#isMinimized"><b>isMinimized</b></a> () const</li>
166<li class=fn>bool <a href="#isMaximized"><b>isMaximized</b></a> () const</li>
167<li class=fn>bool <a href="#isFullScreen"><b>isFullScreen</b></a> () const</li>
168<li class=fn>uint <a href="#windowState"><b>windowState</b></a> () const</li>
169<li class=fn>void <a href="#setWindowState"><b>setWindowState</b></a> ( uint&nbsp;windowState )</li>
170<li class=fn>virtual QSize <a href="#sizeHint"><b>sizeHint</b></a> () const</li>
171<li class=fn>virtual QSize <a href="#minimumSizeHint"><b>minimumSizeHint</b></a> () const</li>
172<li class=fn>virtual QSizePolicy <a href="#sizePolicy"><b>sizePolicy</b></a> () const</li>
173<li class=fn>virtual void <a href="#setSizePolicy"><b>setSizePolicy</b></a> ( QSizePolicy )</li>
174<li class=fn>void <a href="#setSizePolicy-2"><b>setSizePolicy</b></a> ( QSizePolicy::SizeType&nbsp;hor, QSizePolicy::SizeType&nbsp;ver, bool&nbsp;hfw = FALSE )</li>
175<li class=fn>virtual int <a href="#heightForWidth"><b>heightForWidth</b></a> ( int&nbsp;w ) const</li>
176<li class=fn>QRegion <a href="#clipRegion"><b>clipRegion</b></a> () const</li>
177<li class=fn>QLayout * <a href="#layout"><b>layout</b></a> () const</li>
178<li class=fn>void <a href="#updateGeometry"><b>updateGeometry</b></a> ()</li>
179<li class=fn>virtual void <a href="#reparent"><b>reparent</b></a> ( QWidget&nbsp;*&nbsp;parent, WFlags&nbsp;f, const&nbsp;QPoint&nbsp;&amp;&nbsp;p, bool&nbsp;showIt = FALSE )</li>
180<li class=fn>void <a href="#reparent-2"><b>reparent</b></a> ( QWidget&nbsp;*&nbsp;parent, const&nbsp;QPoint&nbsp;&amp;&nbsp;p, bool&nbsp;showIt = FALSE )</li>
181<li class=fn>void recreate ( QWidget&nbsp;*&nbsp;parent, WFlags&nbsp;f, const&nbsp;QPoint&nbsp;&amp;&nbsp;p, bool&nbsp;showIt = FALSE ) &nbsp;<em>(obsolete)</em></li>
182<li class=fn>void <a href="#erase-2"><b>erase</b></a> ()</li>
183<li class=fn>void <a href="#erase"><b>erase</b></a> ( int&nbsp;x, int&nbsp;y, int&nbsp;w, int&nbsp;h )</li>
184<li class=fn>void <a href="#erase-3"><b>erase</b></a> ( const&nbsp;QRect&nbsp;&amp;&nbsp;r )</li>
185<li class=fn>void <a href="#erase-4"><b>erase</b></a> ( const&nbsp;QRegion&nbsp;&amp;&nbsp;reg )</li>
186<li class=fn>void <a href="#scroll"><b>scroll</b></a> ( int&nbsp;dx, int&nbsp;dy )</li>
187<li class=fn>void <a href="#scroll-2"><b>scroll</b></a> ( int&nbsp;dx, int&nbsp;dy, const&nbsp;QRect&nbsp;&amp;&nbsp;r )</li>
188<li class=fn>void <a href="#drawText"><b>drawText</b></a> ( int&nbsp;x, int&nbsp;y, const&nbsp;QString&nbsp;&amp;&nbsp;str )</li>
189<li class=fn>void <a href="#drawText-2"><b>drawText</b></a> ( const&nbsp;QPoint&nbsp;&amp;&nbsp;pos, const&nbsp;QString&nbsp;&amp;&nbsp;str )</li>
190<li class=fn>QWidget * <a href="#focusWidget"><b>focusWidget</b></a> () const</li>
191<li class=fn>QRect <a href="#microFocusHint"><b>microFocusHint</b></a> () const</li>
192<li class=fn>bool <a href="#acceptDrops"><b>acceptDrops</b></a> () const</li>
193<li class=fn>virtual void <a href="#setAcceptDrops"><b>setAcceptDrops</b></a> ( bool&nbsp;on )</li>
194<li class=fn>virtual void <a href="#setAutoMask"><b>setAutoMask</b></a> ( bool )</li>
195<li class=fn>bool <a href="#autoMask"><b>autoMask</b></a> () const</li>
196<li class=fn>enum <a href="#BackgroundOrigin-enum"><b>BackgroundOrigin</b></a> { WidgetOrigin, ParentOrigin, WindowOrigin, AncestorOrigin }</li>
197<li class=fn>virtual void <a href="#setBackgroundOrigin"><b>setBackgroundOrigin</b></a> ( BackgroundOrigin )</li>
198<li class=fn>BackgroundOrigin <a href="#backgroundOrigin"><b>backgroundOrigin</b></a> () const</li>
199<li class=fn>virtual bool <a href="#customWhatsThis"><b>customWhatsThis</b></a> () const</li>
200<li class=fn>QWidget * <a href="#parentWidget"><b>parentWidget</b></a> ( bool&nbsp;sameWindow = FALSE ) const</li>
201<li class=fn>WFlags <a href="#testWFlags"><b>testWFlags</b></a> ( WFlags&nbsp;f ) const</li>
202<li class=fn>QWidget * <a href="#childAt"><b>childAt</b></a> ( int&nbsp;x, int&nbsp;y, bool&nbsp;includeThis = FALSE ) const</li>
203<li class=fn>QWidget * <a href="#childAt-2"><b>childAt</b></a> ( const&nbsp;QPoint&nbsp;&amp;&nbsp;p, bool&nbsp;includeThis = FALSE ) const</li>
204<li class=fn>void <a href="#setWindowOpacity"><b>setWindowOpacity</b></a> ( double&nbsp;level )</li>
205<li class=fn>double <a href="#windowOpacity"><b>windowOpacity</b></a> () const</li>
206<li class=fn>void setPalette ( const&nbsp;QPalette&nbsp;&amp;&nbsp;p, bool ) &nbsp;<em>(obsolete)</em></li>
207<li class=fn>void setFont ( const&nbsp;QFont&nbsp;&amp;&nbsp;f, bool ) &nbsp;<em>(obsolete)</em></li>
208</ul>
209<h2>Public Slots</h2>
210<ul>
211<li class=fn>virtual void <a href="#setEnabled"><b>setEnabled</b></a> ( bool )</li>
212<li class=fn>void <a href="#setDisabled"><b>setDisabled</b></a> ( bool&nbsp;disable )</li>
213<li class=fn>virtual void <a href="#setCaption"><b>setCaption</b></a> ( const QString &amp; )</li>
214<li class=fn>virtual void <a href="#setIcon"><b>setIcon</b></a> ( const QPixmap &amp; )</li>
215<li class=fn>virtual void <a href="#setIconText"><b>setIconText</b></a> ( const QString &amp; )</li>
216<li class=fn>virtual void <a href="#setMouseTracking"><b>setMouseTracking</b></a> ( bool&nbsp;enable )</li>
217<li class=fn>virtual void <a href="#setFocus"><b>setFocus</b></a> ()</li>
218<li class=fn>void <a href="#clearFocus"><b>clearFocus</b></a> ()</li>
219<li class=fn>virtual void <a href="#setUpdatesEnabled"><b>setUpdatesEnabled</b></a> ( bool&nbsp;enable )</li>
220<li class=fn>void <a href="#update"><b>update</b></a> ()</li>
221<li class=fn>void <a href="#update-2"><b>update</b></a> ( int&nbsp;x, int&nbsp;y, int&nbsp;w, int&nbsp;h )</li>
222<li class=fn>void <a href="#update-3"><b>update</b></a> ( const&nbsp;QRect&nbsp;&amp;&nbsp;r )</li>
223<li class=fn>void <a href="#repaint-2"><b>repaint</b></a> ()</li>
224<li class=fn>void <a href="#repaint-3"><b>repaint</b></a> ( bool&nbsp;erase )</li>
225<li class=fn>void <a href="#repaint"><b>repaint</b></a> ( int&nbsp;x, int&nbsp;y, int&nbsp;w, int&nbsp;h, bool&nbsp;erase = TRUE )</li>
226<li class=fn>void <a href="#repaint-4"><b>repaint</b></a> ( const&nbsp;QRect&nbsp;&amp;&nbsp;r, bool&nbsp;erase = TRUE )</li>
227<li class=fn>void <a href="#repaint-5"><b>repaint</b></a> ( const&nbsp;QRegion&nbsp;&amp;&nbsp;reg, bool&nbsp;erase = TRUE )</li>
228<li class=fn>virtual void <a href="#show"><b>show</b></a> ()</li>
229<li class=fn>virtual void <a href="#hide"><b>hide</b></a> ()</li>
230<li class=fn>void <a href="#setShown"><b>setShown</b></a> ( bool&nbsp;show )</li>
231<li class=fn>void <a href="#setHidden"><b>setHidden</b></a> ( bool&nbsp;hide )</li>
232<li class=fn>void iconify () &nbsp;<em>(obsolete)</em></li>
233<li class=fn>virtual void <a href="#showMinimized"><b>showMinimized</b></a> ()</li>
234<li class=fn>virtual void <a href="#showMaximized"><b>showMaximized</b></a> ()</li>
235<li class=fn>void <a href="#showFullScreen"><b>showFullScreen</b></a> ()</li>
236<li class=fn>virtual void <a href="#showNormal"><b>showNormal</b></a> ()</li>
237<li class=fn>virtual void <a href="#polish"><b>polish</b></a> ()</li>
238<li class=fn>void <a href="#constPolish"><b>constPolish</b></a> () const</li>
239<li class=fn>bool <a href="#close"><b>close</b></a> ()</li>
240<li class=fn>void <a href="#raise"><b>raise</b></a> ()</li>
241<li class=fn>void <a href="#lower"><b>lower</b></a> ()</li>
242<li class=fn>void <a href="#stackUnder"><b>stackUnder</b></a> ( QWidget&nbsp;*&nbsp;w )</li>
243<li class=fn>virtual void <a href="#move-2"><b>move</b></a> ( int&nbsp;x, int&nbsp;y )</li>
244<li class=fn>void <a href="#move"><b>move</b></a> ( const QPoint &amp; )</li>
245<li class=fn>virtual void <a href="#resize-2"><b>resize</b></a> ( int&nbsp;w, int&nbsp;h )</li>
246<li class=fn>void <a href="#resize"><b>resize</b></a> ( const QSize &amp; )</li>
247<li class=fn>virtual void <a href="#setGeometry-2"><b>setGeometry</b></a> ( int&nbsp;x, int&nbsp;y, int&nbsp;w, int&nbsp;h )</li>
248<li class=fn>virtual void <a href="#setGeometry"><b>setGeometry</b></a> ( const QRect &amp; )</li>
249<li class=fn>virtual void <a href="#adjustSize"><b>adjustSize</b></a> ()</li>
250</ul>
251<h2>Static Public Members</h2>
252<ul>
253<li class=fn>void <a href="#setTabOrder"><b>setTabOrder</b></a> ( QWidget&nbsp;*&nbsp;first, QWidget&nbsp;*&nbsp;second )</li>
254<li class=fn>QWidget * <a href="#mouseGrabber"><b>mouseGrabber</b></a> ()</li>
255<li class=fn>QWidget * <a href="#keyboardGrabber"><b>keyboardGrabber</b></a> ()</li>
256<li class=fn>QWidget * <a href="#find"><b>find</b></a> ( WId&nbsp;id )</li>
257</ul>
258<h2>Properties</h2>
259<ul>
260<li class=fn>bool <a href="#acceptDrops-prop"><b>acceptDrops</b></a>&nbsp;- whether drop events are enabled for this widget</li>
261<li class=fn>bool <a href="#autoMask-prop"><b>autoMask</b></a>&nbsp;- whether the auto mask feature is enabled for the widget</li>
262<li class=fn>QBrush <a href="#backgroundBrush-prop"><b>backgroundBrush</b></a>&nbsp;- the widget's background brush &nbsp;<em>(read only)</em></li>
263<li class=fn>BackgroundMode <a href="#backgroundMode-prop"><b>backgroundMode</b></a>&nbsp;- the color role used for painting the background of the widget</li>
264<li class=fn>BackgroundOrigin <a href="#backgroundOrigin-prop"><b>backgroundOrigin</b></a>&nbsp;- the origin of the widget's background</li>
265<li class=fn>QSize <a href="#baseSize-prop"><b>baseSize</b></a>&nbsp;- the base size of the widget</li>
266<li class=fn>QString <a href="#caption-prop"><b>caption</b></a>&nbsp;- the window caption (title)</li>
267<li class=fn>QRect <a href="#childrenRect-prop"><b>childrenRect</b></a>&nbsp;- the bounding rectangle of the widget's children &nbsp;<em>(read only)</em></li>
268<li class=fn>QRegion <a href="#childrenRegion-prop"><b>childrenRegion</b></a>&nbsp;- the combined region occupied by the widget's children &nbsp;<em>(read only)</em></li>
269<li class=fn>QColorGroup <a href="#colorGroup-prop"><b>colorGroup</b></a>&nbsp;- the current color group of the widget palette &nbsp;<em>(read only)</em></li>
270<li class=fn>QCursor <a href="#cursor-prop"><b>cursor</b></a>&nbsp;- the cursor shape for this widget</li>
271<li class=fn>bool <a href="#customWhatsThis-prop"><b>customWhatsThis</b></a>&nbsp;- whether the widget wants to handle What's This help manually &nbsp;<em>(read only)</em></li>
272<li class=fn>bool <a href="#enabled-prop"><b>enabled</b></a>&nbsp;- whether the widget is enabled</li>
273<li class=fn>bool <a href="#focus-prop"><b>focus</b></a>&nbsp;- whether this widget (or its focus proxy) has the keyboard input focus &nbsp;<em>(read only)</em></li>
274<li class=fn>bool <a href="#focusEnabled-prop"><b>focusEnabled</b></a>&nbsp;- whether the widget accepts keyboard focus &nbsp;<em>(read only)</em></li>
275<li class=fn>FocusPolicy <a href="#focusPolicy-prop"><b>focusPolicy</b></a>&nbsp;- the way the widget accepts keyboard focus</li>
276<li class=fn>QFont <a href="#font-prop"><b>font</b></a>&nbsp;- the font currently set for the widget</li>
277<li class=fn>QRect <a href="#frameGeometry-prop"><b>frameGeometry</b></a>&nbsp;- geometry of the widget relative to its parent including any window frame &nbsp;<em>(read only)</em></li>
278<li class=fn>QSize <a href="#frameSize-prop"><b>frameSize</b></a>&nbsp;- the size of the widget including any window frame &nbsp;<em>(read only)</em></li>
279<li class=fn>bool <a href="#fullScreen-prop"><b>fullScreen</b></a>&nbsp;- whether the widget is full screen &nbsp;<em>(read only)</em></li>
280<li class=fn>QRect <a href="#geometry-prop"><b>geometry</b></a>&nbsp;- the geometry of the widget relative to its parent and excluding the window frame</li>
281<li class=fn>int <a href="#height-prop"><b>height</b></a>&nbsp;- the height of the widget excluding any window frame &nbsp;<em>(read only)</em></li>
282<li class=fn>bool <a href="#hidden-prop"><b>hidden</b></a>&nbsp;- whether the widget is explicitly hidden</li>
283<li class=fn>QPixmap <a href="#icon-prop"><b>icon</b></a>&nbsp;- the widget's icon</li>
284<li class=fn>QString <a href="#iconText-prop"><b>iconText</b></a>&nbsp;- the widget's icon text</li>
285<li class=fn>bool <a href="#inputMethodEnabled-prop"><b>inputMethodEnabled</b></a>&nbsp;- enables or disables the use of input methods for this widget</li>
286<li class=fn>bool <a href="#isActiveWindow-prop"><b>isActiveWindow</b></a>&nbsp;- whether this widget is the active window &nbsp;<em>(read only)</em></li>
287<li class=fn>bool <a href="#isDesktop-prop"><b>isDesktop</b></a>&nbsp;- whether the widget is a desktop widget, i.e. represents the desktop &nbsp;<em>(read only)</em></li>
288<li class=fn>bool <a href="#isDialog-prop"><b>isDialog</b></a>&nbsp;- whether the widget is a dialog widget &nbsp;<em>(read only)</em></li>
289<li class=fn>bool <a href="#isModal-prop"><b>isModal</b></a>&nbsp;- whether the widget is a modal widget &nbsp;<em>(read only)</em></li>
290<li class=fn>bool <a href="#isPopup-prop"><b>isPopup</b></a>&nbsp;- whether the widget is a popup widget &nbsp;<em>(read only)</em></li>
291<li class=fn>bool <a href="#isTopLevel-prop"><b>isTopLevel</b></a>&nbsp;- whether the widget is a top-level widget &nbsp;<em>(read only)</em></li>
292<li class=fn>bool <a href="#maximized-prop"><b>maximized</b></a>&nbsp;- whether this widget is maximized &nbsp;<em>(read only)</em></li>
293<li class=fn>int <a href="#maximumHeight-prop"><b>maximumHeight</b></a>&nbsp;- the widget's maximum height</li>
294<li class=fn>QSize <a href="#maximumSize-prop"><b>maximumSize</b></a>&nbsp;- the widget's maximum size</li>
295<li class=fn>int <a href="#maximumWidth-prop"><b>maximumWidth</b></a>&nbsp;- the widget's maximum width</li>
296<li class=fn>QRect <a href="#microFocusHint-prop"><b>microFocusHint</b></a>&nbsp;- the currently set micro focus hint for this widget &nbsp;<em>(read only)</em></li>
297<li class=fn>bool <a href="#minimized-prop"><b>minimized</b></a>&nbsp;- whether this widget is minimized (iconified) &nbsp;<em>(read only)</em></li>
298<li class=fn>int <a href="#minimumHeight-prop"><b>minimumHeight</b></a>&nbsp;- the widget's minimum height</li>
299<li class=fn>QSize <a href="#minimumSize-prop"><b>minimumSize</b></a>&nbsp;- the widget's minimum size</li>
300<li class=fn>QSize <a href="#minimumSizeHint-prop"><b>minimumSizeHint</b></a>&nbsp;- the recommended minimum size for the widget &nbsp;<em>(read only)</em></li>
301<li class=fn>int <a href="#minimumWidth-prop"><b>minimumWidth</b></a>&nbsp;- the widget's minimum width</li>
302<li class=fn>bool <a href="#mouseTracking-prop"><b>mouseTracking</b></a>&nbsp;- whether mouse tracking is enabled for the widget</li>
303<li class=fn>bool <a href="#ownCursor-prop"><b>ownCursor</b></a>&nbsp;- whether the widget uses its own cursor &nbsp;<em>(read only)</em></li>
304<li class=fn>bool <a href="#ownFont-prop"><b>ownFont</b></a>&nbsp;- whether the widget uses its own font &nbsp;<em>(read only)</em></li>
305<li class=fn>bool <a href="#ownPalette-prop"><b>ownPalette</b></a>&nbsp;- whether the widget uses its own palette &nbsp;<em>(read only)</em></li>
306<li class=fn>QPalette <a href="#palette-prop"><b>palette</b></a>&nbsp;- the widget's palette</li>
307<li class=fn>QColor <a href="#paletteBackgroundColor-prop"><b>paletteBackgroundColor</b></a>&nbsp;- the background color of the widget</li>
308<li class=fn>QPixmap <a href="#paletteBackgroundPixmap-prop"><b>paletteBackgroundPixmap</b></a>&nbsp;- the background pixmap of the widget</li>
309<li class=fn>QColor <a href="#paletteForegroundColor-prop"><b>paletteForegroundColor</b></a>&nbsp;- the foreground color of the widget</li>
310<li class=fn>QPoint <a href="#pos-prop"><b>pos</b></a>&nbsp;- the position of the widget within its parent widget</li>
311<li class=fn>QRect <a href="#rect-prop"><b>rect</b></a>&nbsp;- the internal geometry of the widget excluding any window frame &nbsp;<em>(read only)</em></li>
312<li class=fn>bool <a href="#shown-prop"><b>shown</b></a>&nbsp;- whether the widget is shown</li>
313<li class=fn>QSize <a href="#size-prop"><b>size</b></a>&nbsp;- the size of the widget excluding any window frame</li>
314<li class=fn>QSize <a href="#sizeHint-prop"><b>sizeHint</b></a>&nbsp;- the recommended size for the widget &nbsp;<em>(read only)</em></li>
315<li class=fn>QSize <a href="#sizeIncrement-prop"><b>sizeIncrement</b></a>&nbsp;- the size increment of the widget</li>
316<li class=fn>QSizePolicy <a href="#sizePolicy-prop"><b>sizePolicy</b></a>&nbsp;- the default layout behavior of the widget</li>
317<li class=fn>bool <a href="#underMouse-prop"><b>underMouse</b></a>&nbsp;- whether the widget is under the mouse cursor &nbsp;<em>(read only)</em></li>
318<li class=fn>bool <a href="#updatesEnabled-prop"><b>updatesEnabled</b></a>&nbsp;- whether updates are enabled</li>
319<li class=fn>bool <a href="#visible-prop"><b>visible</b></a>&nbsp;- whether the widget is visible &nbsp;<em>(read only)</em></li>
320<li class=fn>QRect visibleRect&nbsp;- the visible rectangle &nbsp;<em>(read only)</em> &nbsp;<em>(obsolete)</em></li>
321<li class=fn>int <a href="#width-prop"><b>width</b></a>&nbsp;- the width of the widget excluding any window frame &nbsp;<em>(read only)</em></li>
322<li class=fn>double <a href="#windowOpacity-prop"><b>windowOpacity</b></a>&nbsp;- the level of opacity for the window</li>
323<li class=fn>int <a href="#x-prop"><b>x</b></a>&nbsp;- the x coordinate of the widget relative to its parent including any window frame &nbsp;<em>(read only)</em></li>
324<li class=fn>int <a href="#y-prop"><b>y</b></a>&nbsp;- the y coordinate of the widget relative to its parent and including any window frame &nbsp;<em>(read only)</em></li>
325</ul>
326<h2>Protected Members</h2>
327<ul>
328<li class=fn>virtual bool <a href="#event"><b>event</b></a> ( QEvent&nbsp;*&nbsp;e )</li>
329<li class=fn>virtual void <a href="#mousePressEvent"><b>mousePressEvent</b></a> ( QMouseEvent&nbsp;*&nbsp;e )</li>
330<li class=fn>virtual void <a href="#mouseReleaseEvent"><b>mouseReleaseEvent</b></a> ( QMouseEvent&nbsp;*&nbsp;e )</li>
331<li class=fn>virtual void <a href="#mouseDoubleClickEvent"><b>mouseDoubleClickEvent</b></a> ( QMouseEvent&nbsp;*&nbsp;e )</li>
332<li class=fn>virtual void <a href="#mouseMoveEvent"><b>mouseMoveEvent</b></a> ( QMouseEvent&nbsp;*&nbsp;e )</li>
333<li class=fn>virtual void <a href="#wheelEvent"><b>wheelEvent</b></a> ( QWheelEvent&nbsp;*&nbsp;e )</li>
334<li class=fn>virtual void <a href="#keyPressEvent"><b>keyPressEvent</b></a> ( QKeyEvent&nbsp;*&nbsp;e )</li>
335<li class=fn>virtual void <a href="#keyReleaseEvent"><b>keyReleaseEvent</b></a> ( QKeyEvent&nbsp;*&nbsp;e )</li>
336<li class=fn>virtual void <a href="#focusInEvent"><b>focusInEvent</b></a> ( QFocusEvent * )</li>
337<li class=fn>virtual void <a href="#focusOutEvent"><b>focusOutEvent</b></a> ( QFocusEvent * )</li>
338<li class=fn>virtual void <a href="#enterEvent"><b>enterEvent</b></a> ( QEvent * )</li>
339<li class=fn>virtual void <a href="#leaveEvent"><b>leaveEvent</b></a> ( QEvent * )</li>
340<li class=fn>virtual void <a href="#paintEvent"><b>paintEvent</b></a> ( QPaintEvent * )</li>
341<li class=fn>virtual void <a href="#moveEvent"><b>moveEvent</b></a> ( QMoveEvent * )</li>
342<li class=fn>virtual void <a href="#resizeEvent"><b>resizeEvent</b></a> ( QResizeEvent * )</li>
343<li class=fn>virtual void <a href="#closeEvent"><b>closeEvent</b></a> ( QCloseEvent&nbsp;*&nbsp;e )</li>
344<li class=fn>virtual void <a href="#contextMenuEvent"><b>contextMenuEvent</b></a> ( QContextMenuEvent&nbsp;*&nbsp;e )</li>
345<li class=fn>virtual void <a href="#imStartEvent"><b>imStartEvent</b></a> ( QIMEvent&nbsp;*&nbsp;e )</li>
346<li class=fn>virtual void <a href="#imComposeEvent"><b>imComposeEvent</b></a> ( QIMEvent&nbsp;*&nbsp;e )</li>
347<li class=fn>virtual void <a href="#imEndEvent"><b>imEndEvent</b></a> ( QIMEvent&nbsp;*&nbsp;e )</li>
348<li class=fn>virtual void <a href="#tabletEvent"><b>tabletEvent</b></a> ( QTabletEvent&nbsp;*&nbsp;e )</li>
349<li class=fn>virtual void <a href="#dragEnterEvent"><b>dragEnterEvent</b></a> ( QDragEnterEvent * )</li>
350<li class=fn>virtual void <a href="#dragMoveEvent"><b>dragMoveEvent</b></a> ( QDragMoveEvent * )</li>
351<li class=fn>virtual void <a href="#dragLeaveEvent"><b>dragLeaveEvent</b></a> ( QDragLeaveEvent * )</li>
352<li class=fn>virtual void <a href="#dropEvent"><b>dropEvent</b></a> ( QDropEvent * )</li>
353<li class=fn>virtual void <a href="#showEvent"><b>showEvent</b></a> ( QShowEvent * )</li>
354<li class=fn>virtual void <a href="#hideEvent"><b>hideEvent</b></a> ( QHideEvent * )</li>
355<li class=fn>virtual bool <a href="#macEvent"><b>macEvent</b></a> ( MSG * )</li>
356<li class=fn>virtual bool <a href="#winEvent"><b>winEvent</b></a> ( MSG * )</li>
357<li class=fn>virtual bool <a href="#x11Event"><b>x11Event</b></a> ( XEvent * )</li>
358<li class=fn>virtual bool <a href="#qwsEvent"><b>qwsEvent</b></a> ( QWSEvent * )</li>
359<li class=fn>virtual void <a href="#updateMask"><b>updateMask</b></a> ()</li>
360<li class=fn>virtual void <a href="#styleChange"><b>styleChange</b></a> ( QStyle&nbsp;&amp;&nbsp;oldStyle )</li>
361<li class=fn>virtual void <a href="#enabledChange"><b>enabledChange</b></a> ( bool&nbsp;oldEnabled )</li>
362<li class=fn>virtual void <a href="#paletteChange"><b>paletteChange</b></a> ( const&nbsp;QPalette&nbsp;&amp;&nbsp;oldPalette )</li>
363<li class=fn>virtual void <a href="#fontChange"><b>fontChange</b></a> ( const&nbsp;QFont&nbsp;&amp;&nbsp;oldFont )</li>
364<li class=fn>virtual void <a href="#windowActivationChange"><b>windowActivationChange</b></a> ( bool&nbsp;oldActive )</li>
365<li class=fn>virtual int <a href="#metric"><b>metric</b></a> ( int&nbsp;m ) const</li>
366<li class=fn>void <a href="#resetInputContext"><b>resetInputContext</b></a> ()</li>
367<li class=fn>virtual void <a href="#create"><b>create</b></a> ( WId&nbsp;window = 0, bool&nbsp;initializeWindow = TRUE, bool&nbsp;destroyOldWindow = TRUE )</li>
368<li class=fn>virtual void <a href="#destroy"><b>destroy</b></a> ( bool&nbsp;destroyWindow = TRUE, bool&nbsp;destroySubWindows = TRUE )</li>
369<li class=fn>WFlags <a href="#getWFlags"><b>getWFlags</b></a> () const</li>
370<li class=fn>virtual void <a href="#setWFlags"><b>setWFlags</b></a> ( WFlags&nbsp;f )</li>
371<li class=fn>void <a href="#clearWFlags"><b>clearWFlags</b></a> ( WFlags&nbsp;f )</li>
372<li class=fn>virtual bool <a href="#focusNextPrevChild"><b>focusNextPrevChild</b></a> ( bool&nbsp;next )</li>
373<li class=fn>QFocusData * <a href="#focusData"><b>focusData</b></a> ()</li>
374<li class=fn>virtual void <a href="#setKeyCompression"><b>setKeyCompression</b></a> ( bool&nbsp;compress )</li>
375<li class=fn>virtual void <a href="#setMicroFocusHint"><b>setMicroFocusHint</b></a> ( int&nbsp;x, int&nbsp;y, int&nbsp;width, int&nbsp;height, bool&nbsp;text = TRUE, QFont&nbsp;*&nbsp;f = 0 )</li>
376</ul>
377<hr><a name="details"></a><h2>Detailed Description</h2>
378
379
380The QWidget class is the base class of all user interface objects.
381<p>
382
383<p> The widget is the atom of the user interface: it receives mouse,
384keyboard and other events from the window system, and paints a
385representation of itself on the screen. Every widget is
386rectangular, and they are sorted in a Z-order. A widget is
387clipped by its parent and by the widgets in front of it.
388<p> A widget that isn't embedded in a parent widget is called a
389top-level widget. Usually, top-level widgets are windows with a
390frame and a title bar (although it is also possible to create
391top-level widgets without such decoration if suitable widget flags
392are used). In Qt, <a href="qmainwindow.html">QMainWindow</a> and the various subclasses of
393<a href="qdialog.html">QDialog</a> are the most common top-level windows.
394<p> A widget without a parent widget is always a top-level widget.
395<p> Non-top-level widgets are child widgets. These are child windows
396in their parent widgets. You cannot usually distinguish a child
397widget from its parent visually. Most other widgets in Qt are
398useful only as child widgets. (It is possible to make, say, a
399button into a top-level widget, but most people prefer to put
400their buttons inside other widgets, e.g. QDialog.)
401<p> If you want to use a QWidget to hold child widgets you will
402probably want to add a layout to the parent QWidget. (See <a href="layout.html">Layouts</a>.)
403<p> QWidget has many member functions, but some of them have little
404direct functionality: for example, QWidget has a font property,
405but never uses this itself. There are many subclasses which
406provide real functionality, such as <a href="qpushbutton.html">QPushButton</a>, <a href="qlistbox.html">QListBox</a> and
407<a href="qtabdialog.html">QTabDialog</a>, etc.
408<p> <h3> Groups of functions:
409</h3>
410<a name="1"></a><p> <center><table cellpadding="4" cellspacing="2" border="0">
411<tr bgcolor="#a2c511"> <th valign="top">Context <th valign="top">Functions
412<tr bgcolor="#f0f0f0"> <td valign="top">Window functions <td valign="top">
413<a href="#show">show</a>(),
414<a href="#hide">hide</a>(),
415<a href="#raise">raise</a>(),
416<a href="#lower">lower</a>(),
417<a href="#close">close</a>().
418<tr bgcolor="#d0d0d0"> <td valign="top">Top level windows <td valign="top">
419<a href="#caption">caption</a>(),
420<a href="#setCaption">setCaption</a>(),
421<a href="#icon">icon</a>(),
422<a href="#setIcon">setIcon</a>(),
423<a href="#iconText">iconText</a>(),
424<a href="#setIconText">setIconText</a>(),
425<a href="#isActiveWindow">isActiveWindow</a>(),
426<a href="#setActiveWindow">setActiveWindow</a>(),
427<a href="#showMinimized">showMinimized</a>().
428<a href="#showMaximized">showMaximized</a>(),
429<a href="#showFullScreen">showFullScreen</a>(),
430<a href="#showNormal">showNormal</a>().
431<tr bgcolor="#f0f0f0"> <td valign="top">Window contents <td valign="top">
432<a href="#update">update</a>(),
433<a href="#repaint">repaint</a>(),
434<a href="#erase">erase</a>(),
435<a href="#scroll">scroll</a>(),
436<a href="#updateMask">updateMask</a>().
437<tr bgcolor="#d0d0d0"> <td valign="top">Geometry <td valign="top">
438<a href="#pos">pos</a>(),
439<a href="#size">size</a>(),
440<a href="#rect">rect</a>(),
441<a href="#x">x</a>(),
442<a href="#y">y</a>(),
443<a href="#width">width</a>(),
444<a href="#height">height</a>(),
445<a href="#sizePolicy">sizePolicy</a>(),
446<a href="#setSizePolicy">setSizePolicy</a>(),
447<a href="#sizeHint">sizeHint</a>(),
448<a href="#updateGeometry">updateGeometry</a>(),
449<a href="#layout">layout</a>(),
450<a href="#move">move</a>(),
451<a href="#resize">resize</a>(),
452<a href="#setGeometry">setGeometry</a>(),
453<a href="#frameGeometry">frameGeometry</a>(),
454<a href="#geometry">geometry</a>(),
455<a href="#childrenRect">childrenRect</a>(),
456<a href="#adjustSize">adjustSize</a>(),
457<a href="#mapFromGlobal">mapFromGlobal</a>(),
458<a href="#mapFromParent">mapFromParent</a>()
459<a href="#mapToGlobal">mapToGlobal</a>(),
460<a href="#mapToParent">mapToParent</a>(),
461<a href="#maximumSize">maximumSize</a>(),
462<a href="#minimumSize">minimumSize</a>(),
463<a href="#sizeIncrement">sizeIncrement</a>(),
464<a href="#setMaximumSize">setMaximumSize</a>(),
465<a href="#setMinimumSize">setMinimumSize</a>(),
466<a href="#setSizeIncrement">setSizeIncrement</a>(),
467<a href="#setBaseSize">setBaseSize</a>(),
468<a href="#setFixedSize">setFixedSize</a>()
469<tr bgcolor="#f0f0f0"> <td valign="top">Mode <td valign="top">
470<a href="#isVisible">isVisible</a>(),
471<a href="#isVisibleTo">isVisibleTo</a>(),
472<a href="#isMinimized">isMinimized</a>(),
473<a href="#isDesktop">isDesktop</a>(),
474<a href="#isEnabled">isEnabled</a>(),
475<a href="#isEnabledTo">isEnabledTo</a>(),
476<a href="#isModal">isModal</a>(),
477<a href="#isPopup">isPopup</a>(),
478<a href="#isTopLevel">isTopLevel</a>(),
479<a href="#setEnabled">setEnabled</a>(),
480<a href="#hasMouseTracking">hasMouseTracking</a>(),
481<a href="#setMouseTracking">setMouseTracking</a>(),
482<a href="#isUpdatesEnabled">isUpdatesEnabled</a>(),
483<a href="#setUpdatesEnabled">setUpdatesEnabled</a>(),
484<a href="#clipRegion">clipRegion</a>().
485<tr bgcolor="#d0d0d0"> <td valign="top">Look and feel <td valign="top">
486<a href="#style">style</a>(),
487<a href="#setStyle">setStyle</a>(),
488<a href="#cursor">cursor</a>(),
489<a href="#setCursor">setCursor</a>()
490<a href="#font">font</a>(),
491<a href="#setFont">setFont</a>(),
492<a href="#palette">palette</a>(),
493<a href="#setPalette">setPalette</a>(),
494<a href="#backgroundMode">backgroundMode</a>(),
495<a href="#setBackgroundMode">setBackgroundMode</a>(),
496<a href="#colorGroup">colorGroup</a>(),
497<a href="#fontMetrics">fontMetrics</a>(),
498<a href="#fontInfo">fontInfo</a>().
499<tr bgcolor="#f0f0f0"> <td valign="top"><a href="focus.html#keyboard-focus">Keyboard focus</a><br>functions <td valign="top">
500<a href="#isFocusEnabled">isFocusEnabled</a>(),
501<a href="#setFocusPolicy">setFocusPolicy</a>(),
502<a href="#focusPolicy">focusPolicy</a>(),
503<a href="#hasFocus">hasFocus</a>(),
504<a href="#setFocus">setFocus</a>(),
505<a href="#clearFocus">clearFocus</a>(),
506<a href="#setTabOrder">setTabOrder</a>(),
507<a href="#setFocusProxy">setFocusProxy</a>().
508<tr bgcolor="#d0d0d0"> <td valign="top">Mouse and<br>keyboard grabbing <td valign="top">
509<a href="#grabMouse">grabMouse</a>(),
510<a href="#releaseMouse">releaseMouse</a>(),
511<a href="#grabKeyboard">grabKeyboard</a>(),
512<a href="#releaseKeyboard">releaseKeyboard</a>(),
513<a href="#mouseGrabber">mouseGrabber</a>(),
514<a href="#keyboardGrabber">keyboardGrabber</a>().
515<tr bgcolor="#f0f0f0"> <td valign="top">Event handlers <td valign="top">
516<a href="#event">event</a>(),
517<a href="#mousePressEvent">mousePressEvent</a>(),
518<a href="#mouseReleaseEvent">mouseReleaseEvent</a>(),
519<a href="#mouseDoubleClickEvent">mouseDoubleClickEvent</a>(),
520<a href="#mouseMoveEvent">mouseMoveEvent</a>(),
521<a href="#keyPressEvent">keyPressEvent</a>(),
522<a href="#keyReleaseEvent">keyReleaseEvent</a>(),
523<a href="#focusInEvent">focusInEvent</a>(),
524<a href="#focusOutEvent">focusOutEvent</a>(),
525<a href="#wheelEvent">wheelEvent</a>(),
526<a href="#enterEvent">enterEvent</a>(),
527<a href="#leaveEvent">leaveEvent</a>(),
528<a href="#paintEvent">paintEvent</a>(),
529<a href="#moveEvent">moveEvent</a>(),
530<a href="#resizeEvent">resizeEvent</a>(),
531<a href="#closeEvent">closeEvent</a>(),
532<a href="#dragEnterEvent">dragEnterEvent</a>(),
533<a href="#dragMoveEvent">dragMoveEvent</a>(),
534<a href="#dragLeaveEvent">dragLeaveEvent</a>(),
535<a href="#dropEvent">dropEvent</a>(),
536<a href="qobject.html#childEvent">childEvent</a>(),
537<a href="#showEvent">showEvent</a>(),
538<a href="#hideEvent">hideEvent</a>(),
539<a href="qobject.html#customEvent">customEvent</a>().
540<tr bgcolor="#d0d0d0"> <td valign="top">Change handlers <td valign="top">
541<a href="#enabledChange">enabledChange</a>(),
542<a href="#fontChange">fontChange</a>(),
543<a href="#paletteChange">paletteChange</a>(),
544<a href="#styleChange">styleChange</a>(),
545<a href="#windowActivationChange">windowActivationChange</a>().
546<tr bgcolor="#f0f0f0"> <td valign="top">System functions <td valign="top">
547<a href="#parentWidget">parentWidget</a>(),
548<a href="#topLevelWidget">topLevelWidget</a>(),
549<a href="#reparent">reparent</a>(),
550<a href="#polish">polish</a>(),
551<a href="#winId">winId</a>(),
552<a href="#find">find</a>(),
553<a href="#metric">metric</a>().
554<tr bgcolor="#d0d0d0"> <td valign="top">What's this help <td valign="top">
555<a href="#customWhatsThis">customWhatsThis</a>()
556<tr bgcolor="#f0f0f0"> <td valign="top">Internal kernel<br>functions <td valign="top">
557<a href="#focusNextPrevChild">focusNextPrevChild</a>(),
558wmapper(),
559<a href="#clearWFlags">clearWFlags</a>(),
560<a href="#getWFlags">getWFlags</a>(),
561<a href="#setWFlags">setWFlags</a>(),
562<a href="#testWFlags">testWFlags</a>().
563<p> </table></center>
564<p> Every widget's constructor accepts two or three standard arguments:
565<ol type=1>
566<li> <tt>QWidget *parent = 0</tt> is the parent of the new widget.
567If it is 0 (the default), the new widget will be a top-level window.
568If not, it will be a child of <em>parent</em>, and be constrained by <em>parent</em>'s geometry (unless you specify <a href="qt.html#WidgetFlags-enum">WType_TopLevel</a> as
569<a href="qt.html#WidgetFlags">widget flag</a>).
570<li> <tt>const char *name = 0</tt> is the widget name of the new
571widget. You can access it using <a href="qobject.html#name">name</a>(). The widget name is little
572used by programmers but is quite useful with GUI builders such as
573<em>Qt Designer</em> (you can name a widget in <em>Qt Designer</em>, and
574<a href="qobject.html#connect">connect</a>() to it using the name in your code). The <a href="qobject.html#dumpObjectTree">dumpObjectTree</a>()
575debugging function also uses it.
576<li> <tt>WFlags f = 0</tt> (where available) sets the widget flags; the
577default is suitable for almost all widgets, but to get, for
578example, a top-level widget without a window system frame, you
579must use special flags.
580</ol>
581<p> The tictac/tictac.cpp example program is good example of a simple
582widget. It contains a few event handlers (as all widgets must), a
583few custom routines that are specific to it (as all useful widgets
584do), and has a few children and connections. Everything it does
585is done in response to an event: this is by far the most common way
586to design GUI applications.
587<p> You will need to supply the content for your widgets yourself, but
588here is a brief run-down of the events, starting with the most common
589ones:
590<p> <ul>
591<p> <li> <a href="#paintEvent">paintEvent</a>() - called whenever the widget needs to be
592repainted. Every widget which displays output must implement it,
593and it is wise <em>not</em> to paint on the screen outside
594paintEvent().
595<p> <li> <a href="#resizeEvent">resizeEvent</a>() - called when the widget has been resized.
596<p> <li> <a href="#mousePressEvent">mousePressEvent</a>() - called when a mouse button is pressed.
597There are six mouse-related events, but the mouse press and mouse
598release events are by far the most important. A widget receives
599mouse press events when the mouse is inside it, or when it has
600grabbed the mouse using <a href="#grabMouse">grabMouse</a>().
601<p> <li> <a href="#mouseReleaseEvent">mouseReleaseEvent</a>() - called when a mouse button is released.
602A widget receives mouse release events when it has received the
603corresponding mouse press event. This means that if the user
604presses the mouse inside <em>your</em> widget, then drags the mouse to
605somewhere else, then releases, <em>your</em> widget receives the release
606event. There is one exception: if a popup menu appears while the
607mouse button is held down, this popup immediately steals the mouse
608events.
609<p> <li> <a href="#mouseDoubleClickEvent">mouseDoubleClickEvent</a>() - not quite as obvious as it might seem.
610If the user double-clicks, the widget receives a mouse press event
611(perhaps a mouse move event or two if they don't hold the mouse
612quite steady), a mouse release event and finally this event. It is
613<em>not possible</em> to distinguish a click from a double click until you've
614seen whether the second click arrives. (This is one reason why most GUI
615books recommend that double clicks be an extension of single clicks,
616rather than trigger a different action.)
617<p> </ul>
618<p> If your widget only contains child widgets, you probably do not need to
619implement any event handlers. If you want to detect a mouse click in
620a child widget call the child's <a href="#hasMouse">hasMouse</a>() function inside the
621parent widget's <a href="#mousePressEvent">mousePressEvent</a>().
622<p> Widgets that accept keyboard input need to reimplement a few more
623event handlers:
624<p> <ul>
625<p> <li> <a href="#keyPressEvent">keyPressEvent</a>() - called whenever a key is pressed, and again
626when a key has been held down long enough for it to auto-repeat.
627Note that the Tab and Shift+Tab keys are only passed to the widget
628if they are not used by the focus-change mechanisms. To force those
629keys to be processed by your widget, you must reimplement
630<a href="#event">QWidget::event</a>().
631<p> <li> <a href="#focusInEvent">focusInEvent</a>() - called when the widget gains keyboard focus
632(assuming you have called <a href="#setFocusPolicy">setFocusPolicy</a>()). Well written widgets
633indicate that they own the keyboard focus in a clear but discreet
634way.
635<p> <li> <a href="#focusOutEvent">focusOutEvent</a>() - called when the widget loses keyboard focus.
636<p> </ul>
637<p> Some widgets will also need to reimplement some of the less common
638event handlers:
639<p> <ul>
640<p> <li> <a href="#mouseMoveEvent">mouseMoveEvent</a>() - called whenever the mouse moves while a
641button is held down. This is useful for, for example, dragging. If
642you call <a href="#setMouseTracking">setMouseTracking</a>(TRUE), you get mouse move events even
643when no buttons are held down. (Note that applications which make
644use of mouse tracking are often not very useful on low-bandwidth X
645connections.) (See also the <a href="dnd.html">drag and drop</a>
646information.)
647<p> <li> <a href="#keyReleaseEvent">keyReleaseEvent</a>() - called whenever a key is released, and also
648while it is held down if the key is auto-repeating. In that case
649the widget receives a key release event and immediately a key press
650event for every repeat. Note that the Tab and Shift+Tab keys are
651only passed to the widget if they are not used by the focus-change
652mechanisms. To force those keys to be processed by your widget, you
653must reimplement <a href="#event">QWidget::event</a>().
654<p> <li> <a href="#wheelEvent">wheelEvent</a>() -- called whenever the user turns the mouse wheel
655while the widget has the focus.
656<p> <li> <a href="#enterEvent">enterEvent</a>() - called when the mouse enters the widget's screen
657space. (This excludes screen space owned by any children of the
658widget.)
659<p> <li> <a href="#leaveEvent">leaveEvent</a>() - called when the mouse leaves the widget's screen
660space.
661<p> <li> <a href="#moveEvent">moveEvent</a>() - called when the widget has been moved relative to its
662parent.
663<p> <li> <a href="#closeEvent">closeEvent</a>() - called when the user closes the widget (or when
664<a href="#close">close</a>() is called).
665<p> </ul>
666<p> There are also some rather obscure events. They are listed in
667<a href="qevent-h.html">qevent.h</a> and you need to reimplement <a href="#event">event</a>() to handle them.
668The default implementation of event() handles Tab and Shift+Tab
669(to move the keyboard focus), and passes on most other events to
670one of the more specialized handlers above.
671<p> When implementing a widget, there are a few more things to
672consider.
673<p> <ul>
674<p> <li> In the constructor, be sure to set up your member variables
675early on, before there's any chance that you might receive an event.
676<p> <li> It is almost always useful to reimplement <a href="#sizeHint">sizeHint</a>() and to set
677the correct size policy with <a href="#setSizePolicy">setSizePolicy</a>(), so users of your class
678can set up layout management more easily. A size policy lets you
679supply good defaults for the layout management handling, so that
680other widgets can contain and manage yours easily. sizeHint()
681indicates a "good" size for the widget.
682<p> <li> If your widget is a top-level window, <a href="#setCaption">setCaption</a>() and <a href="#setIcon">setIcon</a>() set
683the title bar and icon respectively.
684<p> </ul>
685<p> <p>See also <a href="qevent.html">QEvent</a>, <a href="qpainter.html">QPainter</a>, <a href="qgridlayout.html">QGridLayout</a>, <a href="qboxlayout.html">QBoxLayout</a>, and <a href="abstractwidgets.html">Abstract Widget Classes</a>.
686
687<hr><h2>Member Type Documentation</h2>
688<h3 class=fn><a name="BackgroundOrigin-enum"></a>QWidget::BackgroundOrigin</h3>
689
690<p> This enum defines the origin used to draw a widget's background
691pixmap.
692<p> The pixmap is drawn using the:
693<ul>
694<li><tt>QWidget::WidgetOrigin</tt> - widget's coordinate system.
695<li><tt>QWidget::ParentOrigin</tt> - parent's coordinate system.
696<li><tt>QWidget::WindowOrigin</tt> - top-level window's coordinate system.
697<li><tt>QWidget::AncestorOrigin</tt> - same origin as the parent uses.
698</ul>
699<h3 class=fn><a name="FocusPolicy-enum"></a>QWidget::FocusPolicy</h3>
700
701<p> This enum type defines the various policies a widget can have with
702respect to acquiring <a href="focus.html#keyboard-focus">keyboard focus</a>.
703<ul>
704<li><tt>QWidget::TabFocus</tt> - the widget accepts focus by tabbing.
705<li><tt>QWidget::ClickFocus</tt> - the widget accepts focus by clicking.
706<li><tt>QWidget::StrongFocus</tt> - the widget accepts focus by both tabbing
707and clicking. On Mac OS X this will also
708be indicate that the widget accepts tab focus
709when in 'Text/List focus mode'.
710<li><tt>QWidget::WheelFocus</tt> - like StrongFocus plus the widget accepts
711focus by using the mouse wheel.
712<li><tt>QWidget::NoFocus</tt> - the widget does not accept focus.
713</ul><p>
714<hr><h2>Member Function Documentation</h2>
715<h3 class=fn>explicit <a name="QWidget"></a>QWidget::QWidget ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0, WFlags&nbsp;f = 0 )
716</h3>
717Constructs a widget which is a child of <em>parent</em>, with the name
718<em>name</em> and widget flags set to <em>f</em>.
719<p> If <em>parent</em> is 0, the new widget becomes a top-level window. If
720<em>parent</em> is another widget, this widget becomes a child window
721inside <em>parent</em>. The new widget is deleted when its <em>parent</em> is
722deleted.
723<p> The <em>name</em> is sent to the <a href="qobject.html">QObject</a> constructor.
724<p> The widget flags argument, <em>f</em>, is normally 0, but it can be set
725to customize the window frame of a top-level widget (i.e. <em>parent</em> must be 0). To customize the frame, set the <a href="qt.html#WidgetFlags-enum">WStyle_Customize</a> flag OR'ed with any of the <a href="qt.html#WidgetFlags-enum">Qt::WidgetFlags</a>.
726<p> If you add a child widget to an already visible widget you must
727explicitly show the child to make it visible.
728<p> Note that the X11 version of Qt may not be able to deliver all
729combinations of style flags on all systems. This is because on
730X11, Qt can only ask the window manager, and the window manager
731can override the application's settings. On Windows, Qt can set
732whatever flags you want.
733<p> Example:
734<pre>
735 <a href="qlabel.html">QLabel</a> *splashScreen = new <a href="qlabel.html">QLabel</a>( 0, "mySplashScreen",
736 WStyle_Customize | WStyle_Splash );
737 </pre>
738
739
740<h3 class=fn><a name="~QWidget"></a>QWidget::~QWidget ()
741</h3>
742Destroys the widget.
743<p> All this widget's children are deleted first. The application
744exits if this widget is the main widget.
745
746<h3 class=fn>bool <a name="acceptDrops"></a>QWidget::acceptDrops () const
747</h3><p>Returns TRUE if drop events are enabled for this widget; otherwise returns FALSE.
748See the <a href="qwidget.html#acceptDrops-prop">"acceptDrops"</a> property for details.
749<h3 class=fn>void <a name="adjustSize"></a>QWidget::adjustSize ()<tt> [virtual slot]</tt>
750</h3>
751Adjusts the size of the widget to fit the contents.
752<p> Uses <a href="#sizeHint">sizeHint</a>() if valid (i.e if the size hint's width and height
753are &gt;= 0), otherwise sets the size to the children rectangle (the
754union of all child widget geometries).
755<p> <p>See also <a href="#sizeHint-prop">sizeHint</a> and <a href="#childrenRect-prop">childrenRect</a>.
756
757<p>Example: <a href="xform-example.html#x1266">xform/xform.cpp</a>.
758<p>Reimplemented in <a href="qmessagebox.html#adjustSize">QMessageBox</a>.
759<h3 class=fn>bool <a name="autoMask"></a>QWidget::autoMask () const
760</h3><p>Returns TRUE if the auto mask feature is enabled for the widget; otherwise returns FALSE.
761See the <a href="qwidget.html#autoMask-prop">"autoMask"</a> property for details.
762<h3 class=fn>const&nbsp;<a href="qbrush.html">QBrush</a>&nbsp;&amp; <a name="backgroundBrush"></a>QWidget::backgroundBrush () const
763</h3><p>Returns the widget's background brush.
764See the <a href="qwidget.html#backgroundBrush-prop">"backgroundBrush"</a> property for details.
765<h3 class=fn>const&nbsp;<a href="qcolor.html">QColor</a>&nbsp;&amp; <a name="backgroundColor"></a>QWidget::backgroundColor () const
766</h3><b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
767Use <a href="#paletteBackgroundColor">paletteBackgroundColor</a>() or <a href="#eraseColor">eraseColor</a>() instead.
768<h3 class=fn><a href="qt.html#BackgroundMode-enum">BackgroundMode</a> <a name="backgroundMode"></a>QWidget::backgroundMode () const
769</h3><p>Returns the color role used for painting the background of the widget.
770See the <a href="qwidget.html#backgroundMode-prop">"backgroundMode"</a> property for details.
771<h3 class=fn><a href="qwidget.html#BackgroundOrigin-enum">BackgroundOrigin</a> <a name="backgroundOrigin"></a>QWidget::backgroundOrigin () const
772</h3><p>Returns the origin of the widget's background.
773See the <a href="qwidget.html#backgroundOrigin-prop">"backgroundOrigin"</a> property for details.
774<h3 class=fn>const&nbsp;<a href="qpixmap.html">QPixmap</a>&nbsp;* <a name="backgroundPixmap"></a>QWidget::backgroundPixmap () const
775</h3><b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
776Use <a href="#paletteBackgroundPixmap">paletteBackgroundPixmap</a>() or <a href="#erasePixmap">erasePixmap</a>() instead.
777<p>Examples: <a href="themes-example.html#x305">themes/metal.cpp</a> and <a href="themes-example.html#x250">themes/wood.cpp</a>.
778<h3 class=fn><a href="qsize.html">QSize</a> <a name="baseSize"></a>QWidget::baseSize () const
779</h3><p>Returns the base size of the widget.
780See the <a href="qwidget.html#baseSize-prop">"baseSize"</a> property for details.
781<h3 class=fn><a href="qstring.html">QString</a> <a name="caption"></a>QWidget::caption () const
782</h3><p>Returns the window caption (title).
783See the <a href="qwidget.html#caption-prop">"caption"</a> property for details.
784<h3 class=fn><a href="qwidget.html">QWidget</a>&nbsp;* <a name="childAt"></a>QWidget::childAt ( int&nbsp;x, int&nbsp;y, bool&nbsp;includeThis = FALSE ) const
785</h3>
786Returns the visible child widget at pixel position <em>(x, y)</em> in
787the widget's own coordinate system.
788<p> If <em>includeThis</em> is TRUE, and there is no child visible at <em>(x, y)</em>, the widget itself is returned.
789
790<h3 class=fn><a href="qwidget.html">QWidget</a>&nbsp;* <a name="childAt-2"></a>QWidget::childAt ( const&nbsp;<a href="qpoint.html">QPoint</a>&nbsp;&amp;&nbsp;p, bool&nbsp;includeThis = FALSE ) const
791</h3>
792This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
793<p> Returns the visible child widget at point <em>p</em> in the widget's own
794coordinate system.
795<p> If <em>includeThis</em> is TRUE, and there is no child visible at <em>p</em>,
796the widget itself is returned.
797<p>
798<h3 class=fn><a href="qrect.html">QRect</a> <a name="childrenRect"></a>QWidget::childrenRect () const
799</h3><p>Returns the bounding rectangle of the widget's children.
800See the <a href="qwidget.html#childrenRect-prop">"childrenRect"</a> property for details.
801<h3 class=fn><a href="qregion.html">QRegion</a> <a name="childrenRegion"></a>QWidget::childrenRegion () const
802</h3><p>Returns the combined region occupied by the widget's children.
803See the <a href="qwidget.html#childrenRegion-prop">"childrenRegion"</a> property for details.
804<h3 class=fn>void <a name="clearFocus"></a>QWidget::clearFocus ()<tt> [slot]</tt>
805</h3>
806Takes keyboard input focus from the widget.
807<p> If the widget has active focus, a <a href="#focusOutEvent">focus out
808 event</a> is sent to this widget to tell it that it is about
809to lose the focus.
810<p> This widget must enable focus setting in order to get the keyboard
811input focus, i.e. it must call <a href="#setFocusPolicy">setFocusPolicy</a>().
812<p> <p>See also <a href="#focus-prop">focus</a>, <a href="#setFocus">setFocus</a>(), <a href="#focusInEvent">focusInEvent</a>(), <a href="#focusOutEvent">focusOutEvent</a>(), <a href="#focusPolicy-prop">focusPolicy</a>, and <a href="qapplication.html#focusWidget">QApplication::focusWidget</a>().
813
814<h3 class=fn>void <a name="clearMask"></a>QWidget::clearMask ()
815</h3>
816Removes any mask set by <a href="#setMask">setMask</a>().
817<p> <p>See also <a href="#setMask">setMask</a>().
818
819<h3 class=fn>void <a name="clearWFlags"></a>QWidget::clearWFlags ( WFlags&nbsp;f )<tt> [protected]</tt>
820</h3>
821
822<p> Clears the widget flags <em>f</em>.
823<p> Widget flags are a combination of <a href="qt.html#WidgetFlags-enum">Qt::WidgetFlags</a>.
824<p> <p>See also <a href="#testWFlags">testWFlags</a>(), <a href="#getWFlags">getWFlags</a>(), and <a href="#setWFlags">setWFlags</a>().
825
826<h3 class=fn><a href="qregion.html">QRegion</a> <a name="clipRegion"></a>QWidget::clipRegion () const
827</h3>
828Returns the unobscured region where paint events can occur.
829<p> For visible widgets, this is an approximation of the area not
830covered by other widgets; otherwise, this is an empty region.
831<p> The <a href="#repaint">repaint</a>() function calls this function if necessary, so in
832general you do not need to call it.
833<p>
834<h3 class=fn>bool <a name="close"></a>QWidget::close ()<tt> [slot]</tt>
835</h3>
836
837<p> Closes this widget. Returns TRUE if the widget was closed;
838otherwise returns FALSE.
839<p> First it sends the widget a <a href="qcloseevent.html">QCloseEvent</a>. The widget is <a href="#hide">hidden</a> if it <a href="qcloseevent.html#accept">accepts</a> the close event. The default implementation of
840<a href="#closeEvent">QWidget::closeEvent</a>() accepts the close event.
841<p> The <a href="qapplication.html#lastWindowClosed">QApplication::lastWindowClosed</a>() signal is emitted when the
842last visible top level widget is closed.
843<p>
844<p>Examples: <a href="motif-dialog-example.html#x2708">dialog/mainwindow.cpp</a>, <a href="mdi-example.html#x2076">mdi/application.cpp</a>, <a href="popup-example.html#x1616">popup/popup.cpp</a>, and <a href="toplevel-example.html#x2535">toplevel/options.ui.h</a>.
845<h3 class=fn>bool <a name="close-2"></a>QWidget::close ( bool&nbsp;alsoDelete )<tt> [virtual]</tt>
846</h3>
847This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
848<p> Closes this widget. Returns TRUE if the widget was closed;
849otherwise returns FALSE.
850<p> If <em>alsoDelete</em> is TRUE or the widget has the <a href="qt.html#WidgetFlags-enum">WDestructiveClose</a> widget flag, the widget is also deleted. The
851widget can prevent itself from being closed by rejecting the
852<a href="qcloseevent.html">QCloseEvent</a> it gets. A close events is delivered to the widget
853no matter if the widget is visible or not.
854<p> The <a href="qapplication.html#lastWindowClosed">QApplication::lastWindowClosed</a>() signal is emitted when the
855last visible top level widget is closed.
856<p> Note that closing the <a href="qapplication.html#mainWidget">QApplication::mainWidget</a>() terminates the
857application.
858<p> <p>See also <a href="#closeEvent">closeEvent</a>(), <a href="qcloseevent.html">QCloseEvent</a>, <a href="#hide">hide</a>(), <a href="qapplication.html#quit">QApplication::quit</a>(), <a href="qapplication.html#setMainWidget">QApplication::setMainWidget</a>(), and <a href="qapplication.html#lastWindowClosed">QApplication::lastWindowClosed</a>().
859
860<h3 class=fn>void <a name="closeEvent"></a>QWidget::closeEvent ( <a href="qcloseevent.html">QCloseEvent</a>&nbsp;*&nbsp;e )<tt> [virtual protected]</tt>
861</h3>
862This event handler, for event <em>e</em>, can be reimplemented in a
863subclass to receive widget close events.
864<p> The default implementation calls e->accept(), which hides this
865widget. See the <a href="qcloseevent.html">QCloseEvent</a> documentation for more details.
866<p> <p>See also <a href="#event">event</a>(), <a href="#hide">hide</a>(), <a href="#close">close</a>(), and <a href="qcloseevent.html">QCloseEvent</a>.
867
868<p>Examples: <a href="qaction-application-example.html#x1173">action/application.cpp</a>, <a href="simple-application-example.html#x1592">application/application.cpp</a>, <a href="canvas-chart-example.html#x2896">chart/chartform.cpp</a>, <a href="i18n-example.html#x1927">i18n/mywidget.cpp</a>, <a href="mdi-example.html#x2077">mdi/application.cpp</a>, <a href="popup-example.html#x1617">popup/popup.cpp</a>, and <a href="qwerty-example.html#x404">qwerty/qwerty.cpp</a>.
869<h3 class=fn>const&nbsp;<a href="qcolorgroup.html">QColorGroup</a>&nbsp;&amp; <a name="colorGroup"></a>QWidget::colorGroup () const
870</h3><p>Returns the current color group of the widget palette.
871See the <a href="qwidget.html#colorGroup-prop">"colorGroup"</a> property for details.
872<h3 class=fn>void <a name="constPolish"></a>QWidget::constPolish () const<tt> [slot]</tt>
873</h3>
874
875<p> Ensures that the widget is properly initialized by calling
876<a href="#polish">polish</a>().
877<p> Call <a href="#constPolish">constPolish</a>() from functions like <a href="#sizeHint">sizeHint</a>() that depends on
878the widget being initialized, and that may be called before
879<a href="#show">show</a>().
880<p> <b>Warning:</b> Do not call constPolish() on a widget from inside that
881widget's constructor.
882<p> <p>See also <a href="#polish">polish</a>().
883
884<h3 class=fn>void <a name="contextMenuEvent"></a>QWidget::contextMenuEvent ( <a href="qcontextmenuevent.html">QContextMenuEvent</a>&nbsp;*&nbsp;e )<tt> [virtual protected]</tt>
885</h3>
886This event handler, for event <em>e</em>, can be reimplemented in a
887subclass to receive widget context menu events.
888<p> The default implementation calls e->ignore(), which rejects the
889context event. See the <a href="qcontextmenuevent.html">QContextMenuEvent</a> documentation for
890more details.
891<p> <p>See also <a href="#event">event</a>() and <a href="qcontextmenuevent.html">QContextMenuEvent</a>.
892
893<p>Example: <a href="menu-example.html#x1881">menu/menu.cpp</a>.
894<h3 class=fn>void <a name="create"></a>QWidget::create ( WId&nbsp;window = 0, bool&nbsp;initializeWindow = TRUE, bool&nbsp;destroyOldWindow = TRUE )<tt> [virtual protected]</tt>
895</h3>
896Creates a new widget window if <em>window</em> is 0, otherwise sets the
897widget's window to <em>window</em>.
898<p> Initializes the window (sets the geometry etc.) if <em>initializeWindow</em> is TRUE. If <em>initializeWindow</em> is FALSE, no
899initialization is performed. This parameter only makes sense if <em>window</em> is a valid window.
900<p> Destroys the old window if <em>destroyOldWindow</em> is TRUE. If <em>destroyOldWindow</em> is FALSE, you are responsible for destroying the
901window yourself (using platform native code).
902<p> The QWidget constructor calls <a href="#create">create</a>(0,TRUE,TRUE) to create a
903window for this widget.
904
905<h3 class=fn>const&nbsp;<a href="qcursor.html">QCursor</a>&nbsp;&amp; <a name="cursor"></a>QWidget::cursor () const
906</h3><p>Returns the cursor shape for this widget.
907See the <a href="qwidget.html#cursor-prop">"cursor"</a> property for details.
908<h3 class=fn>bool <a name="customWhatsThis"></a>QWidget::customWhatsThis () const<tt> [virtual]</tt>
909</h3><p>Returns TRUE if the widget wants to handle What's This help manually; otherwise returns FALSE.
910See the <a href="qwidget.html#customWhatsThis-prop">"customWhatsThis"</a> property for details.
911<h3 class=fn>void <a name="destroy"></a>QWidget::destroy ( bool&nbsp;destroyWindow = TRUE, bool&nbsp;destroySubWindows = TRUE )<tt> [virtual protected]</tt>
912</h3>
913Frees up window system resources. Destroys the widget window if <em>destroyWindow</em> is TRUE.
914<p> <a href="#destroy">destroy</a>() calls itself recursively for all the child widgets,
915passing <em>destroySubWindows</em> for the <em>destroyWindow</em> parameter.
916To have more control over destruction of subwidgets, destroy
917subwidgets selectively first.
918<p> This function is usually called from the QWidget destructor.
919
920<h3 class=fn>void <a name="dragEnterEvent"></a>QWidget::dragEnterEvent ( <a href="qdragenterevent.html">QDragEnterEvent</a>&nbsp;* )<tt> [virtual protected]</tt>
921</h3>
922This event handler is called when a drag is in progress and the
923mouse enters this widget.
924<p> See the <a href="dnd.html">Drag-and-drop documentation</a> for an
925overview of how to provide drag-and-drop in your application.
926<p> <p>See also <a href="qtextdrag.html">QTextDrag</a>, <a href="qimagedrag.html">QImageDrag</a>, and <a href="qdragenterevent.html">QDragEnterEvent</a>.
927
928<p>Example: <a href="simple_dd-example.html#x2829">iconview/simple_dd/main.cpp</a>.
929<h3 class=fn>void <a name="dragLeaveEvent"></a>QWidget::dragLeaveEvent ( <a href="qdragleaveevent.html">QDragLeaveEvent</a>&nbsp;* )<tt> [virtual protected]</tt>
930</h3>
931This event handler is called when a drag is in progress and the
932mouse leaves this widget.
933<p> See the <a href="dnd.html">Drag-and-drop documentation</a> for an
934overview of how to provide drag-and-drop in your application.
935<p> <p>See also <a href="qtextdrag.html">QTextDrag</a>, <a href="qimagedrag.html">QImageDrag</a>, and <a href="qdragleaveevent.html">QDragLeaveEvent</a>.
936
937<h3 class=fn>void <a name="dragMoveEvent"></a>QWidget::dragMoveEvent ( <a href="qdragmoveevent.html">QDragMoveEvent</a>&nbsp;* )<tt> [virtual protected]</tt>
938</h3>
939This event handler is called when a drag is in progress and the
940mouse enters this widget, and whenever it moves within the widget.
941<p> See the <a href="dnd.html">Drag-and-drop documentation</a> for an
942overview of how to provide drag-and-drop in your application.
943<p> <p>See also <a href="qtextdrag.html">QTextDrag</a>, <a href="qimagedrag.html">QImageDrag</a>, and <a href="qdragmoveevent.html">QDragMoveEvent</a>.
944
945<h3 class=fn>void <a name="drawText"></a>QWidget::drawText ( int&nbsp;x, int&nbsp;y, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;str )
946</h3>
947Draws the string <em>str</em> at position <em>(x, y)</em>.
948<p> The <em>y</em> position is the base line position of the text. The text
949is drawn using the default font and the default foreground color.
950<p> This function is provided for convenience. You will generally get
951more flexible results and often higher speed by using a a <a href="qpainter.html">painter</a> instead.
952<p> <p>See also <a href="#font-prop">font</a>, <a href="#foregroundColor">foregroundColor</a>(), and <a href="qpainter.html#drawText">QPainter::drawText</a>().
953
954<h3 class=fn>void <a name="drawText-2"></a>QWidget::drawText ( const&nbsp;<a href="qpoint.html">QPoint</a>&nbsp;&amp;&nbsp;pos, const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;str )
955</h3>
956This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
957<p> Draws the string <em>str</em> at position <em>pos</em>.
958
959<h3 class=fn>void <a name="dropEvent"></a>QWidget::dropEvent ( <a href="qdropevent.html">QDropEvent</a>&nbsp;* )<tt> [virtual protected]</tt>
960</h3>
961This event handler is called when the drag is dropped on this
962widget.
963<p> See the <a href="dnd.html">Drag-and-drop documentation</a> for an
964overview of how to provide drag-and-drop in your application.
965<p> <p>See also <a href="qtextdrag.html">QTextDrag</a>, <a href="qimagedrag.html">QImageDrag</a>, and <a href="qdropevent.html">QDropEvent</a>.
966
967<p>Example: <a href="simple_dd-example.html#x2830">iconview/simple_dd/main.cpp</a>.
968<h3 class=fn>void <a name="enabledChange"></a>QWidget::enabledChange ( bool&nbsp;oldEnabled )<tt> [virtual protected]</tt>
969</h3>
970
971<p> This virtual function is called from <a href="#setEnabled">setEnabled</a>(). <em>oldEnabled</em>
972is the previous setting; you can get the new setting from
973<a href="#isEnabled">isEnabled</a>().
974<p> Reimplement this function if your widget needs to know when it
975becomes enabled or disabled. You will almost certainly need to
976update the widget using <a href="#update">update</a>().
977<p> The default implementation repaints the visible part of the
978widget.
979<p> <p>See also <a href="#enabled-prop">enabled</a>, <a href="#enabled-prop">enabled</a>, <a href="#repaint">repaint</a>(), <a href="#update">update</a>(), and <a href="#clipRegion">clipRegion</a>().
980
981<h3 class=fn>void <a name="enterEvent"></a>QWidget::enterEvent ( <a href="qevent.html">QEvent</a>&nbsp;* )<tt> [virtual protected]</tt>
982</h3>
983This event handler can be reimplemented in a subclass to receive
984widget enter events.
985<p> An event is sent to the widget when the mouse cursor enters the
986widget.
987<p> <p>See also <a href="#leaveEvent">leaveEvent</a>(), <a href="#mouseMoveEvent">mouseMoveEvent</a>(), and <a href="#event">event</a>().
988
989<h3 class=fn>void <a name="erase"></a>QWidget::erase ( int&nbsp;x, int&nbsp;y, int&nbsp;w, int&nbsp;h )
990</h3>
991Erases the specified area <em>(x, y, w, h)</em> in the widget without
992generating a <a href="#paintEvent">paint event</a>.
993<p> If <em>w</em> is negative, it is replaced with <tt>width() - x</tt>. If <em>h</em>
994is negative, it is replaced width <tt>height() - y</tt>.
995<p> Child widgets are not affected.
996<p> <p>See also <a href="#repaint">repaint</a>().
997
998<h3 class=fn>void <a name="erase-2"></a>QWidget::erase ()
999</h3>
1000This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
1001<p> This version erases the entire widget.
1002
1003<h3 class=fn>void <a name="erase-3"></a>QWidget::erase ( const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;r )
1004</h3>
1005This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
1006<p> Erases the specified area <em>r</em> in the widget without generating a
1007<a href="#paintEvent">paint event</a>.
1008
1009<h3 class=fn>void <a name="erase-4"></a>QWidget::erase ( const&nbsp;<a href="qregion.html">QRegion</a>&nbsp;&amp;&nbsp;reg )
1010</h3>
1011This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
1012<p> Erases the area defined by <em>reg</em>, without generating a <a href="#paintEvent">paint event</a>.
1013<p> Child widgets are not affected.
1014
1015<h3 class=fn>const&nbsp;<a href="qcolor.html">QColor</a>&nbsp;&amp; <a name="eraseColor"></a>QWidget::eraseColor () const
1016</h3>
1017
1018<p> Returns the erase color of the widget.
1019<p> <p>See also <a href="#setEraseColor">setEraseColor</a>(), <a href="#setErasePixmap">setErasePixmap</a>(), and <a href="#backgroundColor">backgroundColor</a>().
1020
1021<h3 class=fn>const&nbsp;<a href="qpixmap.html">QPixmap</a>&nbsp;* <a name="erasePixmap"></a>QWidget::erasePixmap () const
1022</h3>
1023Returns the widget's erase pixmap.
1024<p> <p>See also <a href="#setErasePixmap">setErasePixmap</a>() and <a href="#eraseColor">eraseColor</a>().
1025
1026<h3 class=fn>bool <a name="event"></a>QWidget::event ( <a href="qevent.html">QEvent</a>&nbsp;*&nbsp;e )<tt> [virtual protected]</tt>
1027</h3>
1028This is the main event handler; it handles event <em>e</em>. You can
1029reimplement this function in a subclass, but we recommend using
1030one of the specialized event handlers instead.
1031<p> The main event handler first passes an event through all <a href="qobject.html#installEventFilter">event filters</a> that have been
1032installed. If none of the filters intercept the event, it calls
1033one of the specialized event handlers.
1034<p> Key press and release events are treated differently from other
1035events. <a href="#event">event</a>() checks for Tab and Shift+Tab and tries to move the
1036focus appropriately. If there is no widget to move the focus to
1037(or the key press is not Tab or Shift+Tab), event() calls
1038<a href="#keyPressEvent">keyPressEvent</a>().
1039<p> This function returns TRUE if it is able to pass the event over to
1040someone (i.e. someone wanted the event); otherwise returns FALSE.
1041<p> <p>See also <a href="#closeEvent">closeEvent</a>(), <a href="#focusInEvent">focusInEvent</a>(), <a href="#focusOutEvent">focusOutEvent</a>(), <a href="#enterEvent">enterEvent</a>(), <a href="#keyPressEvent">keyPressEvent</a>(), <a href="#keyReleaseEvent">keyReleaseEvent</a>(), <a href="#leaveEvent">leaveEvent</a>(), <a href="#mouseDoubleClickEvent">mouseDoubleClickEvent</a>(), <a href="#mouseMoveEvent">mouseMoveEvent</a>(), <a href="#mousePressEvent">mousePressEvent</a>(), <a href="#mouseReleaseEvent">mouseReleaseEvent</a>(), <a href="#moveEvent">moveEvent</a>(), <a href="#paintEvent">paintEvent</a>(), <a href="#resizeEvent">resizeEvent</a>(), <a href="qobject.html#event">QObject::event</a>(), and <a href="qobject.html#timerEvent">QObject::timerEvent</a>().
1042
1043<p>Reimplemented from <a href="qobject.html#event">QObject</a>.
1044<h3 class=fn><a href="qwidget.html">QWidget</a>&nbsp;* <a name="find"></a>QWidget::find ( WId&nbsp;id )<tt> [static]</tt>
1045</h3>
1046Returns a pointer to the widget with window identifer/handle <em>id</em>.
1047<p> The window identifier type depends on the underlying window
1048system, see <a href="qwindowdefs-h.html">qwindowdefs.h</a> for the actual definition. If there
1049is no widget with this identifier, 0 is returned.
1050
1051<h3 class=fn><a href="qfocusdata.html">QFocusData</a>&nbsp;* <a name="focusData"></a>QWidget::focusData ()<tt> [protected]</tt>
1052</h3>
1053Returns the focus data for this widget's top-level widget.
1054<p> Focus data always belongs to the top-level widget. The focus data
1055list contains all the widgets in this top-level widget that can
1056accept focus, in tab order. An iterator points to the current
1057focus widget (<a href="#focusWidget">focusWidget</a>() returns a pointer to this widget).
1058<p> This information is useful for implementing advanced versions of
1059<a href="#focusNextPrevChild">focusNextPrevChild</a>().
1060
1061<h3 class=fn>void <a name="focusInEvent"></a>QWidget::focusInEvent ( <a href="qfocusevent.html">QFocusEvent</a>&nbsp;* )<tt> [virtual protected]</tt>
1062</h3>
1063This event handler can be reimplemented in a subclass to receive
1064<a href="focus.html#keyboard-focus">keyboard focus</a> events (focus received) for the widget.
1065<p> A widget normally must <a href="#setFocusPolicy">setFocusPolicy</a>() to something other than
1066<a href="#FocusPolicy-enum">NoFocus</a> in order to receive focus events. (Note that the
1067application programmer can call <a href="#setFocus">setFocus</a>() on any widget, even
1068those that do not normally accept focus.)
1069<p> The default implementation updates the widget (except for toplevel
1070widgets that do not specify a <a href="#focusPolicy">focusPolicy</a>() ). It also calls
1071<a href="#setMicroFocusHint">setMicroFocusHint</a>(), hinting any system-specific input tools about
1072the focus of the user's attention.
1073<p> <p>See also <a href="#focusOutEvent">focusOutEvent</a>(), <a href="#focusPolicy-prop">focusPolicy</a>, <a href="#keyPressEvent">keyPressEvent</a>(), <a href="#keyReleaseEvent">keyReleaseEvent</a>(), <a href="#event">event</a>(), and <a href="qfocusevent.html">QFocusEvent</a>.
1074
1075<h3 class=fn>bool <a name="focusNextPrevChild"></a>QWidget::focusNextPrevChild ( bool&nbsp;next )<tt> [virtual protected]</tt>
1076</h3>
1077Finds a new widget to give the <a href="focus.html#keyboard-focus">keyboard focus</a> to, as appropriate
1078for Tab and Shift+Tab, and returns TRUE if is can find a new
1079widget and FALSE if it can't,
1080<p> If <em>next</em> is TRUE, this function searches "forwards", if <em>next</em>
1081is FALSE, it searches "backwards".
1082<p> Sometimes, you will want to reimplement this function. For
1083example, a web browser might reimplement it to move its "current
1084active link" forwards or backwards, and call
1085<a href="#focusNextPrevChild">QWidget::focusNextPrevChild</a>() only when it reaches the last or
1086first link on the "page".
1087<p> Child widgets call <a href="#focusNextPrevChild">focusNextPrevChild</a>() on their parent widgets,
1088but only the top-level widget decides where to redirect focus. By
1089overriding this method for an object, you thus gain control of
1090focus traversal for all child widgets.
1091<p> <b>Warning:</b> <a href="qscrollview.html">QScrollView</a> uses it own logic for this function, which
1092does the right thing in most cases. But if you are using a
1093QScrollView and want complete control of the focus chain you'll
1094need to override <a href="#focusNextPrevChild">QScrollView::focusNextPrevChild</a>() and your
1095top-level widgets' focusNextPrevChild() functions.
1096<p> <p>See also <a href="#focusData">focusData</a>().
1097
1098<h3 class=fn>void <a name="focusOutEvent"></a>QWidget::focusOutEvent ( <a href="qfocusevent.html">QFocusEvent</a>&nbsp;* )<tt> [virtual protected]</tt>
1099</h3>
1100This event handler can be reimplemented in a subclass to receive
1101<a href="focus.html#keyboard-focus">keyboard focus</a> events (focus lost) for the widget.
1102<p> A widget normally must <a href="#setFocusPolicy">setFocusPolicy</a>() to something other than
1103<a href="#FocusPolicy-enum">NoFocus</a> in order to receive focus events. (Note that the
1104application programmer can call <a href="#setFocus">setFocus</a>() on any widget, even
1105those that do not normally accept focus.)
1106<p> The default implementation updates the widget (except for toplevel
1107widgets that do not specify a <a href="#focusPolicy">focusPolicy</a>() ). It also calls
1108<a href="#setMicroFocusHint">setMicroFocusHint</a>(), hinting any system-specific input tools about
1109the focus of the user's attention.
1110<p> <p>See also <a href="#focusInEvent">focusInEvent</a>(), <a href="#focusPolicy-prop">focusPolicy</a>, <a href="#keyPressEvent">keyPressEvent</a>(), <a href="#keyReleaseEvent">keyReleaseEvent</a>(), <a href="#event">event</a>(), and <a href="qfocusevent.html">QFocusEvent</a>.
1111
1112<p>Example: <a href="qmag-example.html#x1796">qmag/qmag.cpp</a>.
1113<h3 class=fn><a href="qwidget.html#FocusPolicy-enum">FocusPolicy</a> <a name="focusPolicy"></a>QWidget::focusPolicy () const
1114</h3><p>Returns the way the widget accepts keyboard focus.
1115See the <a href="qwidget.html#focusPolicy-prop">"focusPolicy"</a> property for details.
1116<h3 class=fn><a href="qwidget.html">QWidget</a>&nbsp;* <a name="focusProxy"></a>QWidget::focusProxy () const
1117</h3>
1118Returns the focus proxy, or 0 if there is no focus proxy.
1119<p> <p>See also <a href="#setFocusProxy">setFocusProxy</a>().
1120
1121<h3 class=fn><a href="qwidget.html">QWidget</a>&nbsp;* <a name="focusWidget"></a>QWidget::focusWidget () const
1122</h3>
1123Returns the focus widget in this widget's window. This is not the
1124same as <a href="qapplication.html#focusWidget">QApplication::focusWidget</a>(), which returns the focus
1125widget in the currently active window.
1126
1127<h3 class=fn><a href="qfont.html">QFont</a> <a name="font"></a>QWidget::font () const
1128</h3><p>Returns the font currently set for the widget.
1129See the <a href="qwidget.html#font-prop">"font"</a> property for details.
1130<h3 class=fn>void <a name="fontChange"></a>QWidget::fontChange ( const&nbsp;<a href="qfont.html">QFont</a>&nbsp;&amp;&nbsp;oldFont )<tt> [virtual protected]</tt>
1131</h3>
1132
1133<p> This virtual function is called from <a href="#setFont">setFont</a>(). <em>oldFont</em> is the
1134previous font; you can get the new font from <a href="#font">font</a>().
1135<p> Reimplement this function if your widget needs to know when its
1136font changes. You will almost certainly need to update the widget
1137using <a href="#update">update</a>().
1138<p> The default implementation updates the widget including its
1139geometry.
1140<p> <p>See also <a href="#font-prop">font</a>, <a href="#font-prop">font</a>, <a href="#update">update</a>(), and <a href="#updateGeometry">updateGeometry</a>().
1141
1142<h3 class=fn><a href="qfontinfo.html">QFontInfo</a> <a name="fontInfo"></a>QWidget::fontInfo () const
1143</h3>
1144
1145<p> Returns the font info for the widget's current font.
1146Equivalent to QFontInto(widget->font()).
1147<p> <p>See also <a href="#font-prop">font</a>, <a href="#fontMetrics">fontMetrics</a>(), and <a href="#font-prop">font</a>.
1148
1149<h3 class=fn><a href="qfontmetrics.html">QFontMetrics</a> <a name="fontMetrics"></a>QWidget::fontMetrics () const
1150</h3>
1151
1152<p> Returns the font metrics for the widget's current font.
1153Equivalent to <a href="qfontmetrics.html">QFontMetrics</a>(widget->font()).
1154<p> <p>See also <a href="#font-prop">font</a>, <a href="#fontInfo">fontInfo</a>(), and <a href="#font-prop">font</a>.
1155
1156<p>Examples: <a href="drawdemo-example.html#x1084">drawdemo/drawdemo.cpp</a> and <a href="qmag-example.html#x1797">qmag/qmag.cpp</a>.
1157<h3 class=fn>const&nbsp;<a href="qcolor.html">QColor</a>&nbsp;&amp; <a name="foregroundColor"></a>QWidget::foregroundColor () const
1158</h3>
1159Same as <a href="#paletteForegroundColor">paletteForegroundColor</a>()
1160
1161<h3 class=fn><a href="qrect.html">QRect</a> <a name="frameGeometry"></a>QWidget::frameGeometry () const
1162</h3><p>Returns geometry of the widget relative to its parent including any window frame.
1163See the <a href="qwidget.html#frameGeometry-prop">"frameGeometry"</a> property for details.
1164<h3 class=fn><a href="qsize.html">QSize</a> <a name="frameSize"></a>QWidget::frameSize () const
1165</h3><p>Returns the size of the widget including any window frame.
1166See the <a href="qwidget.html#frameSize-prop">"frameSize"</a> property for details.
1167<h3 class=fn>const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp; <a name="geometry"></a>QWidget::geometry () const
1168</h3><p>Returns the geometry of the widget relative to its parent and excluding the window frame.
1169See the <a href="qwidget.html#geometry-prop">"geometry"</a> property for details.
1170<h3 class=fn>WFlags <a name="getWFlags"></a>QWidget::getWFlags () const<tt> [protected]</tt>
1171</h3>
1172
1173<p> Returns the widget flags for this this widget.
1174<p> Widget flags are a combination of <a href="qt.html#WidgetFlags-enum">Qt::WidgetFlags</a>.
1175<p> <p>See also <a href="#testWFlags">testWFlags</a>(), <a href="#setWFlags">setWFlags</a>(), and <a href="#clearWFlags">clearWFlags</a>().
1176
1177<h3 class=fn>void <a name="grabKeyboard"></a>QWidget::grabKeyboard ()
1178</h3>
1179Grabs the keyboard input.
1180<p> This widget reveives all keyboard events until <a href="#releaseKeyboard">releaseKeyboard</a>()
1181is called; other widgets get no keyboard events at all. Mouse
1182events are not affected. Use <a href="#grabMouse">grabMouse</a>() if you want to grab that.
1183<p> The focus widget is not affected, except that it doesn't receive
1184any keyboard events. <a href="#setFocus">setFocus</a>() moves the focus as usual, but the
1185new focus widget receives keyboard events only after
1186releaseKeyboard() is called.
1187<p> If a different widget is currently grabbing keyboard input, that
1188widget's grab is released first.
1189<p> <p>See also <a href="#releaseKeyboard">releaseKeyboard</a>(), <a href="#grabMouse">grabMouse</a>(), <a href="#releaseMouse">releaseMouse</a>(), and <a href="#focusWidget">focusWidget</a>().
1190
1191<h3 class=fn>void <a name="grabMouse"></a>QWidget::grabMouse ()
1192</h3>
1193Grabs the mouse input.
1194<p> This widget receives all mouse events until <a href="#releaseMouse">releaseMouse</a>() is
1195called; other widgets get no mouse events at all. Keyboard
1196events are not affected. Use <a href="#grabKeyboard">grabKeyboard</a>() if you want to grab
1197that.
1198<p> <b>Warning:</b> Bugs in mouse-grabbing applications very often lock the
1199terminal. Use this function with extreme caution, and consider
1200using the <tt>-nograb</tt> command line option while debugging.
1201<p> It is almost never necessary to grab the mouse when using Qt, as
1202Qt grabs and releases it sensibly. In particular, Qt grabs the
1203mouse when a mouse button is pressed and keeps it until the last
1204button is released.
1205<p> Note that only visible widgets can grab mouse input. If
1206<a href="#isVisible">isVisible</a>() returns FALSE for a widget, that widget cannot call
1207<a href="#grabMouse">grabMouse</a>().
1208<p> <p>See also <a href="#releaseMouse">releaseMouse</a>(), <a href="#grabKeyboard">grabKeyboard</a>(), <a href="#releaseKeyboard">releaseKeyboard</a>(), <a href="#grabKeyboard">grabKeyboard</a>(), and <a href="#focusWidget">focusWidget</a>().
1209
1210<h3 class=fn>void <a name="grabMouse-2"></a>QWidget::grabMouse ( const&nbsp;<a href="qcursor.html">QCursor</a>&nbsp;&amp;&nbsp;cursor )
1211</h3>
1212This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
1213<p> Grabs the mouse input and changes the cursor shape.
1214<p> The cursor will assume shape <em>cursor</em> (for as long as the mouse
1215focus is grabbed) and this widget will be the only one to receive
1216mouse events until <a href="#releaseMouse">releaseMouse</a>() is called().
1217<p> <b>Warning:</b> Grabbing the mouse might lock the terminal.
1218<p> <p>See also <a href="#releaseMouse">releaseMouse</a>(), <a href="#grabKeyboard">grabKeyboard</a>(), <a href="#releaseKeyboard">releaseKeyboard</a>(), and <a href="#cursor-prop">cursor</a>.
1219
1220<h3 class=fn>bool <a name="hasFocus"></a>QWidget::hasFocus () const
1221</h3><p>Returns TRUE if this widget (or its focus proxy) has the keyboard input focus; otherwise returns FALSE.
1222See the <a href="qwidget.html#focus-prop">"focus"</a> property for details.
1223<h3 class=fn>bool <a name="hasMouse"></a>QWidget::hasMouse () const
1224</h3><p>Returns TRUE if the widget is under the mouse cursor; otherwise returns FALSE.
1225See the <a href="qwidget.html#underMouse-prop">"underMouse"</a> property for details.
1226<h3 class=fn>bool <a name="hasMouseTracking"></a>QWidget::hasMouseTracking () const
1227</h3><p>Returns TRUE if mouse tracking is enabled for the widget; otherwise returns FALSE.
1228See the <a href="qwidget.html#mouseTracking-prop">"mouseTracking"</a> property for details.
1229<h3 class=fn>int <a name="height"></a>QWidget::height () const
1230</h3><p>Returns the height of the widget excluding any window frame.
1231See the <a href="qwidget.html#height-prop">"height"</a> property for details.
1232<h3 class=fn>int <a name="heightForWidth"></a>QWidget::heightForWidth ( int&nbsp;w ) const<tt> [virtual]</tt>
1233</h3>
1234Returns the preferred height for this widget, given the width <em>w</em>. The default implementation returns 0, indicating that the
1235preferred height does not depend on the width.
1236<p> <b>Warning:</b> Does not look at the widget's layout.
1237
1238<p>Reimplemented in <a href="qmenubar.html#heightForWidth">QMenuBar</a> and <a href="qtextedit.html#heightForWidth">QTextEdit</a>.
1239<h3 class=fn>void <a name="hide"></a>QWidget::hide ()<tt> [virtual slot]</tt>
1240</h3>
1241Hides the widget.
1242<p> You almost never have to reimplement this function. If you need to
1243do something after a widget is hidden, use <a href="#hideEvent">hideEvent</a>() instead.
1244<p> <p>See also <a href="#hideEvent">hideEvent</a>(), <a href="#hidden-prop">hidden</a>, <a href="#show">show</a>(), <a href="#showMinimized">showMinimized</a>(), <a href="#visible-prop">visible</a>, and <a href="#close">close</a>().
1245
1246<p>Examples: <a href="mdi-example.html#x2079">mdi/application.cpp</a>, <a href="popup-example.html#x1619">popup/popup.cpp</a>, <a href="progress-example.html#x89">progress/progress.cpp</a>, <a href="scrollview-example.html#x658">scrollview/scrollview.cpp</a>, <a href="qaxcontainer-example-webbrowser.html#x2516">webbrowser/mainwindow.ui.h</a>, and <a href="xform-example.html#x1267">xform/xform.cpp</a>.
1247<p>Reimplemented in <a href="qmenubar.html#hide">QMenuBar</a>.
1248<h3 class=fn>void <a name="hideEvent"></a>QWidget::hideEvent ( <a href="qhideevent.html">QHideEvent</a>&nbsp;* )<tt> [virtual protected]</tt>
1249</h3>
1250This event handler can be reimplemented in a subclass to receive
1251widget hide events.
1252<p> Hide events are sent to widgets immediately after they have been
1253hidden.
1254<p> <p>See also <a href="#event">event</a>() and <a href="qhideevent.html">QHideEvent</a>.
1255
1256<p>Reimplemented in <a href="qscrollbar.html#hideEvent">QScrollBar</a>.
1257<h3 class=fn>const&nbsp;<a href="qpixmap.html">QPixmap</a>&nbsp;* <a name="icon"></a>QWidget::icon () const
1258</h3><p>Returns the widget's icon.
1259See the <a href="qwidget.html#icon-prop">"icon"</a> property for details.
1260<h3 class=fn><a href="qstring.html">QString</a> <a name="iconText"></a>QWidget::iconText () const
1261</h3><p>Returns the widget's icon text.
1262See the <a href="qwidget.html#iconText-prop">"iconText"</a> property for details.
1263<h3 class=fn>void <a name="iconify"></a>QWidget::iconify ()<tt> [slot]</tt>
1264</h3>
1265<b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
1266<p>
1267<h3 class=fn>void <a name="imComposeEvent"></a>QWidget::imComposeEvent ( <a href="qimevent.html">QIMEvent</a>&nbsp;*&nbsp;e )<tt> [virtual protected]</tt>
1268</h3>
1269This event handler, for event <em>e</em>, can be reimplemented in a
1270subclass to receive Input Method composition events. This handler
1271is called when the user has entered some text using an Input Method.
1272<p> The default implementation calls e->ignore(), which rejects the
1273Input Method event. See the <a href="qimevent.html">QIMEvent</a> documentation for more
1274details.
1275<p> <p>See also <a href="#event">event</a>() and <a href="qimevent.html">QIMEvent</a>.
1276
1277<h3 class=fn>void <a name="imEndEvent"></a>QWidget::imEndEvent ( <a href="qimevent.html">QIMEvent</a>&nbsp;*&nbsp;e )<tt> [virtual protected]</tt>
1278</h3>
1279This event handler, for event <em>e</em>, can be reimplemented in a
1280subclass to receive Input Method composition events. This handler
1281is called when the user has finished inputting text via an Input
1282Method.
1283<p> The default implementation calls e->ignore(), which rejects the
1284Input Method event. See the <a href="qimevent.html">QIMEvent</a> documentation for more
1285details.
1286<p> <p>See also <a href="#event">event</a>() and <a href="qimevent.html">QIMEvent</a>.
1287
1288<h3 class=fn>void <a name="imStartEvent"></a>QWidget::imStartEvent ( <a href="qimevent.html">QIMEvent</a>&nbsp;*&nbsp;e )<tt> [virtual protected]</tt>
1289</h3>
1290This event handler, for event <em>e</em>, can be reimplemented in a
1291subclass to receive Input Method composition events. This handler
1292is called when the user begins entering text using an Input Method.
1293<p> The default implementation calls e->ignore(), which rejects the
1294Input Method event. See the <a href="qimevent.html">QIMEvent</a> documentation for more
1295details.
1296<p> <p>See also <a href="#event">event</a>() and <a href="qimevent.html">QIMEvent</a>.
1297
1298<h3 class=fn>bool <a name="isActiveWindow"></a>QWidget::isActiveWindow () const
1299</h3><p>Returns TRUE if this widget is the active window; otherwise returns FALSE.
1300See the <a href="qwidget.html#isActiveWindow-prop">"isActiveWindow"</a> property for details.
1301<h3 class=fn>bool <a name="isDesktop"></a>QWidget::isDesktop () const
1302</h3><p>Returns TRUE if the widget is a desktop widget, i.e. represents the desktop; otherwise returns FALSE.
1303See the <a href="qwidget.html#isDesktop-prop">"isDesktop"</a> property for details.
1304<h3 class=fn>bool <a name="isDialog"></a>QWidget::isDialog () const
1305</h3><p>Returns TRUE if the widget is a dialog widget; otherwise returns FALSE.
1306See the <a href="qwidget.html#isDialog-prop">"isDialog"</a> property for details.
1307<h3 class=fn>bool <a name="isEnabled"></a>QWidget::isEnabled () const
1308</h3><p>Returns TRUE if the widget is enabled; otherwise returns FALSE.
1309See the <a href="qwidget.html#enabled-prop">"enabled"</a> property for details.
1310<h3 class=fn>bool <a name="isEnabledTo"></a>QWidget::isEnabledTo ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;ancestor ) const
1311</h3>
1312Returns TRUE if this widget would become enabled if <em>ancestor</em> is
1313enabled; otherwise returns FALSE.
1314<p> This is the case if neither the widget itself nor every parent up
1315to but excluding <em>ancestor</em> has been explicitly disabled.
1316<p> <a href="#isEnabledTo">isEnabledTo</a>(0) is equivalent to <a href="#isEnabled">isEnabled</a>().
1317<p> <p>See also <a href="#enabled-prop">enabled</a> and <a href="#enabled-prop">enabled</a>.
1318
1319<h3 class=fn>bool <a name="isEnabledToTLW"></a>QWidget::isEnabledToTLW () const
1320</h3>
1321
1322<b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
1323<p> This function is deprecated. It is equivalent to <a href="#isEnabled">isEnabled</a>()
1324
1325<h3 class=fn>bool <a name="isFocusEnabled"></a>QWidget::isFocusEnabled () const
1326</h3><p>Returns TRUE if the widget accepts keyboard focus; otherwise returns FALSE.
1327See the <a href="qwidget.html#focusEnabled-prop">"focusEnabled"</a> property for details.
1328<h3 class=fn>bool <a name="isFullScreen"></a>QWidget::isFullScreen () const
1329</h3><p>Returns TRUE if the widget is full screen; otherwise returns FALSE.
1330See the <a href="qwidget.html#fullScreen-prop">"fullScreen"</a> property for details.
1331<h3 class=fn>bool <a name="isHidden"></a>QWidget::isHidden () const
1332</h3><p>Returns TRUE if the widget is explicitly hidden; otherwise returns FALSE.
1333See the <a href="qwidget.html#hidden-prop">"hidden"</a> property for details.
1334<h3 class=fn>bool <a name="isInputMethodEnabled"></a>QWidget::isInputMethodEnabled () const
1335</h3><p>Returns enables or disables the use of input methods for this widget.
1336See the <a href="qwidget.html#inputMethodEnabled-prop">"inputMethodEnabled"</a> property for details.
1337<h3 class=fn>bool <a name="isMaximized"></a>QWidget::isMaximized () const
1338</h3><p>Returns TRUE if this widget is maximized; otherwise returns FALSE.
1339See the <a href="qwidget.html#maximized-prop">"maximized"</a> property for details.
1340<h3 class=fn>bool <a name="isMinimized"></a>QWidget::isMinimized () const
1341</h3><p>Returns TRUE if this widget is minimized (iconified); otherwise returns FALSE.
1342See the <a href="qwidget.html#minimized-prop">"minimized"</a> property for details.
1343<h3 class=fn>bool <a name="isModal"></a>QWidget::isModal () const
1344</h3><p>Returns TRUE if the widget is a modal widget; otherwise returns FALSE.
1345See the <a href="qwidget.html#isModal-prop">"isModal"</a> property for details.
1346<h3 class=fn>bool <a name="isPopup"></a>QWidget::isPopup () const
1347</h3><p>Returns TRUE if the widget is a popup widget; otherwise returns FALSE.
1348See the <a href="qwidget.html#isPopup-prop">"isPopup"</a> property for details.
1349<h3 class=fn>bool <a name="isShown"></a>QWidget::isShown () const
1350</h3><p>Returns TRUE if the widget is shown; otherwise returns FALSE.
1351See the <a href="qwidget.html#shown-prop">"shown"</a> property for details.
1352<h3 class=fn>bool <a name="isTopLevel"></a>QWidget::isTopLevel () const
1353</h3><p>Returns TRUE if the widget is a top-level widget; otherwise returns FALSE.
1354See the <a href="qwidget.html#isTopLevel-prop">"isTopLevel"</a> property for details.
1355<h3 class=fn>bool <a name="isUpdatesEnabled"></a>QWidget::isUpdatesEnabled () const
1356</h3><p>Returns TRUE if updates are enabled; otherwise returns FALSE.
1357See the <a href="qwidget.html#updatesEnabled-prop">"updatesEnabled"</a> property for details.
1358<h3 class=fn>bool <a name="isVisible"></a>QWidget::isVisible () const
1359</h3><p>Returns TRUE if the widget is visible; otherwise returns FALSE.
1360See the <a href="qwidget.html#visible-prop">"visible"</a> property for details.
1361<h3 class=fn>bool <a name="isVisibleTo"></a>QWidget::isVisibleTo ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;ancestor ) const
1362</h3>
1363Returns TRUE if this widget would become visible if <em>ancestor</em> is
1364shown; otherwise returns FALSE.
1365<p> The TRUE case occurs if neither the widget itself nor any parent
1366up to but excluding <em>ancestor</em> has been explicitly hidden.
1367<p> This function will still return TRUE if the widget is obscured by
1368other windows on the screen, but could be physically visible if it
1369or they were to be moved.
1370<p> <a href="#isVisibleTo">isVisibleTo</a>(0) is identical to <a href="#isVisible">isVisible</a>().
1371<p> <p>See also <a href="#show">show</a>(), <a href="#hide">hide</a>(), and <a href="#visible-prop">visible</a>.
1372
1373<h3 class=fn>bool <a name="isVisibleToTLW"></a>QWidget::isVisibleToTLW () const
1374</h3>
1375
1376<b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
1377<p> This function is deprecated. It is equivalent to <a href="#isVisible">isVisible</a>()
1378
1379<h3 class=fn>void <a name="keyPressEvent"></a>QWidget::keyPressEvent ( <a href="qkeyevent.html">QKeyEvent</a>&nbsp;*&nbsp;e )<tt> [virtual protected]</tt>
1380</h3>
1381This event handler, for event <em>e</em>, can be reimplemented in a
1382subclass to receive key press events for the widget.
1383<p> A widget must call <a href="#setFocusPolicy">setFocusPolicy</a>() to accept focus initially and
1384have focus in order to receive a key press event.
1385<p> If you reimplement this handler, it is very important that you
1386explicitly <a href="qkeyevent.html#ignore">ignore</a> the event
1387if you do not understand it, so that the widget's parent can
1388interpret it; otherwise, the event will be implicitly accepted.
1389Although top-level widgets are able to choose whether to accept
1390or ignore unknown events because they have no parent widgets that
1391could otherwise handle them, it is good practice to explicitly
1392ignore events to make widgets as reusable as possible.
1393<p> The default implementation closes popup widgets if the user
1394presses <b>Esc</b>. Otherwise the event is ignored.
1395<p> <p>See also <a href="#keyReleaseEvent">keyReleaseEvent</a>(), <a href="qkeyevent.html#ignore">QKeyEvent::ignore</a>(), <a href="#focusPolicy-prop">focusPolicy</a>, <a href="#focusInEvent">focusInEvent</a>(), <a href="#focusOutEvent">focusOutEvent</a>(), <a href="#event">event</a>(), and <a href="qkeyevent.html">QKeyEvent</a>.
1396
1397<p>Example: <a href="picture-example.html#x127">picture/picture.cpp</a>.
1398<p>Reimplemented in <a href="qlineedit.html#keyPressEvent">QLineEdit</a> and <a href="qtextedit.html#keyPressEvent">QTextEdit</a>.
1399<h3 class=fn>void <a name="keyReleaseEvent"></a>QWidget::keyReleaseEvent ( <a href="qkeyevent.html">QKeyEvent</a>&nbsp;*&nbsp;e )<tt> [virtual protected]</tt>
1400</h3>
1401This event handler, for event <em>e</em>, can be reimplemented in a
1402subclass to receive key release events for the widget.
1403<p> A widget must <a href="#setFocusPolicy">accept focus</a>
1404initially and <a href="#hasFocus">have focus</a> in order to
1405receive a key release event.
1406<p> If you reimplement this handler, it is very important that you
1407<a href="qkeyevent.html">ignore()</a> the release if you do not
1408understand it, so that the widget's parent can interpret it.
1409<p> The default implementation ignores the event.
1410<p> <p>See also <a href="#keyPressEvent">keyPressEvent</a>(), <a href="qkeyevent.html#ignore">QKeyEvent::ignore</a>(), <a href="#focusPolicy-prop">focusPolicy</a>, <a href="#focusInEvent">focusInEvent</a>(), <a href="#focusOutEvent">focusOutEvent</a>(), <a href="#event">event</a>(), and <a href="qkeyevent.html">QKeyEvent</a>.
1411
1412<h3 class=fn><a href="qwidget.html">QWidget</a>&nbsp;* <a name="keyboardGrabber"></a>QWidget::keyboardGrabber ()<tt> [static]</tt>
1413</h3>
1414Returns the widget that is currently grabbing the keyboard input.
1415<p> If no widget in this application is currently grabbing the
1416keyboard, 0 is returned.
1417<p> <p>See also <a href="#grabMouse">grabMouse</a>() and <a href="#mouseGrabber">mouseGrabber</a>().
1418
1419<h3 class=fn><a href="qlayout.html">QLayout</a>&nbsp;* <a name="layout"></a>QWidget::layout () const
1420</h3>
1421
1422<p> Returns the layout engine that manages the geometry of this
1423widget's children.
1424<p> If the widget does not have a layout, <a href="#layout">layout</a>() returns 0.
1425<p> <p>See also <a href="#sizePolicy-prop">sizePolicy</a>.
1426
1427<p>Examples: <a href="tutorial2-09.html#x2647">chart/optionsform.cpp</a> and <a href="simple-font-demo-example.html#x2858">fonts/simple-qfont-demo/viewer.cpp</a>.
1428<h3 class=fn>void <a name="leaveEvent"></a>QWidget::leaveEvent ( <a href="qevent.html">QEvent</a>&nbsp;* )<tt> [virtual protected]</tt>
1429</h3>
1430This event handler can be reimplemented in a subclass to receive
1431widget leave events.
1432<p> A leave event is sent to the widget when the mouse cursor leaves
1433the widget.
1434<p> <p>See also <a href="#enterEvent">enterEvent</a>(), <a href="#mouseMoveEvent">mouseMoveEvent</a>(), and <a href="#event">event</a>().
1435
1436<h3 class=fn>void <a name="lower"></a>QWidget::lower ()<tt> [slot]</tt>
1437</h3>
1438Lowers the widget to the bottom of the parent widget's stack.
1439<p> After this call the widget will be visually behind (and therefore
1440obscured by) any overlapping sibling widgets.
1441<p> <p>See also <a href="#raise">raise</a>() and <a href="#stackUnder">stackUnder</a>().
1442
1443<h3 class=fn>bool <a name="macEvent"></a>QWidget::macEvent ( MSG * )<tt> [virtual protected]</tt>
1444</h3>
1445This special event handler can be reimplemented in a subclass to
1446receive native Macintosh events.
1447<p> In your reimplementation of this function, if you want to stop the
1448event being handled by Qt, return TRUE. If you return FALSE, this
1449native event is passed back to Qt, which translates the event into
1450a Qt event and sends it to the widget.
1451<p> <b>Warning:</b> This function is not portable.
1452<p> <p>See also <a href="qapplication.html#macEventFilter">QApplication::macEventFilter</a>().
1453
1454<h3 class=fn><a href="qpoint.html">QPoint</a> <a name="mapFrom"></a>QWidget::mapFrom ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;parent, const&nbsp;<a href="qpoint.html">QPoint</a>&nbsp;&amp;&nbsp;pos ) const
1455</h3>
1456Translates the widget coordinate <em>pos</em> from the coordinate system
1457of <em>parent</em> to this widget's coordinate system. The <em>parent</em>
1458must not be 0 and must be a parent of the calling widget.
1459<p> <p>See also <a href="#mapTo">mapTo</a>(), <a href="#mapFromParent">mapFromParent</a>(), <a href="#mapFromGlobal">mapFromGlobal</a>(), and <a href="#underMouse-prop">underMouse</a>.
1460
1461<h3 class=fn><a href="qpoint.html">QPoint</a> <a name="mapFromGlobal"></a>QWidget::mapFromGlobal ( const&nbsp;<a href="qpoint.html">QPoint</a>&nbsp;&amp;&nbsp;pos ) const
1462</h3>
1463Translates the global screen coordinate <em>pos</em> to widget
1464coordinates.
1465<p> <p>See also <a href="#mapToGlobal">mapToGlobal</a>(), <a href="#mapFrom">mapFrom</a>(), and <a href="#mapFromParent">mapFromParent</a>().
1466
1467<h3 class=fn><a href="qpoint.html">QPoint</a> <a name="mapFromParent"></a>QWidget::mapFromParent ( const&nbsp;<a href="qpoint.html">QPoint</a>&nbsp;&amp;&nbsp;pos ) const
1468</h3>
1469Translates the parent widget coordinate <em>pos</em> to widget
1470coordinates.
1471<p> Same as <a href="#mapFromGlobal">mapFromGlobal</a>() if the widget has no parent.
1472<p> <p>See also <a href="#mapToParent">mapToParent</a>(), <a href="#mapFrom">mapFrom</a>(), <a href="#mapFromGlobal">mapFromGlobal</a>(), and <a href="#underMouse-prop">underMouse</a>.
1473
1474<h3 class=fn><a href="qpoint.html">QPoint</a> <a name="mapTo"></a>QWidget::mapTo ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;parent, const&nbsp;<a href="qpoint.html">QPoint</a>&nbsp;&amp;&nbsp;pos ) const
1475</h3>
1476Translates the widget coordinate <em>pos</em> to the coordinate system
1477of <em>parent</em>. The <em>parent</em> must not be 0 and must be a parent
1478of the calling widget.
1479<p> <p>See also <a href="#mapFrom">mapFrom</a>(), <a href="#mapToParent">mapToParent</a>(), <a href="#mapToGlobal">mapToGlobal</a>(), and <a href="#underMouse-prop">underMouse</a>.
1480
1481<h3 class=fn><a href="qpoint.html">QPoint</a> <a name="mapToGlobal"></a>QWidget::mapToGlobal ( const&nbsp;<a href="qpoint.html">QPoint</a>&nbsp;&amp;&nbsp;pos ) const
1482</h3>
1483Translates the widget coordinate <em>pos</em> to global screen
1484coordinates. For example, <tt>mapToGlobal(QPoint(0,0))</tt> would give
1485the global coordinates of the top-left pixel of the widget.
1486<p> <p>See also <a href="#mapFromGlobal">mapFromGlobal</a>(), <a href="#mapTo">mapTo</a>(), and <a href="#mapToParent">mapToParent</a>().
1487
1488<p>Example: <a href="scribble-example.html#x947">scribble/scribble.cpp</a>.
1489<h3 class=fn><a href="qpoint.html">QPoint</a> <a name="mapToParent"></a>QWidget::mapToParent ( const&nbsp;<a href="qpoint.html">QPoint</a>&nbsp;&amp;&nbsp;pos ) const
1490</h3>
1491Translates the widget coordinate <em>pos</em> to a coordinate in the
1492parent widget.
1493<p> Same as <a href="#mapToGlobal">mapToGlobal</a>() if the widget has no parent.
1494<p> <p>See also <a href="#mapFromParent">mapFromParent</a>(), <a href="#mapTo">mapTo</a>(), <a href="#mapToGlobal">mapToGlobal</a>(), and <a href="#underMouse-prop">underMouse</a>.
1495
1496<h3 class=fn>int <a name="maximumHeight"></a>QWidget::maximumHeight () const
1497</h3><p>Returns the widget's maximum height.
1498See the <a href="qwidget.html#maximumHeight-prop">"maximumHeight"</a> property for details.
1499<h3 class=fn><a href="qsize.html">QSize</a> <a name="maximumSize"></a>QWidget::maximumSize () const
1500</h3><p>Returns the widget's maximum size.
1501See the <a href="qwidget.html#maximumSize-prop">"maximumSize"</a> property for details.
1502<h3 class=fn>int <a name="maximumWidth"></a>QWidget::maximumWidth () const
1503</h3><p>Returns the widget's maximum width.
1504See the <a href="qwidget.html#maximumWidth-prop">"maximumWidth"</a> property for details.
1505<h3 class=fn>int <a name="metric"></a>QWidget::metric ( int&nbsp;m ) const<tt> [virtual protected]</tt>
1506</h3>
1507Internal implementation of the virtual QPaintDevice::metric()
1508function.
1509<p> Use the <a href="qpaintdevicemetrics.html">QPaintDeviceMetrics</a> class instead.
1510<p> <em>m</em> is the metric to get.
1511
1512<h3 class=fn><a href="qrect.html">QRect</a> <a name="microFocusHint"></a>QWidget::microFocusHint () const
1513</h3><p>Returns the currently set micro focus hint for this widget.
1514See the <a href="qwidget.html#microFocusHint-prop">"microFocusHint"</a> property for details.
1515<h3 class=fn>int <a name="minimumHeight"></a>QWidget::minimumHeight () const
1516</h3><p>Returns the widget's minimum height.
1517See the <a href="qwidget.html#minimumHeight-prop">"minimumHeight"</a> property for details.
1518<h3 class=fn><a href="qsize.html">QSize</a> <a name="minimumSize"></a>QWidget::minimumSize () const
1519</h3><p>Returns the widget's minimum size.
1520See the <a href="qwidget.html#minimumSize-prop">"minimumSize"</a> property for details.
1521<h3 class=fn><a href="qsize.html">QSize</a> <a name="minimumSizeHint"></a>QWidget::minimumSizeHint () const<tt> [virtual]</tt>
1522</h3><p>Returns the recommended minimum size for the widget.
1523See the <a href="qwidget.html#minimumSizeHint-prop">"minimumSizeHint"</a> property for details.
1524<p>Reimplemented in <a href="qlineedit.html#minimumSizeHint">QLineEdit</a>.
1525<h3 class=fn>int <a name="minimumWidth"></a>QWidget::minimumWidth () const
1526</h3><p>Returns the widget's minimum width.
1527See the <a href="qwidget.html#minimumWidth-prop">"minimumWidth"</a> property for details.
1528<h3 class=fn>void <a name="mouseDoubleClickEvent"></a>QWidget::mouseDoubleClickEvent ( <a href="qmouseevent.html">QMouseEvent</a>&nbsp;*&nbsp;e )<tt> [virtual protected]</tt>
1529</h3>
1530This event handler, for event <em>e</em>, can be reimplemented in a
1531subclass to receive mouse double click events for the widget.
1532<p> The default implementation generates a normal mouse press event.
1533<p> Note that the widgets gets a <a href="#mousePressEvent">mousePressEvent</a>() and a
1534<a href="#mouseReleaseEvent">mouseReleaseEvent</a>() before the <a href="#mouseDoubleClickEvent">mouseDoubleClickEvent</a>().
1535<p> <p>See also <a href="#mousePressEvent">mousePressEvent</a>(), <a href="#mouseReleaseEvent">mouseReleaseEvent</a>(), <a href="#mouseMoveEvent">mouseMoveEvent</a>(), <a href="#event">event</a>(), and <a href="qmouseevent.html">QMouseEvent</a>.
1536
1537<h3 class=fn><a href="qwidget.html">QWidget</a>&nbsp;* <a name="mouseGrabber"></a>QWidget::mouseGrabber ()<tt> [static]</tt>
1538</h3>
1539Returns the widget that is currently grabbing the mouse input.
1540<p> If no widget in this application is currently grabbing the mouse,
15410 is returned.
1542<p> <p>See also <a href="#grabMouse">grabMouse</a>() and <a href="#keyboardGrabber">keyboardGrabber</a>().
1543
1544<h3 class=fn>void <a name="mouseMoveEvent"></a>QWidget::mouseMoveEvent ( <a href="qmouseevent.html">QMouseEvent</a>&nbsp;*&nbsp;e )<tt> [virtual protected]</tt>
1545</h3>
1546This event handler, for event <em>e</em>, can be reimplemented in a
1547subclass to receive mouse move events for the widget.
1548<p> If mouse tracking is switched off, mouse move events only occur if
1549a mouse button is pressed while the mouse is being moved. If mouse
1550tracking is switched on, mouse move events occur even if no mouse
1551button is pressed.
1552<p> <a href="qmouseevent.html#pos">QMouseEvent::pos</a>() reports the position of the mouse cursor,
1553relative to this widget. For press and release events, the
1554position is usually the same as the position of the last mouse
1555move event, but it might be different if the user's hand shakes.
1556This is a feature of the underlying window system, not Qt.
1557<p> <p>See also <a href="#mouseTracking-prop">mouseTracking</a>, <a href="#mousePressEvent">mousePressEvent</a>(), <a href="#mouseReleaseEvent">mouseReleaseEvent</a>(), <a href="#mouseDoubleClickEvent">mouseDoubleClickEvent</a>(), <a href="#event">event</a>(), and <a href="qmouseevent.html">QMouseEvent</a>.
1558
1559<p>Examples: <a href="aclock-example.html#x1206">aclock/aclock.cpp</a>, <a href="drawlines-example.html#x1658">drawlines/connect.cpp</a>, <a href="simple_dd-example.html#x2831">iconview/simple_dd/main.cpp</a>, <a href="life-example.html#x1896">life/life.cpp</a>, <a href="popup-example.html#x1620">popup/popup.cpp</a>, <a href="qmag-example.html#x1800">qmag/qmag.cpp</a>, and <a href="scribble-example.html#x948">scribble/scribble.cpp</a>.
1560<p>Reimplemented in <a href="qsizegrip.html#mouseMoveEvent">QSizeGrip</a>.
1561<h3 class=fn>void <a name="mousePressEvent"></a>QWidget::mousePressEvent ( <a href="qmouseevent.html">QMouseEvent</a>&nbsp;*&nbsp;e )<tt> [virtual protected]</tt>
1562</h3>
1563This event handler, for event <em>e</em>, can be reimplemented in a
1564subclass to receive mouse press events for the widget.
1565<p> If you create new widgets in the <a href="#mousePressEvent">mousePressEvent</a>() the
1566<a href="#mouseReleaseEvent">mouseReleaseEvent</a>() may not end up where you expect, depending on
1567the underlying window system (or X11 window manager), the widgets'
1568location and maybe more.
1569<p> The default implementation implements the closing of popup widgets
1570when you click outside the window. For other widget types it does
1571nothing.
1572<p> <p>See also <a href="#mouseReleaseEvent">mouseReleaseEvent</a>(), <a href="#mouseDoubleClickEvent">mouseDoubleClickEvent</a>(), <a href="#mouseMoveEvent">mouseMoveEvent</a>(), <a href="#event">event</a>(), and <a href="qmouseevent.html">QMouseEvent</a>.
1573
1574<p>Examples: <a href="biff-example.html#x1960">biff/biff.cpp</a>, <a href="drawlines-example.html#x1659">drawlines/connect.cpp</a>, <a href="simple_dd-example.html#x2832">iconview/simple_dd/main.cpp</a>, <a href="life-example.html#x1897">life/life.cpp</a>, <a href="qmag-example.html#x1801">qmag/qmag.cpp</a>, <a href="scribble-example.html#x949">scribble/scribble.cpp</a>, and <a href="tooltip-example.html#x452">tooltip/tooltip.cpp</a>.
1575<p>Reimplemented in <a href="qsizegrip.html#mousePressEvent">QSizeGrip</a>.
1576<h3 class=fn>void <a name="mouseReleaseEvent"></a>QWidget::mouseReleaseEvent ( <a href="qmouseevent.html">QMouseEvent</a>&nbsp;*&nbsp;e )<tt> [virtual protected]</tt>
1577</h3>
1578This event handler, for event <em>e</em>, can be reimplemented in a
1579subclass to receive mouse release events for the widget.
1580<p> <p>See also <a href="#mouseDoubleClickEvent">mouseDoubleClickEvent</a>(), <a href="#mouseMoveEvent">mouseMoveEvent</a>(), <a href="#event">event</a>(), and <a href="qmouseevent.html">QMouseEvent</a>.
1581
1582<p>Examples: <a href="drawlines-example.html#x1660">drawlines/connect.cpp</a>, <a href="hello-example.html#x1641">hello/hello.cpp</a>, <a href="popup-example.html#x1621">popup/popup.cpp</a>, <a href="qmag-example.html#x1802">qmag/qmag.cpp</a>, <a href="scribble-example.html#x950">scribble/scribble.cpp</a>, <a href="showimg-example.html#x1350">showimg/showimg.cpp</a>, and <a href="tutorial1-14.html#x2432">t14/cannon.cpp</a>.
1583<h3 class=fn>void <a name="move"></a>QWidget::move ( const&nbsp;<a href="qpoint.html">QPoint</a>&nbsp;&amp; )<tt> [slot]</tt>
1584</h3><p>Sets the position of the widget within its parent widget.
1585See the <a href="qwidget.html#pos-prop">"pos"</a> property for details.
1586<h3 class=fn>void <a name="move-2"></a>QWidget::move ( int&nbsp;x, int&nbsp;y )<tt> [virtual slot]</tt>
1587</h3>
1588This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
1589<p> This corresponds to <a href="#move">move</a>( <a href="qpoint.html">QPoint</a>(<em>x</em>, <em>y</em>) ).
1590
1591<h3 class=fn>void <a name="moveEvent"></a>QWidget::moveEvent ( <a href="qmoveevent.html">QMoveEvent</a>&nbsp;* )<tt> [virtual protected]</tt>
1592</h3>
1593This event handler can be reimplemented in a subclass to receive
1594widget move events. When the widget receives this event, it is
1595already at the new position.
1596<p> The old position is accessible through <a href="qmoveevent.html#oldPos">QMoveEvent::oldPos</a>().
1597<p> <p>See also <a href="#resizeEvent">resizeEvent</a>(), <a href="#event">event</a>(), <a href="#pos-prop">pos</a>, and <a href="qmoveevent.html">QMoveEvent</a>.
1598
1599<h3 class=fn>bool <a name="ownCursor"></a>QWidget::ownCursor () const
1600</h3><p>Returns TRUE if the widget uses its own cursor; otherwise returns FALSE.
1601See the <a href="qwidget.html#ownCursor-prop">"ownCursor"</a> property for details.
1602<h3 class=fn>bool <a name="ownFont"></a>QWidget::ownFont () const
1603</h3><p>Returns TRUE if the widget uses its own font; otherwise returns FALSE.
1604See the <a href="qwidget.html#ownFont-prop">"ownFont"</a> property for details.
1605<h3 class=fn>bool <a name="ownPalette"></a>QWidget::ownPalette () const
1606</h3><p>Returns TRUE if the widget uses its own palette; otherwise returns FALSE.
1607See the <a href="qwidget.html#ownPalette-prop">"ownPalette"</a> property for details.
1608<h3 class=fn>void <a name="paintEvent"></a>QWidget::paintEvent ( <a href="qpaintevent.html">QPaintEvent</a>&nbsp;* )<tt> [virtual protected]</tt>
1609</h3>
1610This event handler can be reimplemented in a subclass to receive
1611paint events.
1612<p> A paint event is a request to repaint all or part of the widget.
1613It can happen as a result of <a href="#repaint">repaint</a>() or <a href="#update">update</a>(), or because the
1614widget was obscured and has now been uncovered, or for many other
1615reasons.
1616<p> Many widgets can simply repaint their entire surface when asked
1617to, but some slow widgets need to optimize by painting only the
1618requested region: <a href="qpaintevent.html#region">QPaintEvent::region</a>(). This speed optimization
1619does not change the result, as painting is clipped to that region
1620during event processing. <a href="qlistview.html">QListView</a> and <a href="qcanvas.html">QCanvas</a> do this, for
1621example.
1622<p> Qt also tries to speed up painting by merging multiple paint
1623events into one. When update() is called several times or the
1624window system sends several paint events, Qt merges these events
1625into one event with a larger region (see <a href="qregion.html#unite">QRegion::unite</a>()).
1626repaint() does not permit this optimization, so we suggest using
1627update() when possible.
1628<p> When the paint event occurs, the update region has normally been
1629erased, so that you're painting on the widget's background. There
1630are a couple of exceptions and <a href="qpaintevent.html#erased">QPaintEvent::erased</a>() tells you
1631whether the widget has been erased or not.
1632<p> The background can be set using <a href="#setBackgroundMode">setBackgroundMode</a>(),
1633<a href="#setPaletteBackgroundColor">setPaletteBackgroundColor</a>() or <a href="#setBackgroundPixmap">setBackgroundPixmap</a>(). The
1634documentation for setBackgroundMode() elaborates on the
1635background; we recommend reading it.
1636<p> <p>See also <a href="#event">event</a>(), <a href="#repaint">repaint</a>(), <a href="#update">update</a>(), <a href="qpainter.html">QPainter</a>, <a href="qpixmap.html">QPixmap</a>, and <a href="qpaintevent.html">QPaintEvent</a>.
1637
1638<p>Examples: <a href="drawlines-example.html#x1661">drawlines/connect.cpp</a>, <a href="forever-example.html#x1055">forever/forever.cpp</a>, <a href="qmag-example.html#x1803">qmag/qmag.cpp</a>, <a href="scribble-example.html#x951">scribble/scribble.cpp</a>, <a href="splitter-example.html#x1302">splitter/splitter.cpp</a>, <a href="tutorial1-08.html#x2336">t8/cannon.cpp</a>, and <a href="tutorial1-09.html#x2346">t9/cannon.cpp</a>.
1639<p>Reimplemented in <a href="qbutton.html#paintEvent">QButton</a>, <a href="qframe.html#paintEvent">QFrame</a>, <a href="qglwidget.html#paintEvent">QGLWidget</a>, <a href="qsizegrip.html#paintEvent">QSizeGrip</a>, <a href="qstatusbar.html#paintEvent">QStatusBar</a>, and <a href="qtabbar.html#paintEvent">QTabBar</a>.
1640<h3 class=fn>const&nbsp;<a href="qpalette.html">QPalette</a>&nbsp;&amp; <a name="palette"></a>QWidget::palette () const
1641</h3><p>Returns the widget's palette.
1642See the <a href="qwidget.html#palette-prop">"palette"</a> property for details.
1643<h3 class=fn>const&nbsp;<a href="qcolor.html">QColor</a>&nbsp;&amp; <a name="paletteBackgroundColor"></a>QWidget::paletteBackgroundColor () const
1644</h3><p>Returns the background color of the widget.
1645See the <a href="qwidget.html#paletteBackgroundColor-prop">"paletteBackgroundColor"</a> property for details.
1646<h3 class=fn>const&nbsp;<a href="qpixmap.html">QPixmap</a>&nbsp;* <a name="paletteBackgroundPixmap"></a>QWidget::paletteBackgroundPixmap () const
1647</h3><p>Returns the background pixmap of the widget.
1648See the <a href="qwidget.html#paletteBackgroundPixmap-prop">"paletteBackgroundPixmap"</a> property for details.
1649<h3 class=fn>void <a name="paletteChange"></a>QWidget::paletteChange ( const&nbsp;<a href="qpalette.html">QPalette</a>&nbsp;&amp;&nbsp;oldPalette )<tt> [virtual protected]</tt>
1650</h3>
1651
1652<p> This virtual function is called from <a href="#setPalette">setPalette</a>(). <em>oldPalette</em>
1653is the previous palette; you can get the new palette from
1654<a href="#palette">palette</a>().
1655<p> Reimplement this function if your widget needs to know when its
1656palette changes.
1657<p> <p>See also <a href="#palette-prop">palette</a> and <a href="#palette-prop">palette</a>.
1658
1659<h3 class=fn>const&nbsp;<a href="qcolor.html">QColor</a>&nbsp;&amp; <a name="paletteForegroundColor"></a>QWidget::paletteForegroundColor () const
1660</h3><p>Returns the foreground color of the widget.
1661See the <a href="qwidget.html#paletteForegroundColor-prop">"paletteForegroundColor"</a> property for details.
1662<h3 class=fn><a href="qwidget.html">QWidget</a>&nbsp;* <a name="parentWidget"></a>QWidget::parentWidget ( bool&nbsp;sameWindow = FALSE ) const
1663</h3>
1664
1665<p> Returns the parent of this widget, or 0 if it does not have any
1666parent widget. If <em>sameWindow</em> is TRUE and the widget is top
1667level returns 0; otherwise returns the widget's parent.
1668
1669<p>Example: <a href="mdi-example.html#x2081">mdi/application.cpp</a>.
1670<h3 class=fn>void <a name="polish"></a>QWidget::polish ()<tt> [virtual slot]</tt>
1671</h3>
1672Delayed initialization of a widget.
1673<p> This function will be called <em>after</em> a widget has been fully
1674created and <em>before</em> it is shown the very first time.
1675<p> Polishing is useful for final initialization which depends on
1676having an instantiated widget. This is something a constructor
1677cannot guarantee since the initialization of the subclasses might
1678not be finished.
1679<p> After this function, the widget has a proper font and palette and
1680<a href="qapplication.html#polish">QApplication::polish</a>() has been called.
1681<p> Remember to call QWidget's implementation first when reimplementing this
1682function to ensure that your program does not end up in infinite recursion.
1683<p> <p>See also <a href="#constPolish">constPolish</a>() and <a href="qapplication.html#polish">QApplication::polish</a>().
1684
1685<p>Example: <a href="menu-example.html#x1883">menu/menu.cpp</a>.
1686<h3 class=fn><a href="qpoint.html">QPoint</a> <a name="pos"></a>QWidget::pos () const
1687</h3><p>Returns the position of the widget within its parent widget.
1688See the <a href="qwidget.html#pos-prop">"pos"</a> property for details.
1689<h3 class=fn>bool <a name="qwsEvent"></a>QWidget::qwsEvent ( QWSEvent * )<tt> [virtual protected]</tt>
1690</h3>
1691This special event handler can be reimplemented in a subclass to
1692receive native Qt/Embedded events.
1693<p> In your reimplementation of this function, if you want to stop the
1694event being handled by Qt, return TRUE. If you return FALSE, this
1695native event is passed back to Qt, which translates the event into
1696a Qt event and sends it to the widget.
1697<p> <b>Warning:</b> This function is not portable.
1698<p> <p>See also <a href="qapplication.html#qwsEventFilter">QApplication::qwsEventFilter</a>().
1699
1700<h3 class=fn>void <a name="raise"></a>QWidget::raise ()<tt> [slot]</tt>
1701</h3>
1702Raises this widget to the top of the parent widget's stack.
1703<p> After this call the widget will be visually in front of any
1704overlapping sibling widgets.
1705<p> <p>See also <a href="#lower">lower</a>() and <a href="#stackUnder">stackUnder</a>().
1706
1707<p>Example: <a href="showimg-example.html#x1352">showimg/showimg.cpp</a>.
1708<h3 class=fn>void <a name="recreate"></a>QWidget::recreate ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;parent, WFlags&nbsp;f, const&nbsp;<a href="qpoint.html">QPoint</a>&nbsp;&amp;&nbsp;p, bool&nbsp;showIt = FALSE )
1709</h3>
1710
1711<p> <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
1712<p> This method is provided to aid porting from Qt 1.0 to 2.0. It has
1713been renamed <a href="#reparent">reparent</a>() in Qt 2.0.
1714
1715<h3 class=fn><a href="qrect.html">QRect</a> <a name="rect"></a>QWidget::rect () const
1716</h3><p>Returns the internal geometry of the widget excluding any window frame.
1717See the <a href="qwidget.html#rect-prop">"rect"</a> property for details.
1718<h3 class=fn>void <a name="releaseKeyboard"></a>QWidget::releaseKeyboard ()
1719</h3>
1720Releases the keyboard grab.
1721<p> <p>See also <a href="#grabKeyboard">grabKeyboard</a>(), <a href="#grabMouse">grabMouse</a>(), and <a href="#releaseMouse">releaseMouse</a>().
1722
1723<h3 class=fn>void <a name="releaseMouse"></a>QWidget::releaseMouse ()
1724</h3>
1725Releases the mouse grab.
1726<p> <p>See also <a href="#grabMouse">grabMouse</a>(), <a href="#grabKeyboard">grabKeyboard</a>(), and <a href="#releaseKeyboard">releaseKeyboard</a>().
1727
1728<h3 class=fn>void <a name="repaint"></a>QWidget::repaint ( int&nbsp;x, int&nbsp;y, int&nbsp;w, int&nbsp;h, bool&nbsp;erase = TRUE )<tt> [slot]</tt>
1729</h3>
1730Repaints the widget directly by calling <a href="#paintEvent">paintEvent</a>() immediately,
1731unless updates are disabled or the widget is hidden.
1732<p> If <em>erase</em> is TRUE, Qt erases the area <em>(x, y, w, h)</em> before the
1733paintEvent() call.
1734<p> If <em>w</em> is negative, it is replaced with <tt>width() - x</tt>, and if
1735<em>h</em> is negative, it is replaced width <tt>height() - y</tt>.
1736<p> We suggest only using <a href="#repaint">repaint</a>() if you need an immediate repaint,
1737for example during animation. In almost all circumstances <a href="#update">update</a>()
1738is better, as it permits Qt to optimize for speed and minimize
1739flicker.
1740<p> <b>Warning:</b> If you call repaint() in a function which may itself be
1741called from paintEvent(), you may get infinite recursion. The
1742update() function never causes recursion.
1743<p> <p>See also <a href="#update">update</a>(), <a href="#paintEvent">paintEvent</a>(), <a href="#updatesEnabled-prop">updatesEnabled</a>, and <a href="#erase">erase</a>().
1744
1745<p>Example: <a href="qwerty-example.html#x407">qwerty/qwerty.cpp</a>.
1746<h3 class=fn>void <a name="repaint-2"></a>QWidget::repaint ()<tt> [slot]</tt>
1747</h3>
1748This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
1749<p> This version erases and repaints the entire widget.
1750
1751<h3 class=fn>void <a name="repaint-3"></a>QWidget::repaint ( bool&nbsp;erase )<tt> [slot]</tt>
1752</h3>
1753This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
1754<p> This version repaints the entire widget.
1755
1756<h3 class=fn>void <a name="repaint-4"></a>QWidget::repaint ( const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;r, bool&nbsp;erase = TRUE )<tt> [slot]</tt>
1757</h3>
1758This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
1759<p> Repaints the widget directly by calling <a href="#paintEvent">paintEvent</a>() directly,
1760unless updates are disabled or the widget is hidden.
1761<p> Erases the widget region <em>r</em> if <em>erase</em> is TRUE.
1762
1763<h3 class=fn>void <a name="repaint-5"></a>QWidget::repaint ( const&nbsp;<a href="qregion.html">QRegion</a>&nbsp;&amp;&nbsp;reg, bool&nbsp;erase = TRUE )<tt> [slot]</tt>
1764</h3>
1765This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
1766<p> Repaints the widget directly by calling <a href="#paintEvent">paintEvent</a>() directly,
1767unless updates are disabled or the widget is hidden.
1768<p> Erases the widget region <em>reg</em> if <em>erase</em> is TRUE.
1769<p> Only use repaint if your widget needs to be repainted immediately,
1770for example when doing some animation. In all other cases, use
1771<a href="#update">update</a>(). Calling update() many times in a row will generate a
1772single paint event.
1773<p> <b>Warning:</b> If you call <a href="#repaint">repaint</a>() in a function which may itself be
1774called from paintEvent(), you may get infinite recursion. The
1775update() function never causes recursion.
1776<p> <p>See also <a href="#update">update</a>(), <a href="#paintEvent">paintEvent</a>(), <a href="#updatesEnabled-prop">updatesEnabled</a>, and <a href="#erase">erase</a>().
1777
1778<h3 class=fn>void <a name="reparent"></a>QWidget::reparent ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;parent, WFlags&nbsp;f, const&nbsp;<a href="qpoint.html">QPoint</a>&nbsp;&amp;&nbsp;p, bool&nbsp;showIt = FALSE )<tt> [virtual]</tt>
1779</h3>
1780Reparents the widget. The widget gets a new <em>parent</em>, new widget
1781flags (<em>f</em>, but as usual, use 0) at a new position in its new
1782parent (<em>p</em>).
1783<p> If <em>showIt</em> is TRUE, <a href="#show">show</a>() is called once the widget has been
1784reparented.
1785<p> If the new parent widget is in a different top-level widget, the
1786reparented widget and its children are appended to the end of the
1787<a href="#setFocusPolicy">tab chain</a> of the new parent
1788widget, in the same internal order as before. If one of the moved
1789widgets had <a href="focus.html#keyboard-focus">keyboard focus</a>, <a href="#reparent">reparent</a>() calls <a href="#clearFocus">clearFocus</a>() for that
1790widget.
1791<p> If the new parent widget is in the same top-level widget as the
1792old parent, reparent doesn't change the tab order or keyboard
1793focus.
1794<p> <b>Warning:</b> It is extremely unlikely that you will ever need this
1795function. If you have a widget that changes its content
1796dynamically, it is far easier to use <a href="qwidgetstack.html">QWidgetStack</a> or <a href="qwizard.html">QWizard</a>.
1797<p> <p>See also <a href="#getWFlags">getWFlags</a>().
1798
1799<p>Example: <a href="toplevel-example.html#x2538">toplevel/options.ui.h</a>.
1800<h3 class=fn>void <a name="reparent-2"></a>QWidget::reparent ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;parent, const&nbsp;<a href="qpoint.html">QPoint</a>&nbsp;&amp;&nbsp;p, bool&nbsp;showIt = FALSE )
1801</h3>
1802This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
1803<p> A convenience version of reparent that does not take widget flags
1804as argument.
1805<p> Calls <a href="#reparent">reparent</a>(<em>parent</em>, <a href="#getWFlags">getWFlags</a>() &amp; ~<a href="qt.html#WidgetFlags-enum">WType_Mask</a>, <em>p</em>, <em>showIt</em>).
1806
1807<h3 class=fn>void <a name="resetInputContext"></a>QWidget::resetInputContext ()<tt> [protected]</tt>
1808</h3>
1809This function is called when the user finishes input composition,
1810e.g. changes focus to another widget, moves the cursor, etc.
1811
1812<h3 class=fn>void <a name="resize"></a>QWidget::resize ( const&nbsp;<a href="qsize.html">QSize</a>&nbsp;&amp; )<tt> [slot]</tt>
1813</h3><p>Sets the size of the widget excluding any window frame.
1814See the <a href="qwidget.html#size-prop">"size"</a> property for details.
1815<h3 class=fn>void <a name="resize-2"></a>QWidget::resize ( int&nbsp;w, int&nbsp;h )<tt> [virtual slot]</tt>
1816</h3>
1817This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
1818<p> This corresponds to <a href="#resize">resize</a>( <a href="qsize.html">QSize</a>(<em>w</em>, <em>h</em>) ).
1819
1820<h3 class=fn>void <a name="resizeEvent"></a>QWidget::resizeEvent ( <a href="qresizeevent.html">QResizeEvent</a>&nbsp;* )<tt> [virtual protected]</tt>
1821</h3>
1822This event handler can be reimplemented in a subclass to receive
1823widget resize events. When <a href="#resizeEvent">resizeEvent</a>() is called, the widget
1824already has its new geometry. The old size is accessible through
1825<a href="qresizeevent.html#oldSize">QResizeEvent::oldSize</a>().
1826<p> The widget will be erased and receive a paint event immediately
1827after processing the resize event. No drawing need be (or should
1828be) done inside this handler.
1829<p> Widgets that have been created with the <a href="qt.html#WidgetFlags-enum">WNoAutoErase</a> flag
1830will not be erased. Nevertheless, they will receive a paint event
1831for their entire area afterwards. Again, no drawing needs to be
1832done inside this handler.
1833<p> The default implementation calls <a href="#updateMask">updateMask</a>() if the widget has
1834<a href="#setAutoMask">automatic masking</a> enabled.
1835<p> <p>See also <a href="#moveEvent">moveEvent</a>(), <a href="#event">event</a>(), <a href="#size-prop">size</a>, <a href="qresizeevent.html">QResizeEvent</a>, and <a href="#paintEvent">paintEvent</a>().
1836
1837<p>Examples: <a href="drawdemo-example.html#x1089">drawdemo/drawdemo.cpp</a>, <a href="menu-example.html#x1884">menu/menu.cpp</a>, <a href="qmag-example.html#x1806">qmag/qmag.cpp</a>, <a href="scribble-example.html#x952">scribble/scribble.cpp</a>, <a href="showimg-example.html#x1353">showimg/showimg.cpp</a>, <a href="tooltip-example.html#x454">tooltip/tooltip.cpp</a>, and <a href="xform-example.html#x1269">xform/xform.cpp</a>.
1838<p>Reimplemented in <a href="qframe.html#resizeEvent">QFrame</a> and <a href="qglwidget.html#resizeEvent">QGLWidget</a>.
1839<h3 class=fn>void <a name="scroll"></a>QWidget::scroll ( int&nbsp;dx, int&nbsp;dy )
1840</h3>
1841Scrolls the widget including its children <em>dx</em> pixels to the
1842right and <em>dy</em> downwards. Both <em>dx</em> and <em>dy</em> may be negative.
1843<p> After scrolling, <a href="#scroll">scroll</a>() sends a paint event for the the part
1844that is read but not written. For example, when scrolling 10
1845pixels rightwards, the leftmost ten pixels of the widget need
1846repainting. The paint event may be delivered immediately or later,
1847depending on some heuristics (note that you might have to force
1848processing of paint events using <a href="qapplication.html#sendPostedEvents">QApplication::sendPostedEvents</a>()
1849when using scroll() and <a href="#move">move</a>() in combination).
1850<p> <p>See also <a href="qscrollview.html">QScrollView</a>, <a href="#erase">erase</a>(), and <a href="qpaintdevice.html#bitBlt">bitBlt</a>().
1851
1852<h3 class=fn>void <a name="scroll-2"></a>QWidget::scroll ( int&nbsp;dx, int&nbsp;dy, const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;r )
1853</h3>
1854This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
1855<p> This version only scrolls <em>r</em> and does not move the children of
1856the widget.
1857<p> If <em>r</em> is empty or invalid, the result is undefined.
1858<p> <p>See also <a href="qscrollview.html">QScrollView</a>, <a href="#erase">erase</a>(), and <a href="qpaintdevice.html#bitBlt">bitBlt</a>().
1859
1860<h3 class=fn>void <a name="setAcceptDrops"></a>QWidget::setAcceptDrops ( bool&nbsp;on )<tt> [virtual]</tt>
1861</h3><p>Sets whether drop events are enabled for this widget to <em>on</em>.
1862See the <a href="qwidget.html#acceptDrops-prop">"acceptDrops"</a> property for details.
1863<h3 class=fn>void <a name="setActiveWindow"></a>QWidget::setActiveWindow ()<tt> [virtual]</tt>
1864</h3>
1865Sets the top-level widget containing this widget to be the active
1866window.
1867<p> An active window is a visible top-level window that has the
1868keyboard input focus.
1869<p> This function performs the same operation as clicking the mouse on
1870the title bar of a top-level window. On X11, the result depends on
1871the Window Manager. If you want to ensure that the window is
1872stacked on top as well you should also call <a href="#raise">raise</a>(). Note that the
1873window must be visible, otherwise <a href="#setActiveWindow">setActiveWindow</a>() has no effect.
1874<p> On Windows, if you are calling this when the application is not
1875currently the active one then it will not make it the active
1876window. It will flash the task bar entry blue to indicate that
1877the window has done something. This is because Microsoft do not
1878allow an application to interrupt what the user is currently doing
1879in another application.
1880<p> <p>See also <a href="#isActiveWindow-prop">isActiveWindow</a>, <a href="#topLevelWidget">topLevelWidget</a>(), and <a href="#show">show</a>().
1881
1882<p>Reimplemented in <a href="qxtwidget.html#setActiveWindow">QXtWidget</a>.
1883<h3 class=fn>void <a name="setAutoMask"></a>QWidget::setAutoMask ( bool )<tt> [virtual]</tt>
1884</h3><p>Sets whether the auto mask feature is enabled for the widget.
1885See the <a href="qwidget.html#autoMask-prop">"autoMask"</a> property for details.
1886<h3 class=fn>void <a name="setBackgroundColor"></a>QWidget::setBackgroundColor ( const&nbsp;<a href="qcolor.html">QColor</a>&nbsp;&amp;&nbsp;c )<tt> [virtual]</tt>
1887</h3><b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
1888Use <a href="#setPaletteBackgroundColor">setPaletteBackgroundColor</a>() or <a href="#setEraseColor">setEraseColor</a>() instead.
1889<p>Examples: <a href="customlayout-example.html#x1540">customlayout/main.cpp</a>, <a href="desktop-example.html#x1761">desktop/desktop.cpp</a>, <a href="hello-example.html#x1648">hello/main.cpp</a>, <a href="movies-example.html#x523">movies/main.cpp</a>, and <a href="splitter-example.html#x1303">splitter/splitter.cpp</a>.
1890<h3 class=fn>void <a name="setBackgroundMode"></a>QWidget::setBackgroundMode ( <a href="qt.html#BackgroundMode-enum">BackgroundMode</a> )<tt> [virtual]</tt>
1891</h3><p>Sets the color role used for painting the background of the widget.
1892See the <a href="qwidget.html#backgroundMode-prop">"backgroundMode"</a> property for details.
1893<h3 class=fn>void <a name="setBackgroundMode-2"></a>QWidget::setBackgroundMode ( <a href="qt.html#BackgroundMode-enum">BackgroundMode</a>&nbsp;m, <a href="qt.html#BackgroundMode-enum">BackgroundMode</a>&nbsp;visual )
1894</h3>
1895This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
1896<p> Sets the widget's own background mode to <em>m</em> and the visual
1897background mode to <em>visual</em>. The visual background mode is used
1898with the designable properties <tt>backgroundColor</tt>, <tt>foregroundColor</tt> and <tt>backgroundPixmap</tt>.
1899<p> For complex controls, the logical background mode sometimes
1900differs from a widget's own background mode. A spinbox for example
1901has <a href="qt.html#BackgroundMode-enum">PaletteBackground</a> as background mode (typically dark gray),
1902while it's embedded lineedit control uses <a href="qt.html#BackgroundMode-enum">PaletteBase</a>
1903(typically white). Since the lineedit covers most of the visual
1904area of a spinbox, it defines <a href="qt.html#BackgroundMode-enum">PaletteBase</a> to be its <em>visual</em>
1905background mode. Changing the <tt>backgroundColor</tt> property thus
1906changes the lineedit control's background, which is exactly what
1907the user expects in <em>Qt Designer</em>.
1908
1909<h3 class=fn>void <a name="setBackgroundOrigin"></a>QWidget::setBackgroundOrigin ( <a href="qwidget.html#BackgroundOrigin-enum">BackgroundOrigin</a> )<tt> [virtual]</tt>
1910</h3><p>Sets the origin of the widget's background.
1911See the <a href="qwidget.html#backgroundOrigin-prop">"backgroundOrigin"</a> property for details.
1912<h3 class=fn>void <a name="setBackgroundPixmap"></a>QWidget::setBackgroundPixmap ( const&nbsp;<a href="qpixmap.html">QPixmap</a>&nbsp;&amp;&nbsp;pm )<tt> [virtual]</tt>
1913</h3><b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
1914Use <a href="#setPaletteBackgroundPixmap">setPaletteBackgroundPixmap</a>() or <a href="#setErasePixmap">setErasePixmap</a>() instead.
1915<p>Example: <a href="desktop-example.html#x1762">desktop/desktop.cpp</a>.
1916<h3 class=fn>void <a name="setBaseSize"></a>QWidget::setBaseSize ( const&nbsp;<a href="qsize.html">QSize</a>&nbsp;&amp; )
1917</h3><p>Sets the base size of the widget.
1918See the <a href="qwidget.html#baseSize-prop">"baseSize"</a> property for details.
1919<h3 class=fn>void <a name="setBaseSize-2"></a>QWidget::setBaseSize ( int&nbsp;basew, int&nbsp;baseh )
1920</h3>
1921This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
1922<p> This corresponds to <a href="#setBaseSize">setBaseSize</a>( <a href="qsize.html">QSize</a>(<em>basew</em>, <em>baseh</em>) ). Sets
1923the widgets base size to width <em>basew</em> and height <em>baseh</em>.
1924
1925<h3 class=fn>void <a name="setCaption"></a>QWidget::setCaption ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp; )<tt> [virtual slot]</tt>
1926</h3><p>Sets the window caption (title).
1927See the <a href="qwidget.html#caption-prop">"caption"</a> property for details.
1928<h3 class=fn>void <a name="setCursor"></a>QWidget::setCursor ( const&nbsp;<a href="qcursor.html">QCursor</a>&nbsp;&amp; )<tt> [virtual]</tt>
1929</h3><p>Sets the cursor shape for this widget.
1930See the <a href="qwidget.html#cursor-prop">"cursor"</a> property for details.
1931<h3 class=fn>void <a name="setDisabled"></a>QWidget::setDisabled ( bool&nbsp;disable )<tt> [slot]</tt>
1932</h3>
1933Disables widget input events if <em>disable</em> is TRUE; otherwise
1934enables input events.
1935<p> See the <a href="#enabled-prop">enabled</a> documentation for more information.
1936<p> <p>See also <a href="#isEnabledTo">isEnabledTo</a>(), <a href="qkeyevent.html">QKeyEvent</a>, <a href="qmouseevent.html">QMouseEvent</a>, and <a href="#enabledChange">enabledChange</a>().
1937
1938<h3 class=fn>void <a name="setEnabled"></a>QWidget::setEnabled ( bool )<tt> [virtual slot]</tt>
1939</h3><p>Sets whether the widget is enabled.
1940See the <a href="qwidget.html#enabled-prop">"enabled"</a> property for details.
1941<h3 class=fn>void <a name="setEraseColor"></a>QWidget::setEraseColor ( const&nbsp;<a href="qcolor.html">QColor</a>&nbsp;&amp;&nbsp;color )<tt> [virtual]</tt>
1942</h3>
1943Sets the erase color of the widget to <em>color</em>.
1944<p> The erase color is the color the widget is to be cleared to before
1945<a href="#paintEvent">paintEvent</a>() is called. If there is an erase pixmap (set using
1946<a href="#setErasePixmap">setErasePixmap</a>()), then this property has an indeterminate value.
1947<p> <p>See also <a href="#erasePixmap">erasePixmap</a>(), <a href="#backgroundColor">backgroundColor</a>(), <a href="#backgroundMode-prop">backgroundMode</a>, and <a href="#palette-prop">palette</a>.
1948
1949<h3 class=fn>void <a name="setErasePixmap"></a>QWidget::setErasePixmap ( const&nbsp;<a href="qpixmap.html">QPixmap</a>&nbsp;&amp;&nbsp;pixmap )<tt> [virtual]</tt>
1950</h3>
1951Sets the widget's erase pixmap to <em>pixmap</em>.
1952<p> This pixmap is used to clear the widget before <a href="#paintEvent">paintEvent</a>() is
1953called.
1954
1955<h3 class=fn>void <a name="setFixedHeight"></a>QWidget::setFixedHeight ( int&nbsp;h )
1956</h3>
1957Sets both the minimum and maximum heights of the widget to <em>h</em>
1958without changing the widths. Provided for convenience.
1959<p> <p>See also <a href="#sizeHint-prop">sizeHint</a>, <a href="#minimumSize-prop">minimumSize</a>, <a href="#maximumSize-prop">maximumSize</a>, and <a href="#setFixedSize">setFixedSize</a>().
1960
1961<p>Examples: <a href="simple-font-demo-example.html#x2859">fonts/simple-qfont-demo/viewer.cpp</a>, <a href="layout-example.html#x545">layout/layout.cpp</a>, <a href="qdir-example.html#x1852">qdir/qdir.cpp</a>, and <a href="showimg-example.html#x1354">showimg/showimg.cpp</a>.
1962<h3 class=fn>void <a name="setFixedSize"></a>QWidget::setFixedSize ( const&nbsp;<a href="qsize.html">QSize</a>&nbsp;&amp;&nbsp;s )
1963</h3>
1964Sets both the minimum and maximum sizes of the widget to <em>s</em>,
1965thereby preventing it from ever growing or shrinking.
1966<p> <p>See also <a href="#maximumSize-prop">maximumSize</a> and <a href="#minimumSize-prop">minimumSize</a>.
1967
1968<h3 class=fn>void <a name="setFixedSize-2"></a>QWidget::setFixedSize ( int&nbsp;w, int&nbsp;h )
1969</h3>
1970This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
1971<p> Sets the width of the widget to <em>w</em> and the height to <em>h</em>.
1972
1973<h3 class=fn>void <a name="setFixedWidth"></a>QWidget::setFixedWidth ( int&nbsp;w )
1974</h3>
1975Sets both the minimum and maximum width of the widget to <em>w</em>
1976without changing the heights. Provided for convenience.
1977<p> <p>See also <a href="#sizeHint-prop">sizeHint</a>, <a href="#minimumSize-prop">minimumSize</a>, <a href="#maximumSize-prop">maximumSize</a>, and <a href="#setFixedSize">setFixedSize</a>().
1978
1979<p>Examples: <a href="progressbar-example.html#x974">progressbar/progressbar.cpp</a> and <a href="qdir-example.html#x1853">qdir/qdir.cpp</a>.
1980<h3 class=fn>void <a name="setFocus"></a>QWidget::setFocus ()<tt> [virtual slot]</tt>
1981</h3>
1982Gives the keyboard input focus to this widget (or its focus
1983proxy) if this widget or one of its parents is the <a href="#isActiveWindow">active window</a>.
1984<p> First, a focus out event is sent to the focus widget (if any) to
1985tell it that it is about to lose the focus. Then a focus in event
1986is sent to this widget to tell it that it just received the focus.
1987(Nothing happens if the focus in and focus out widgets are the
1988same.)
1989<p> <a href="#setFocus">setFocus</a>() gives focus to a widget regardless of its focus policy,
1990but does not clear any keyboard grab (see <a href="#grabKeyboard">grabKeyboard</a>()).
1991<p> Be aware that if the widget is hidden, it will not accept focus.
1992<p> <b>Warning:</b> If you call setFocus() in a function which may itself be
1993called from <a href="#focusOutEvent">focusOutEvent</a>() or <a href="#focusInEvent">focusInEvent</a>(), you may get an
1994infinite recursion.
1995<p> <p>See also <a href="#focus-prop">focus</a>, <a href="#clearFocus">clearFocus</a>(), <a href="#focusInEvent">focusInEvent</a>(), <a href="#focusOutEvent">focusOutEvent</a>(), <a href="#focusPolicy-prop">focusPolicy</a>, <a href="qapplication.html#focusWidget">QApplication::focusWidget</a>(), <a href="#grabKeyboard">grabKeyboard</a>(), and <a href="#grabMouse">grabMouse</a>().
1996
1997<p>Examples: <a href="addressbook-example.html#x606">addressbook/centralwidget.cpp</a>, <a href="lineedits-example.html#x181">lineedits/lineedits.cpp</a>, <a href="mdi-example.html#x2084">mdi/application.cpp</a>, <a href="popup-example.html#x1625">popup/popup.cpp</a>, <a href="rot-example.html#x1378">rot13/rot13.cpp</a>, <a href="tutorial1-08.html#x2339">t8/main.cpp</a>, and <a href="wizard-example.html#x11">wizard/wizard.cpp</a>.
1998<h3 class=fn>void <a name="setFocusPolicy"></a>QWidget::setFocusPolicy ( <a href="qwidget.html#FocusPolicy-enum">FocusPolicy</a> )<tt> [virtual]</tt>
1999</h3><p>Sets the way the widget accepts keyboard focus.
2000See the <a href="qwidget.html#focusPolicy-prop">"focusPolicy"</a> property for details.
2001<h3 class=fn>void <a name="setFocusProxy"></a>QWidget::setFocusProxy ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;w )<tt> [virtual]</tt>
2002</h3>
2003Sets the widget's focus proxy to widget <em>w</em>. If <em>w</em> is 0, the
2004function resets this widget to have no focus proxy.
2005<p> Some widgets, such as <a href="qcombobox.html">QComboBox</a>, can "have focus", but create a
2006child widget to actually handle the focus. QComboBox, for example,
2007creates a <a href="qlineedit.html">QLineEdit</a> which handles the focus.
2008<p> <a href="#setFocusProxy">setFocusProxy</a>() sets the widget which will actually get focus when
2009"this widget" gets it. If there is a focus proxy, <a href="#focusPolicy">focusPolicy</a>(),
2010<a href="#setFocusPolicy">setFocusPolicy</a>(), <a href="#setFocus">setFocus</a>() and <a href="#hasFocus">hasFocus</a>() all operate on the
2011focus proxy.
2012<p> <p>See also <a href="#focusProxy">focusProxy</a>().
2013
2014<h3 class=fn>void <a name="setFont"></a>QWidget::setFont ( const&nbsp;<a href="qfont.html">QFont</a>&nbsp;&amp; )<tt> [virtual]</tt>
2015</h3><p>Sets the font currently set for the widget.
2016See the <a href="qwidget.html#font-prop">"font"</a> property for details.
2017<p>Reimplemented in <a href="qcombobox.html#setFont">QComboBox</a>, <a href="qlabel.html#setFont">QLabel</a>, and <a href="qtabdialog.html#setFont">QTabDialog</a>.
2018<h3 class=fn>void <a name="setFont-2"></a>QWidget::setFont ( const&nbsp;<a href="qfont.html">QFont</a>&nbsp;&amp;&nbsp;f, bool )
2019</h3>
2020
2021<b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
2022<p> Use <a href="#setFont">setFont</a>(const <a href="qfont.html">QFont</a>& font) instead.
2023
2024<h3 class=fn>void <a name="setGeometry"></a>QWidget::setGeometry ( const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp; )<tt> [virtual slot]</tt>
2025</h3><p>Sets the geometry of the widget relative to its parent and excluding the window frame.
2026See the <a href="qwidget.html#geometry-prop">"geometry"</a> property for details.
2027<h3 class=fn>void <a name="setGeometry-2"></a>QWidget::setGeometry ( int&nbsp;x, int&nbsp;y, int&nbsp;w, int&nbsp;h )<tt> [virtual slot]</tt>
2028</h3>
2029This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
2030<p> This corresponds to <a href="#setGeometry">setGeometry</a>( <a href="qrect.html">QRect</a>(<em>x</em>, <em>y</em>, <em>w</em>, <em>h</em>) ).
2031
2032<h3 class=fn>void <a name="setHidden"></a>QWidget::setHidden ( bool&nbsp;hide )<tt> [slot]</tt>
2033</h3><p>Sets whether the widget is explicitly hidden to <em>hide</em>.
2034See the <a href="qwidget.html#hidden-prop">"hidden"</a> property for details.
2035<h3 class=fn>void <a name="setIcon"></a>QWidget::setIcon ( const&nbsp;<a href="qpixmap.html">QPixmap</a>&nbsp;&amp; )<tt> [virtual slot]</tt>
2036</h3><p>Sets the widget's icon.
2037See the <a href="qwidget.html#icon-prop">"icon"</a> property for details.
2038<h3 class=fn>void <a name="setIconText"></a>QWidget::setIconText ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp; )<tt> [virtual slot]</tt>
2039</h3><p>Sets the widget's icon text.
2040See the <a href="qwidget.html#iconText-prop">"iconText"</a> property for details.
2041<h3 class=fn>void <a name="setInputMethodEnabled"></a>QWidget::setInputMethodEnabled ( bool&nbsp;b )
2042</h3><p>Sets enables or disables the use of input methods for this widget to <em>b</em>.
2043See the <a href="qwidget.html#inputMethodEnabled-prop">"inputMethodEnabled"</a> property for details.
2044<h3 class=fn>void <a name="setKeyCompression"></a>QWidget::setKeyCompression ( bool&nbsp;compress )<tt> [virtual protected]</tt>
2045</h3>
2046Enables key event compression, if <em>compress</em> is TRUE, and
2047disables it if <em>compress</em> is FALSE.
2048<p> Key compression is off by default (except for <a href="qlineedit.html">QLineEdit</a> and
2049<a href="qtextedit.html">QTextEdit</a>), so widgets receive one key press event for each key
2050press (or more, since autorepeat is usually on). If you turn it on
2051and your program doesn't keep up with key input, Qt may try to
2052compress key events so that more than one character can be
2053processed in each event.
2054<p> For example, a word processor widget might receive 2, 3 or more
2055characters in each <a href="qkeyevent.html#text">QKeyEvent::text</a>(), if the layout recalculation
2056takes too long for the CPU.
2057<p> If a widget supports multiple character unicode input, it is
2058always safe to turn the compression on.
2059<p> Qt performs key event compression only for printable characters.
2060Modifier keys, cursor movement keys, function keys and
2061miscellaneous action keys (e.g. Escape, Enter, Backspace,
2062PrintScreen) will stop key event compression, even if there are
2063more compressible key events available.
2064<p> Not all platforms support this compression, in which case turning
2065it on will have no effect.
2066<p> <p>See also <a href="qkeyevent.html#text">QKeyEvent::text</a>().
2067
2068<h3 class=fn>void <a name="setMask"></a>QWidget::setMask ( const&nbsp;<a href="qbitmap.html">QBitmap</a>&nbsp;&amp;&nbsp;bitmap )<tt> [virtual]</tt>
2069</h3>
2070Causes only the pixels of the widget for which <em>bitmap</em> has a
2071corresponding 1 bit to be visible. Use Qt::color0 to draw
2072transparent regions and Qt::color1 to draw opaque regions of the
2073bitmap.
2074<p> If the region includes pixels outside the <a href="#rect">rect</a>() of the widget,
2075window system controls in that area may or may not be visible,
2076depending on the platform.
2077<p> Note that this effect can be slow if the region is particularly
2078complex.
2079<p> See <tt>examples/tux</tt> for an example of masking for transparency.
2080<p> <p>See also <a href="#clearMask">clearMask</a>().
2081
2082<h3 class=fn>void <a name="setMask-2"></a>QWidget::setMask ( const&nbsp;<a href="qregion.html">QRegion</a>&nbsp;&amp;&nbsp;region )<tt> [virtual]</tt>
2083</h3>
2084This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
2085<p> Causes only the parts of the widget which overlap <em>region</em> to be
2086visible. If the region includes pixels outside the <a href="#rect">rect</a>() of the
2087widget, window system controls in that area may or may not be
2088visible, depending on the platform.
2089<p> Note that this effect can be slow if the region is particularly
2090complex.
2091<p> <p>See also <a href="#clearMask">clearMask</a>().
2092
2093<h3 class=fn>void <a name="setMaximumHeight"></a>QWidget::setMaximumHeight ( int&nbsp;maxh )
2094</h3><p>Sets the widget's maximum height to <em>maxh</em>.
2095See the <a href="qwidget.html#maximumHeight-prop">"maximumHeight"</a> property for details.
2096<h3 class=fn>void <a name="setMaximumSize"></a>QWidget::setMaximumSize ( const&nbsp;<a href="qsize.html">QSize</a>&nbsp;&amp; )
2097</h3><p>Sets the widget's maximum size.
2098See the <a href="qwidget.html#maximumSize-prop">"maximumSize"</a> property for details.
2099<h3 class=fn>void <a name="setMaximumSize-2"></a>QWidget::setMaximumSize ( int&nbsp;maxw, int&nbsp;maxh )<tt> [virtual]</tt>
2100</h3>
2101This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
2102<p> This function corresponds to <a href="#setMaximumSize">setMaximumSize</a>( <a href="qsize.html">QSize</a>(<em>maxw</em>, <em>maxh</em>) ). Sets the maximum width to <em>maxw</em> and the maximum height
2103to <em>maxh</em>.
2104
2105<h3 class=fn>void <a name="setMaximumWidth"></a>QWidget::setMaximumWidth ( int&nbsp;maxw )
2106</h3><p>Sets the widget's maximum width to <em>maxw</em>.
2107See the <a href="qwidget.html#maximumWidth-prop">"maximumWidth"</a> property for details.
2108<h3 class=fn>void <a name="setMicroFocusHint"></a>QWidget::setMicroFocusHint ( int&nbsp;x, int&nbsp;y, int&nbsp;width, int&nbsp;height, bool&nbsp;text = TRUE, <a href="qfont.html">QFont</a>&nbsp;*&nbsp;f = 0 )<tt> [virtual protected]</tt>
2109</h3>
2110When a widget gets focus, it should call <a href="#setMicroFocusHint">setMicroFocusHint</a>() with
2111some appropriate position and size, <em>x</em>, <em>y</em>, <em>width</em> and <em>height</em>. This has no <em>visual</em> effect, it just provides hints to
2112any system-specific input handling tools.
2113<p> The <em>text</em> argument should be TRUE if this is a position for text
2114input.
2115<p> In the Windows version of Qt, this method sets the system caret,
2116which is used for user Accessibility focus handling. If <em>text</em>
2117is TRUE, it also sets the IME composition window in Far East Asian
2118language input systems.
2119<p> In the X11 version of Qt, if <em>text</em> is TRUE, this method sets the
2120XIM "spot" point for complex language input handling.
2121<p> The font <em>f</em> is a rendering hint to the currently active input method.
2122If <em>f</em> is 0 the widget's font is used.
2123<p> <p>See also <a href="#microFocusHint-prop">microFocusHint</a>.
2124
2125<h3 class=fn>void <a name="setMinimumHeight"></a>QWidget::setMinimumHeight ( int&nbsp;minh )
2126</h3><p>Sets the widget's minimum height to <em>minh</em>.
2127See the <a href="qwidget.html#minimumHeight-prop">"minimumHeight"</a> property for details.
2128<h3 class=fn>void <a name="setMinimumSize"></a>QWidget::setMinimumSize ( const&nbsp;<a href="qsize.html">QSize</a>&nbsp;&amp; )
2129</h3><p>Sets the widget's minimum size.
2130See the <a href="qwidget.html#minimumSize-prop">"minimumSize"</a> property for details.
2131<h3 class=fn>void <a name="setMinimumSize-2"></a>QWidget::setMinimumSize ( int&nbsp;minw, int&nbsp;minh )<tt> [virtual]</tt>
2132</h3>
2133This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
2134<p> This function corresponds to <a href="#setMinimumSize">setMinimumSize</a>( <a href="qsize.html">QSize</a>(minw, minh) ).
2135Sets the minimum width to <em>minw</em> and the minimum height to <em>minh</em>.
2136
2137<h3 class=fn>void <a name="setMinimumWidth"></a>QWidget::setMinimumWidth ( int&nbsp;minw )
2138</h3><p>Sets the widget's minimum width to <em>minw</em>.
2139See the <a href="qwidget.html#minimumWidth-prop">"minimumWidth"</a> property for details.
2140<h3 class=fn>void <a name="setMouseTracking"></a>QWidget::setMouseTracking ( bool&nbsp;enable )<tt> [virtual slot]</tt>
2141</h3><p>Sets whether mouse tracking is enabled for the widget to <em>enable</em>.
2142See the <a href="qwidget.html#mouseTracking-prop">"mouseTracking"</a> property for details.
2143<h3 class=fn>void <a name="setPalette"></a>QWidget::setPalette ( const&nbsp;<a href="qpalette.html">QPalette</a>&nbsp;&amp; )<tt> [virtual]</tt>
2144</h3><p>Sets the widget's palette.
2145See the <a href="qwidget.html#palette-prop">"palette"</a> property for details.
2146<p>Reimplemented in <a href="qcombobox.html#setPalette">QComboBox</a>, <a href="qscrollbar.html#setPalette">QScrollBar</a>, and <a href="qslider.html#setPalette">QSlider</a>.
2147<h3 class=fn>void <a name="setPalette-2"></a>QWidget::setPalette ( const&nbsp;<a href="qpalette.html">QPalette</a>&nbsp;&amp;&nbsp;p, bool )
2148</h3>
2149
2150<b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
2151<p> Use <a href="#setPalette">setPalette</a>( const <a href="qpalette.html">QPalette</a>& p ) instead.
2152
2153<h3 class=fn>void <a name="setPaletteBackgroundColor"></a>QWidget::setPaletteBackgroundColor ( const&nbsp;<a href="qcolor.html">QColor</a>&nbsp;&amp; )<tt> [virtual]</tt>
2154</h3><p>Sets the background color of the widget.
2155See the <a href="qwidget.html#paletteBackgroundColor-prop">"paletteBackgroundColor"</a> property for details.
2156<h3 class=fn>void <a name="setPaletteBackgroundPixmap"></a>QWidget::setPaletteBackgroundPixmap ( const&nbsp;<a href="qpixmap.html">QPixmap</a>&nbsp;&amp; )<tt> [virtual]</tt>
2157</h3><p>Sets the background pixmap of the widget.
2158See the <a href="qwidget.html#paletteBackgroundPixmap-prop">"paletteBackgroundPixmap"</a> property for details.
2159<h3 class=fn>void <a name="setPaletteForegroundColor"></a>QWidget::setPaletteForegroundColor ( const&nbsp;<a href="qcolor.html">QColor</a>&nbsp;&amp; )
2160</h3><p>Sets the foreground color of the widget.
2161See the <a href="qwidget.html#paletteForegroundColor-prop">"paletteForegroundColor"</a> property for details.
2162<h3 class=fn>void <a name="setShown"></a>QWidget::setShown ( bool&nbsp;show )<tt> [slot]</tt>
2163</h3><p>Sets whether the widget is shown to <em>show</em>.
2164See the <a href="qwidget.html#shown-prop">"shown"</a> property for details.
2165<h3 class=fn>void <a name="setSizeIncrement"></a>QWidget::setSizeIncrement ( const&nbsp;<a href="qsize.html">QSize</a>&nbsp;&amp; )
2166</h3><p>Sets the size increment of the widget.
2167See the <a href="qwidget.html#sizeIncrement-prop">"sizeIncrement"</a> property for details.
2168<h3 class=fn>void <a name="setSizeIncrement-2"></a>QWidget::setSizeIncrement ( int&nbsp;w, int&nbsp;h )<tt> [virtual]</tt>
2169</h3>
2170This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
2171<p> Sets the x (width) size increment to <em>w</em> and the y (height) size
2172increment to <em>h</em>.
2173
2174<h3 class=fn>void <a name="setSizePolicy"></a>QWidget::setSizePolicy ( <a href="qsizepolicy.html">QSizePolicy</a> )<tt> [virtual]</tt>
2175</h3><p>Sets the default layout behavior of the widget.
2176See the <a href="qwidget.html#sizePolicy-prop">"sizePolicy"</a> property for details.
2177<h3 class=fn>void <a name="setSizePolicy-2"></a>QWidget::setSizePolicy ( <a href="qsizepolicy.html#SizeType-enum">QSizePolicy::SizeType</a>&nbsp;hor, <a href="qsizepolicy.html#SizeType-enum">QSizePolicy::SizeType</a>&nbsp;ver, bool&nbsp;hfw = FALSE )
2178</h3>
2179This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
2180<p> Sets the size policy of the widget to <em>hor</em>, <em>ver</em> and <em>hfw</em>
2181(height for width).
2182<p> <p>See also <a href="qsizepolicy.html#QSizePolicy">QSizePolicy::QSizePolicy</a>().
2183
2184<h3 class=fn>void <a name="setStyle"></a>QWidget::setStyle ( <a href="qstyle.html">QStyle</a>&nbsp;*&nbsp;style )
2185</h3>
2186Sets the widget's GUI style to <em>style</em>. Ownership of the style
2187object is not transferred.
2188<p> If no style is set, the widget uses the application's style,
2189<a href="qapplication.html#style">QApplication::style</a>() instead.
2190<p> Setting a widget's style has no effect on existing or future child
2191widgets.
2192<p> <b>Warning:</b> This function is particularly useful for demonstration
2193purposes, where you want to show Qt's styling capabilities. Real
2194applications should avoid it and use one consistent GUI style
2195instead.
2196<p> <p>See also <a href="#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>().
2197
2198<p>Examples: <a href="grapher-nsplugin-example.html#x2778">grapher/grapher.cpp</a> and <a href="progressbar-example.html#x975">progressbar/progressbar.cpp</a>.
2199<h3 class=fn><a href="qstyle.html">QStyle</a>&nbsp;* <a name="setStyle-2"></a>QWidget::setStyle ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;style )
2200</h3>
2201This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
2202<p> Sets the widget's GUI style to <em>style</em> using the <a href="qstylefactory.html">QStyleFactory</a>.
2203
2204<h3 class=fn>void <a name="setTabOrder"></a>QWidget::setTabOrder ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;first, <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;second )<tt> [static]</tt>
2205</h3>
2206Moves the <em>second</em> widget around the ring of focus widgets so
2207that <a href="focus.html#keyboard-focus">keyboard focus</a> moves from the <em>first</em> widget to the <em>second</em> widget when the Tab key is pressed.
2208<p> Note that since the tab order of the <em>second</em> widget is changed,
2209you should order a chain like this:
2210<p> <pre>
2211 <a href="#setTabOrder">setTabOrder</a>( a, b ); // a to b
2212 <a href="#setTabOrder">setTabOrder</a>( b, c ); // a to b to c
2213 <a href="#setTabOrder">setTabOrder</a>( c, d ); // a to b to c to d
2214 </pre>
2215
2216<p> <em>not</em> like this:
2217<p> <pre>
2218 <a href="#setTabOrder">setTabOrder</a>( c, d ); // c to d WRONG
2219 <a href="#setTabOrder">setTabOrder</a>( a, b ); // a to b AND c to d
2220 <a href="#setTabOrder">setTabOrder</a>( b, c ); // a to b to c, but not c to d
2221 </pre>
2222
2223<p> If <em>first</em> or <em>second</em> has a focus proxy, <a href="#setTabOrder">setTabOrder</a>()
2224correctly substitutes the proxy.
2225<p> <p>See also <a href="#focusPolicy-prop">focusPolicy</a> and <a href="#setFocusProxy">setFocusProxy</a>().
2226
2227<p>Example: <a href="customlayout-example.html#x1542">customlayout/main.cpp</a>.
2228<h3 class=fn>void <a name="setUpdatesEnabled"></a>QWidget::setUpdatesEnabled ( bool&nbsp;enable )<tt> [virtual slot]</tt>
2229</h3><p>Sets whether updates are enabled to <em>enable</em>.
2230See the <a href="qwidget.html#updatesEnabled-prop">"updatesEnabled"</a> property for details.
2231<h3 class=fn>void <a name="setWFlags"></a>QWidget::setWFlags ( WFlags&nbsp;f )<tt> [virtual protected]</tt>
2232</h3>
2233
2234<p> Sets the widget flags <em>f</em>.
2235<p> Widget flags are a combination of <a href="qt.html#WidgetFlags-enum">Qt::WidgetFlags</a>.
2236<p> <p>See also <a href="#testWFlags">testWFlags</a>(), <a href="#getWFlags">getWFlags</a>(), and <a href="#clearWFlags">clearWFlags</a>().
2237
2238<h3 class=fn>void <a name="setWindowOpacity"></a>QWidget::setWindowOpacity ( double&nbsp;level )
2239</h3><p>Sets the level of opacity for the window to <em>level</em>.
2240See the <a href="qwidget.html#windowOpacity-prop">"windowOpacity"</a> property for details.
2241<h3 class=fn>void <a name="setWindowState"></a>QWidget::setWindowState ( uint&nbsp;windowState )
2242</h3>
2243
2244<p> Sets the <a href="qt.html#WindowState">window state</a> to <em>windowState</em>. The window state is a OR'ed
2245combination of Qt::WindowState: <a href="qt.html#WindowState-enum">WindowMinimized</a>, <a href="qt.html#WindowState-enum">WindowMaximized</a>, <a href="qt.html#WindowState-enum">WindowFullScreen</a> and <a href="qt.html#WindowState-enum">WindowActive</a>.
2246<p> If the window is not visible (i.e. <a href="#isVisible">isVisible</a>() returns FALSE), the
2247window state will take effect when <a href="#show">show</a>() is called. For visible
2248windows, the change is immediate. For example, to toggle between
2249full-screen and mormal mode, use the following code:
2250<p> <pre>
2251 w-&gt;setWindowState(w-&gt;windowState() ^ WindowFullScreen);
2252 </pre>
2253
2254<p> In order to restore and activate a minimized window (while
2255preserving its maximized and/or full-screen state), use the following:
2256<p> <pre>
2257 w-&gt;setWindowState(w-&gt;windowState() &amp; ~WindowMinimized | WindowActive);
2258 </pre>
2259
2260<p> Note: On some window systems <a href="qt.html#WindowState-enum">WindowActive</a> is not immediate, and may be
2261ignored in certain cases.
2262<p> <p>See also <a href="qt.html#WindowState-enum">Qt::WindowState</a> and <a href="#windowState">windowState</a>().
2263
2264<h3 class=fn>void <a name="show"></a>QWidget::show ()<tt> [virtual slot]</tt>
2265</h3>
2266Shows the widget and its child widgets.
2267<p> If its size or position has changed, Qt guarantees that a widget
2268gets move and resize events just before it is shown.
2269<p> You almost never have to reimplement this function. If you need to
2270change some settings before a widget is shown, use <a href="#showEvent">showEvent</a>()
2271instead. If you need to do some delayed initialization use
2272<a href="#polish">polish</a>().
2273<p> <p>See also <a href="#showEvent">showEvent</a>(), <a href="#hide">hide</a>(), <a href="#showMinimized">showMinimized</a>(), <a href="#showMaximized">showMaximized</a>(), <a href="#showNormal">showNormal</a>(), <a href="#visible-prop">visible</a>, and <a href="#polish">polish</a>().
2274
2275<p>Examples: <a href="aclock-example.html#x1215">aclock/main.cpp</a>, <a href="qdialog.html#x2135">life/main.cpp</a>, <a href="popup-example.html#x1628">popup/popup.cpp</a>, <a href="tutorial1-01.html#x2286">t1/main.cpp</a>, <a href="tutorial1-03.html#x2302">t3/main.cpp</a>, <a href="tutorial1-04.html#x2309">t4/main.cpp</a>, and <a href="toplevel-example.html#x2542">toplevel/options.ui.h</a>.
2276<p>Reimplemented in <a href="qdialog.html#show">QDialog</a> and <a href="qmenubar.html#show">QMenuBar</a>.
2277<h3 class=fn>void <a name="showEvent"></a>QWidget::showEvent ( <a href="qshowevent.html">QShowEvent</a>&nbsp;* )<tt> [virtual protected]</tt>
2278</h3>
2279This event handler can be reimplemented in a subclass to receive
2280widget show events.
2281<p> Non-spontaneous show events are sent to widgets immediately before
2282they are shown. The spontaneous show events of top-level widgets
2283are delivered afterwards.
2284<p> <p>See also <a href="#event">event</a>() and <a href="qshowevent.html">QShowEvent</a>.
2285
2286<p>Example: <a href="qdir-example.html#x1854">qdir/qdir.cpp</a>.
2287<h3 class=fn>void <a name="showFullScreen"></a>QWidget::showFullScreen ()<tt> [slot]</tt>
2288</h3>
2289Shows the widget in full-screen mode.
2290<p> Calling this function only affects top-level widgets.
2291<p> To return from full-screen mode, call <a href="#showNormal">showNormal</a>().
2292<p> Full-screen mode works fine under Windows, but has certain
2293problems under X. These problems are due to limitations of the
2294ICCCM protocol that specifies the communication between X11
2295clients and the window manager. ICCCM simply does not understand
2296the concept of non-decorated full-screen windows. Therefore, the
2297best we can do is to request a borderless window and place and
2298resize it to fill the entire screen. Depending on the window
2299manager, this may or may not work. The borderless window is
2300requested using MOTIF hints, which are at least partially
2301supported by virtually all modern window managers.
2302<p> An alternative would be to bypass the window manager entirely and
2303create a window with the WX11BypassWM flag. This has other severe
2304problems though, like totally broken <a href="focus.html#keyboard-focus">keyboard focus</a> and very
2305strange effects on desktop changes or when the user raises other
2306windows.
2307<p> X11 window managers that follow modern post-ICCCM specifications
2308support full-screen mode properly.
2309<p> <p>See also <a href="#showNormal">showNormal</a>(), <a href="#showMaximized">showMaximized</a>(), <a href="#show">show</a>(), <a href="#hide">hide</a>(), and <a href="#visible-prop">visible</a>.
2310
2311<h3 class=fn>void <a name="showMaximized"></a>QWidget::showMaximized ()<tt> [virtual slot]</tt>
2312</h3>
2313Shows the widget maximized.
2314<p> Calling this function only affects <a href="#isTopLevel">top-level
2315 widgets</a>.
2316<p> On X11, this function may not work properly with certain window
2317managers. See the <a href="geometry.html">Window Geometry
2318 documentation</a> for an explanation.
2319<p> <p>See also <a href="#setWindowState">setWindowState</a>(), <a href="#showNormal">showNormal</a>(), <a href="#showMinimized">showMinimized</a>(), <a href="#show">show</a>(), <a href="#hide">hide</a>(), and <a href="#visible-prop">visible</a>.
2320
2321<p>Examples: <a href="canvas-example.html#x2968">canvas/main.cpp</a>, <a href="helpviewer-example.html#x1045">helpviewer/main.cpp</a>, <a href="mdi-example.html#x2087">mdi/application.cpp</a>, <a href="qwerty-example.html#x422">qwerty/main.cpp</a>, <a href="qwerty-example.html#x413">qwerty/qwerty.cpp</a>, and <a href="scribble-example.html#x960">scribble/main.cpp</a>.
2322<h3 class=fn>void <a name="showMinimized"></a>QWidget::showMinimized ()<tt> [virtual slot]</tt>
2323</h3>
2324Shows the widget minimized, as an icon.
2325<p> Calling this function only affects <a href="#isTopLevel">top-level
2326 widgets</a>.
2327<p> <p>See also <a href="#showNormal">showNormal</a>(), <a href="#showMaximized">showMaximized</a>(), <a href="#show">show</a>(), <a href="#hide">hide</a>(), <a href="#visible-prop">visible</a>, and <a href="#minimized-prop">minimized</a>.
2328
2329<h3 class=fn>void <a name="showNormal"></a>QWidget::showNormal ()<tt> [virtual slot]</tt>
2330</h3>
2331Restores the widget after it has been maximized or minimized.
2332<p> Calling this function only affects <a href="#isTopLevel">top-level
2333 widgets</a>.
2334<p> <p>See also <a href="#setWindowState">setWindowState</a>(), <a href="#showMinimized">showMinimized</a>(), <a href="#showMaximized">showMaximized</a>(), <a href="#show">show</a>(), <a href="#hide">hide</a>(), and <a href="#visible-prop">visible</a>.
2335
2336<p>Example: <a href="mdi-example.html#x2088">mdi/application.cpp</a>.
2337<h3 class=fn><a href="qsize.html">QSize</a> <a name="size"></a>QWidget::size () const
2338</h3><p>Returns the size of the widget excluding any window frame.
2339See the <a href="qwidget.html#size-prop">"size"</a> property for details.
2340<h3 class=fn><a href="qsize.html">QSize</a> <a name="sizeHint"></a>QWidget::sizeHint () const<tt> [virtual]</tt>
2341</h3><p>Returns the recommended size for the widget.
2342See the <a href="qwidget.html#sizeHint-prop">"sizeHint"</a> property for details.
2343<p>Reimplemented in <a href="qsizegrip.html#sizeHint">QSizeGrip</a>.
2344<h3 class=fn><a href="qsize.html">QSize</a> <a name="sizeIncrement"></a>QWidget::sizeIncrement () const
2345</h3><p>Returns the size increment of the widget.
2346See the <a href="qwidget.html#sizeIncrement-prop">"sizeIncrement"</a> property for details.
2347<h3 class=fn><a href="qsizepolicy.html">QSizePolicy</a> <a name="sizePolicy"></a>QWidget::sizePolicy () const<tt> [virtual]</tt>
2348</h3><p>Returns the default layout behavior of the widget.
2349See the <a href="qwidget.html#sizePolicy-prop">"sizePolicy"</a> property for details.
2350<h3 class=fn>void <a name="stackUnder"></a>QWidget::stackUnder ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;w )<tt> [slot]</tt>
2351</h3>
2352Places the widget under <em>w</em> in the parent widget's stack.
2353<p> To make this work, the widget itself and <em>w</em> must be siblings.
2354<p> <p>See also <a href="#raise">raise</a>() and <a href="#lower">lower</a>().
2355
2356<h3 class=fn><a href="qstyle.html">QStyle</a>&nbsp;&amp; <a name="style"></a>QWidget::style () const
2357</h3>
2358Returns the GUI style for this widget
2359<p> <p>See also <a href="#setStyle">QWidget::setStyle</a>(), <a href="qapplication.html#setStyle">QApplication::setStyle</a>(), and <a href="qapplication.html#style">QApplication::style</a>().
2360
2361<h3 class=fn>void <a name="styleChange"></a>QWidget::styleChange ( <a href="qstyle.html">QStyle</a>&nbsp;&amp;&nbsp;oldStyle )<tt> [virtual protected]</tt>
2362</h3>
2363This virtual function is called when the style of the widgets
2364changes. <em>oldStyle</em> is the previous GUI style; you can get the
2365new style from <a href="#style">style</a>().
2366<p> Reimplement this function if your widget needs to know when its
2367GUI style changes. You will almost certainly need to update the
2368widget using <a href="#update">update</a>().
2369<p> The default implementation updates the widget including its
2370geometry.
2371<p> <p>See also <a href="qapplication.html#setStyle">QApplication::setStyle</a>(), <a href="#style">style</a>(), <a href="#update">update</a>(), and <a href="#updateGeometry">updateGeometry</a>().
2372
2373<h3 class=fn>void <a name="tabletEvent"></a>QWidget::tabletEvent ( <a href="qtabletevent.html">QTabletEvent</a>&nbsp;*&nbsp;e )<tt> [virtual protected]</tt>
2374</h3>
2375This event handler, for event <em>e</em>, can be reimplemented in a
2376subclass to receive tablet events for the widget.
2377<p> If you reimplement this handler, it is very important that you
2378<a href="qtabletevent.html">ignore()</a> the event if you do not handle
2379it, so that the widget's parent can interpret it.
2380<p> The default implementation ignores the event.
2381<p> <p>See also <a href="qtabletevent.html#ignore">QTabletEvent::ignore</a>(), <a href="qtabletevent.html#accept">QTabletEvent::accept</a>(), <a href="#event">event</a>(), and <a href="qtabletevent.html">QTabletEvent</a>.
2382
2383<h3 class=fn>WFlags <a name="testWFlags"></a>QWidget::testWFlags ( WFlags&nbsp;f ) const
2384</h3>
2385
2386<p> Returns the bitwise AND of the widget flags and <em>f</em>.
2387<p> Widget flags are a combination of <a href="qt.html#WidgetFlags-enum">Qt::WidgetFlags</a>.
2388<p> If you want to test for the presence of multiple flags (or
2389composite flags such as <a href="qt.html#WidgetFlags-enum">WStyle_Splash</a>), test the
2390return value for equality against the argument. For example:
2391<p> <pre>
2392 int flags = WStyle_Tool | WStyle_NoBorder;
2393 if ( <a href="#testWFlags">testWFlags</a>(flags) )
2394 ... // WStyle_Tool or WStyle_NoBorder or both are set
2395 if ( <a href="#testWFlags">testWFlags</a>(flags) == flags )
2396 ... // both WStyle_Tool and WStyle_NoBorder are set
2397 </pre>
2398
2399<p> <p>See also <a href="#getWFlags">getWFlags</a>(), <a href="#setWFlags">setWFlags</a>(), and <a href="#clearWFlags">clearWFlags</a>().
2400
2401<h3 class=fn><a href="qwidget.html">QWidget</a>&nbsp;* <a name="topLevelWidget"></a>QWidget::topLevelWidget () const
2402</h3>
2403Returns the top-level widget for this widget, i.e. the next
2404ancestor widget that has (or could have) a window-system frame.
2405<p> If the widget is a top-level, the widget itself is returned.
2406<p> Typical usage is changing the window caption:
2407<p> <pre>
2408 aWidget-&gt;topLevelWidget()-&gt;setCaption( "New Caption" );
2409 </pre>
2410
2411<p> <p>See also <a href="#isTopLevel-prop">isTopLevel</a>.
2412
2413<h3 class=fn>void <a name="unsetCursor"></a>QWidget::unsetCursor ()<tt> [virtual]</tt>
2414</h3><p>Resets the cursor shape for this widget.
2415See the <a href="qwidget.html#cursor-prop">"cursor"</a> property for details.
2416<h3 class=fn>void <a name="unsetFont"></a>QWidget::unsetFont ()
2417</h3><p>Resets the font currently set for the widget.
2418See the <a href="qwidget.html#font-prop">"font"</a> property for details.
2419<h3 class=fn>void <a name="unsetPalette"></a>QWidget::unsetPalette ()
2420</h3><p>Resets the widget's palette.
2421See the <a href="qwidget.html#palette-prop">"palette"</a> property for details.
2422<h3 class=fn>void <a name="update"></a>QWidget::update ()<tt> [slot]</tt>
2423</h3>
2424Updates the widget unless updates are disabled or the widget is
2425hidden.
2426<p> This function does not cause an immediate repaint; instead it
2427schedules a paint event for processing when Qt returns to the main
2428event loop. This permits Qt to optimize for more speed and less
2429flicker than a call to <a href="#repaint">repaint</a>() does.
2430<p> Calling <a href="#update">update</a>() several times normally results in just one
2431<a href="#paintEvent">paintEvent</a>() call.
2432<p> Qt normally erases the widget's area before the paintEvent() call.
2433If the <a href="qt.html#WidgetFlags-enum">WRepaintNoErase</a> widget flag is set, the widget is
2434responsible for painting all its pixels itself.
2435<p> <p>See also <a href="#repaint">repaint</a>(), <a href="#paintEvent">paintEvent</a>(), <a href="#updatesEnabled-prop">updatesEnabled</a>, <a href="#erase">erase</a>(), and <a href="#setWFlags">setWFlags</a>().
2436
2437<p>Examples: <a href="desktop-example.html#x1763">desktop/desktop.cpp</a> and <a href="scrollview-example.html#x662">scrollview/scrollview.cpp</a>.
2438<h3 class=fn>void <a name="update-2"></a>QWidget::update ( int&nbsp;x, int&nbsp;y, int&nbsp;w, int&nbsp;h )<tt> [slot]</tt>
2439</h3>
2440This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
2441<p> Updates a rectangle (<em>x</em>, <em>y</em>, <em>w</em>, <em>h</em>) inside the widget
2442unless updates are disabled or the widget is hidden.
2443<p> This function does not cause an immediate repaint; instead it
2444schedules a paint event for processing when Qt returns to the main
2445event loop. This permits Qt to optimize for more speed and less
2446flicker and a call to <a href="#repaint">repaint</a>() does.
2447<p> Calling <a href="#update">update</a>() several times normally results in just one
2448<a href="#paintEvent">paintEvent</a>() call.
2449<p> If <em>w</em> is negative, it is replaced with <tt>width() - x</tt>. If <em>h</em>
2450is negative, it is replaced width <tt>height() - y</tt>.
2451<p> Qt normally erases the specified area before the paintEvent()
2452call. If the <a href="qt.html#WidgetFlags-enum">WRepaintNoErase</a> widget flag is set, the widget is
2453responsible for painting all its pixels itself.
2454<p> <p>See also <a href="#repaint">repaint</a>(), <a href="#paintEvent">paintEvent</a>(), <a href="#updatesEnabled-prop">updatesEnabled</a>, and <a href="#erase">erase</a>().
2455
2456<h3 class=fn>void <a name="update-3"></a>QWidget::update ( const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;r )<tt> [slot]</tt>
2457</h3>
2458This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
2459<p> Updates a rectangle <em>r</em> inside the widget unless updates are
2460disabled or the widget is hidden.
2461<p> This function does not cause an immediate repaint; instead it
2462schedules a paint event for processing when Qt returns to the main
2463event loop. This permits Qt to optimize for more speed and less
2464flicker and a call to <a href="#repaint">repaint</a>() does.
2465<p> Calling <a href="#update">update</a>() several times normally results in just one
2466<a href="#paintEvent">paintEvent</a>() call.
2467
2468<h3 class=fn>void <a name="updateGeometry"></a>QWidget::updateGeometry ()
2469</h3>
2470Notifies the layout system that this widget has changed and may
2471need to change geometry.
2472<p> Call this function if the <a href="#sizeHint">sizeHint</a>() or <a href="#sizePolicy">sizePolicy</a>() have changed.
2473<p> For explicitly hidden widgets, <a href="#updateGeometry">updateGeometry</a>() is a no-op. The
2474layout system will be notified as soon as the widget is shown.
2475
2476<h3 class=fn>void <a name="updateMask"></a>QWidget::updateMask ()<tt> [virtual protected]</tt>
2477</h3>
2478This function can be reimplemented in a subclass to support
2479transparent widgets. It should be called whenever a widget changes
2480state in a way that means that the shape mask must be recalculated.
2481<p> <p>See also <a href="#autoMask-prop">autoMask</a>, <a href="#setMask">setMask</a>(), and <a href="#clearMask">clearMask</a>().
2482
2483<h3 class=fn><a href="qrect.html">QRect</a> <a name="visibleRect"></a>QWidget::visibleRect () const
2484</h3><p>Returns the visible rectangle.
2485See the <a href="qwidget.html#visibleRect-prop">"visibleRect"</a> property for details.
2486<h3 class=fn>void <a name="wheelEvent"></a>QWidget::wheelEvent ( <a href="qwheelevent.html">QWheelEvent</a>&nbsp;*&nbsp;e )<tt> [virtual protected]</tt>
2487</h3>
2488This event handler, for event <em>e</em>, can be reimplemented in a
2489subclass to receive wheel events for the widget.
2490<p> If you reimplement this handler, it is very important that you
2491<a href="qwheelevent.html">ignore()</a> the event if you do not handle
2492it, so that the widget's parent can interpret it.
2493<p> The default implementation ignores the event.
2494<p> <p>See also <a href="qwheelevent.html#ignore">QWheelEvent::ignore</a>(), <a href="qwheelevent.html#accept">QWheelEvent::accept</a>(), <a href="#event">event</a>(), and <a href="qwheelevent.html">QWheelEvent</a>.
2495
2496<h3 class=fn>int <a name="width"></a>QWidget::width () const
2497</h3><p>Returns the width of the widget excluding any window frame.
2498See the <a href="qwidget.html#width-prop">"width"</a> property for details.
2499<h3 class=fn>bool <a name="winEvent"></a>QWidget::winEvent ( MSG * )<tt> [virtual protected]</tt>
2500</h3>
2501This special event handler can be reimplemented in a subclass to
2502receive native Windows events.
2503<p> In your reimplementation of this function, if you want to stop the
2504event being handled by Qt, return TRUE. If you return FALSE, this
2505native event is passed back to Qt, which translates the event into
2506a Qt event and sends it to the widget.
2507<p> <b>Warning:</b> This function is not portable.
2508<p> <p>See also <a href="qapplication.html#winEventFilter">QApplication::winEventFilter</a>().
2509
2510<h3 class=fn>WId <a name="winId"></a>QWidget::winId () const
2511</h3>
2512
2513<p> Returns the window system identifier of the widget.
2514<p> Portable in principle, but if you use it you are probably about to
2515do something non-portable. Be careful.
2516<p> <p>See also <a href="#find">find</a>().
2517
2518<h3 class=fn>void <a name="windowActivationChange"></a>QWidget::windowActivationChange ( bool&nbsp;oldActive )<tt> [virtual protected]</tt>
2519</h3>
2520
2521<p> This virtual function is called for a widget when its window is
2522activated or deactivated by the window system. <em>oldActive</em> is the
2523previous state; you can get the new setting from <a href="#isActiveWindow">isActiveWindow</a>().
2524<p> Reimplement this function if your widget needs to know when its
2525window becomes activated or deactivated.
2526<p> The default implementation updates the visible part of the widget
2527if the inactive and the active colorgroup are different for colors
2528other than the highlight and link colors.
2529<p> <p>See also <a href="#setActiveWindow">setActiveWindow</a>(), <a href="#isActiveWindow-prop">isActiveWindow</a>, <a href="#update">update</a>(), and <a href="#palette-prop">palette</a>.
2530
2531<h3 class=fn>double <a name="windowOpacity"></a>QWidget::windowOpacity () const
2532</h3><p>Returns the level of opacity for the window.
2533See the <a href="qwidget.html#windowOpacity-prop">"windowOpacity"</a> property for details.
2534<h3 class=fn>uint <a name="windowState"></a>QWidget::windowState () const
2535</h3> Returns the current <a href="qt.html#WindowState">window state</a>. The window state is a OR'ed
2536combination of Qt::WindowState: <a href="qt.html#WindowState-enum">WindowMinimized</a>, <a href="qt.html#WindowState-enum">WindowMaximized</a>, <a href="qt.html#WindowState-enum">WindowFullScreen</a> and <a href="qt.html#WindowState-enum">WindowActive</a>.
2537<p> <p>See also <a href="qt.html#WindowState-enum">Qt::WindowState</a> and <a href="#setWindowState">setWindowState</a>().
2538
2539<h3 class=fn>int <a name="x"></a>QWidget::x () const
2540</h3><p>Returns the x coordinate of the widget relative to its parent including any window frame.
2541See the <a href="qwidget.html#x-prop">"x"</a> property for details.
2542<h3 class=fn>bool <a name="x11Event"></a>QWidget::x11Event ( XEvent * )<tt> [virtual protected]</tt>
2543</h3>
2544This special event handler can be reimplemented in a subclass to
2545receive native X11 events.
2546<p> In your reimplementation of this function, if you want to stop the
2547event being handled by Qt, return TRUE. If you return FALSE, this
2548native event is passed back to Qt, which translates the event into
2549a Qt event and sends it to the widget.
2550<p> <b>Warning:</b> This function is not portable.
2551<p> <p>See also <a href="qapplication.html#x11EventFilter">QApplication::x11EventFilter</a>().
2552
2553<p>Reimplemented in <a href="qxtwidget.html#x11Event">QXtWidget</a>.
2554<h3 class=fn>int <a name="y"></a>QWidget::y () const
2555</h3><p>Returns the y coordinate of the widget relative to its parent and including any window frame.
2556See the <a href="qwidget.html#y-prop">"y"</a> property for details.
2557<hr><h2>Property Documentation</h2>
2558<h3 class=fn>bool <a name="acceptDrops-prop"></a>acceptDrops</h3>
2559<p>This property holds whether drop events are enabled for this widget.
2560<p>Setting this property to TRUE announces to the system that this
2561widget <em>may</em> be able to accept drop events.
2562<p> If the widget is the desktop (<a href="#isDesktop">QWidget::isDesktop</a>()), this may
2563fail if another application is using the desktop; you can call
2564<a href="#acceptDrops">acceptDrops</a>() to test if this occurs.
2565<p> <b>Warning:</b>
2566Do not modify this property in a Drag&Drop event handler.
2567
2568<p>Set this property's value with <a href="#setAcceptDrops">setAcceptDrops</a>() and get this property's value with <a href="#acceptDrops">acceptDrops</a>().
2569<h3 class=fn>bool <a name="autoMask-prop"></a>autoMask</h3>
2570<p>This property holds whether the auto mask feature is enabled for the widget.
2571<p>Transparent widgets use a mask to define their visible region.
2572QWidget has some built-in support to make the task of
2573recalculating the mask easier. When setting auto mask to TRUE,
2574<a href="#updateMask">updateMask</a>() will be called whenever the widget is resized or
2575changes its focus state. Note that you must reimplement
2576updateMask() (which should include a call to <a href="#setMask">setMask</a>()) or nothing
2577will happen.
2578<p> Note: when you re-implement <a href="#resizeEvent">resizeEvent</a>(), <a href="#focusInEvent">focusInEvent</a>() or
2579<a href="#focusOutEvent">focusOutEvent</a>() in your custom widgets and still want to ensure
2580that the auto mask calculation works, you should add:
2581<p> <pre>
2582 if ( <a href="#autoMask">autoMask</a>() )
2583 <a href="#updateMask">updateMask</a>();
2584 </pre>
2585
2586<p> at the end of your event handlers. This is true for all member
2587functions that change the appearance of the widget in a way that
2588requires a recalculation of the mask.
2589<p> While being a technically appealing concept, masks have a big
2590drawback: when using complex masks that cannot be expressed easily
2591with relatively simple regions, they can be very slow on some
2592window systems. The classic example is a transparent label. The
2593complex shape of its contents makes it necessary to represent its
2594mask by a bitmap, which consumes both memory and time. If all you
2595want is to blend the background of several neighboring widgets
2596together seamlessly, you will probably want to use
2597<a href="#setBackgroundOrigin">setBackgroundOrigin</a>() rather than a mask.
2598<p> <p>See also <a href="#updateMask">updateMask</a>(), <a href="#setMask">setMask</a>(), <a href="#clearMask">clearMask</a>(), and <a href="#backgroundOrigin-prop">backgroundOrigin</a>.
2599
2600<p>Set this property's value with <a href="#setAutoMask">setAutoMask</a>() and get this property's value with <a href="#autoMask">autoMask</a>().
2601<h3 class=fn><a href="qbrush.html">QBrush</a> <a name="backgroundBrush-prop"></a>backgroundBrush</h3>
2602<p>This property holds the widget's background brush.
2603<p>The background brush depends on a widget's palette and its
2604background mode.
2605<p> <p>See also <a href="#backgroundColor">backgroundColor</a>(), <a href="#backgroundPixmap">backgroundPixmap</a>(), <a href="#eraseColor">eraseColor</a>(), <a href="#palette-prop">palette</a>, and <a href="qapplication.html#setPalette">QApplication::setPalette</a>().
2606
2607<p>Get this property's value with <a href="#backgroundBrush">backgroundBrush</a>().
2608<h3 class=fn><a href="qt.html#BackgroundMode-enum">BackgroundMode</a> <a name="backgroundMode-prop"></a>backgroundMode</h3>
2609<p>This property holds the color role used for painting the background of the widget.
2610<p>setPaletteBackgroundColor() reads this property to determine which
2611entry of the <a href="#palette-prop">palette</a> to set.
2612<p> For most widgets the default suffices (<a href="qt.html#BackgroundMode-enum">PaletteBackground</a>,
2613typically gray), but some need to use <a href="qt.html#BackgroundMode-enum">PaletteBase</a> (the
2614background color for text output, typically white) or another
2615role.
2616<p> <a href="qlistbox.html">QListBox</a>, which is "sunken" and uses the base color to contrast
2617with its environment, does this in its constructor:
2618<p> <pre>
2619 <a href="#setBackgroundMode">setBackgroundMode</a>( <a href="qt.html#BackgroundMode-enum">PaletteBase</a> );
2620 </pre>
2621
2622<p> You will never need to set the background mode of a built-in
2623widget in Qt, but you might consider setting it in your custom
2624widgets, so that <a href="#setPaletteBackgroundColor">setPaletteBackgroundColor</a>() works as expected.
2625<p> Note that two of the BackgroundMode values make no sense for
2626<a href="#setBackgroundMode">setBackgroundMode</a>(), namely <a href="qt.html#BackgroundMode-enum">FixedPixmap</a> and <a href="qt.html#BackgroundMode-enum">FixedColor</a>. You
2627must call <a href="#setBackgroundPixmap">setBackgroundPixmap</a>() and setPaletteBackgroundColor()
2628instead.
2629
2630<p>Set this property's value with <a href="#setBackgroundMode">setBackgroundMode</a>() and get this property's value with <a href="#backgroundMode">backgroundMode</a>().
2631<h3 class=fn><a href="qwidget.html#BackgroundOrigin-enum">BackgroundOrigin</a> <a name="backgroundOrigin-prop"></a>backgroundOrigin</h3>
2632<p>This property holds the origin of the widget's background.
2633<p>The origin is either WidgetOrigin (the default), ParentOrigin,
2634WindowOrigin or AncestorOrigin.
2635<p> This only makes a difference if the widget has a background
2636pixmap, in which case positioning matters. Using <a href="#BackgroundOrigin-enum">WindowOrigin</a>
2637for several neighboring widgets makes the background blend
2638together seamlessly. <a href="#BackgroundOrigin-enum">AncestorOrigin</a> allows blending backgrounds
2639seamlessly when an ancestor of the widget has an origin other than
2640<a href="#BackgroundOrigin-enum">WindowOrigin</a>.
2641<p> <p>See also <a href="#backgroundPixmap">backgroundPixmap</a>() and <a href="#backgroundMode-prop">backgroundMode</a>.
2642
2643<p>Set this property's value with <a href="#setBackgroundOrigin">setBackgroundOrigin</a>() and get this property's value with <a href="#backgroundOrigin">backgroundOrigin</a>().
2644<h3 class=fn><a href="qsize.html">QSize</a> <a name="baseSize-prop"></a>baseSize</h3>
2645<p>This property holds the base size of the widget.
2646<p>The base size is used to calculate a proper widget size if the
2647widget defines <a href="#sizeIncrement">sizeIncrement</a>().
2648<p> <p>See also <a href="#sizeIncrement-prop">sizeIncrement</a>.
2649
2650<p>Set this property's value with <a href="#setBaseSize">setBaseSize</a>() and get this property's value with <a href="#baseSize">baseSize</a>().
2651<h3 class=fn><a href="qstring.html">QString</a> <a name="caption-prop"></a>caption</h3>
2652<p>This property holds the window caption (title).
2653<p>This property only makes sense for top-level widgets. If no
2654caption has been set, the caption is <a href="qstring.html#QString-null">QString::null</a>.
2655<p> <p>See also <a href="#icon-prop">icon</a> and <a href="#iconText-prop">iconText</a>.
2656
2657<p>Set this property's value with <a href="#setCaption">setCaption</a>() and get this property's value with <a href="#caption">caption</a>().
2658<h3 class=fn><a href="qrect.html">QRect</a> <a name="childrenRect-prop"></a>childrenRect</h3>
2659<p>This property holds the bounding rectangle of the widget's children.
2660<p>Hidden children are excluded.
2661<p> <p>See also <a href="#childrenRegion-prop">childrenRegion</a> and <a href="#geometry-prop">geometry</a>.
2662
2663<p>Get this property's value with <a href="#childrenRect">childrenRect</a>().
2664<h3 class=fn><a href="qregion.html">QRegion</a> <a name="childrenRegion-prop"></a>childrenRegion</h3>
2665<p>This property holds the combined region occupied by the widget's children.
2666<p>Hidden children are excluded.
2667<p> <p>See also <a href="#childrenRect-prop">childrenRect</a> and <a href="#geometry-prop">geometry</a>.
2668
2669<p>Get this property's value with <a href="#childrenRegion">childrenRegion</a>().
2670<h3 class=fn><a href="qcolorgroup.html">QColorGroup</a> <a name="colorGroup-prop"></a>colorGroup</h3>
2671<p>This property holds the current color group of the widget palette.
2672<p>The color group is determined by the state of the widget. A
2673disabled widget has the <a href="qpalette.html#disabled">QPalette::disabled</a>() color group, a widget
2674with <a href="focus.html#keyboard-focus">keyboard focus</a> has the <a href="qpalette.html#active">QPalette::active</a>() color group, and an
2675inactive widget has the <a href="qpalette.html#inactive">QPalette::inactive</a>() color group.
2676<p> <p>See also <a href="#palette-prop">palette</a>.
2677
2678<p>Get this property's value with <a href="#colorGroup">colorGroup</a>().
2679<h3 class=fn><a href="qcursor.html">QCursor</a> <a name="cursor-prop"></a>cursor</h3>
2680<p>This property holds the cursor shape for this widget.
2681<p>The mouse cursor will assume this shape when it's over this
2682widget. See the <a href="qt.html#CursorShape-enum">list of predefined cursor
2683 objects</a> for a range of useful shapes.
2684<p> An editor widget might use an I-beam cursor:
2685<pre>
2686 <a href="#setCursor">setCursor</a>( <a href="qt.html#CursorShape-enum">IbeamCursor</a> );
2687 </pre>
2688
2689<p> If no cursor has been set, or after a call to <a href="#unsetCursor">unsetCursor</a>(), the
2690parent's cursor is used. The function unsetCursor() has no effect
2691on top-level widgets.
2692<p> <p>See also <a href="qapplication.html#setOverrideCursor">QApplication::setOverrideCursor</a>().
2693
2694<p>Set this property's value with <a href="#setCursor">setCursor</a>(), get this property's value with <a href="#cursor">cursor</a>(), and reset this property's value with <a href="#unsetCursor">unsetCursor</a>().
2695<h3 class=fn>bool <a name="customWhatsThis-prop"></a>customWhatsThis</h3>
2696<p>This property holds whether the widget wants to handle What's This help manually.
2697<p>The default implementation of <a href="#customWhatsThis">customWhatsThis</a>() returns FALSE,
2698which means the widget will not receive any events in Whats This
2699mode.
2700<p> The widget may leave What's This mode by calling
2701<a href="qwhatsthis.html#leaveWhatsThisMode">QWhatsThis::leaveWhatsThisMode</a>(), with or without actually
2702displaying any help text.
2703<p> You can also reimplement customWhatsThis() if your widget is a
2704"passive interactor" supposed to work under all circumstances.
2705Simply don't call QWhatsThis::leaveWhatsThisMode() in that case.
2706<p> <p>See also <a href="qwhatsthis.html#inWhatsThisMode">QWhatsThis::inWhatsThisMode</a>() and <a href="qwhatsthis.html#leaveWhatsThisMode">QWhatsThis::leaveWhatsThisMode</a>().
2707
2708<p>Get this property's value with <a href="#customWhatsThis">customWhatsThis</a>().
2709<h3 class=fn>bool <a name="enabled-prop"></a>enabled</h3>
2710<p>This property holds whether the widget is enabled.
2711<p>An enabled widget receives keyboard and mouse events; a disabled
2712widget does not. In fact, an enabled widget only receives keyboard
2713events when it is in focus.
2714<p> Some widgets display themselves differently when they are
2715disabled. For example a button might draw its label grayed out. If
2716your widget needs to know when it becomes enabled or disabled, you
2717can reimplement the <a href="#enabledChange">enabledChange</a>() function.
2718<p> Disabling a widget implicitly disables all its children. Enabling
2719respectively enables all child widgets unless they have been
2720explicitly disabled.
2721<p> <p>See also <a href="#enabled-prop">enabled</a>, <a href="#isEnabledTo">isEnabledTo</a>(), <a href="qkeyevent.html">QKeyEvent</a>, <a href="qmouseevent.html">QMouseEvent</a>, and <a href="#enabledChange">enabledChange</a>().
2722
2723<p>Set this property's value with <a href="#setEnabled">setEnabled</a>() and get this property's value with <a href="#isEnabled">isEnabled</a>().
2724<h3 class=fn>bool <a name="focus-prop"></a>focus</h3>
2725<p>This property holds whether this widget (or its focus proxy) has the keyboard input focus.
2726<p>Effectively equivalent to <tt>qApp-&gt;focusWidget() == this</tt>.
2727<p> <p>See also <a href="#setFocus">setFocus</a>(), <a href="#clearFocus">clearFocus</a>(), <a href="#focusPolicy-prop">focusPolicy</a>, and <a href="qapplication.html#focusWidget">QApplication::focusWidget</a>().
2728
2729<p>Get this property's value with <a href="#hasFocus">hasFocus</a>().
2730<h3 class=fn>bool <a name="focusEnabled-prop"></a>focusEnabled</h3>
2731<p>This property holds whether the widget accepts <a href="focus.html#keyboard-focus">keyboard focus</a>.
2732<p>Keyboard focus is initially disabled (i.e. <a href="#focusPolicy">focusPolicy</a>() ==
2733<a href="#FocusPolicy-enum">QWidget::NoFocus</a>).
2734<p> You must enable keyboard focus for a widget if it processes
2735keyboard events. This is normally done from the widget's
2736constructor. For instance, the <a href="qlineedit.html">QLineEdit</a> constructor calls
2737<a href="#setFocusPolicy">setFocusPolicy</a>(QWidget::StrongFocus).
2738<p> <p>See also <a href="#focusPolicy-prop">focusPolicy</a>, <a href="#focusInEvent">focusInEvent</a>(), <a href="#focusOutEvent">focusOutEvent</a>(), <a href="#keyPressEvent">keyPressEvent</a>(), <a href="#keyReleaseEvent">keyReleaseEvent</a>(), and <a href="#enabled-prop">enabled</a>.
2739
2740<p>Get this property's value with <a href="#isFocusEnabled">isFocusEnabled</a>().
2741<h3 class=fn><a href="qwidget.html#FocusPolicy-enum">FocusPolicy</a> <a name="focusPolicy-prop"></a>focusPolicy</h3>
2742<p>This property holds the way the widget accepts <a href="focus.html#keyboard-focus">keyboard focus</a>.
2743<p>The policy is <a href="#FocusPolicy-enum">QWidget::TabFocus</a> if the widget accepts keyboard
2744focus by tabbing, <a href="#FocusPolicy-enum">QWidget::ClickFocus</a> if the widget accepts
2745focus by clicking, <a href="#FocusPolicy-enum">QWidget::StrongFocus</a> if it accepts both, and
2746<a href="#FocusPolicy-enum">QWidget::NoFocus</a> (the default) if it does not accept focus at
2747all.
2748<p> You must enable keyboard focus for a widget if it processes
2749keyboard events. This is normally done from the widget's
2750constructor. For instance, the <a href="qlineedit.html">QLineEdit</a> constructor calls
2751<a href="#setFocusPolicy">setFocusPolicy</a>(QWidget::StrongFocus).
2752<p> <p>See also <a href="#focusEnabled-prop">focusEnabled</a>, <a href="#focusInEvent">focusInEvent</a>(), <a href="#focusOutEvent">focusOutEvent</a>(), <a href="#keyPressEvent">keyPressEvent</a>(), <a href="#keyReleaseEvent">keyReleaseEvent</a>(), and <a href="#enabled-prop">enabled</a>.
2753
2754<p>Set this property's value with <a href="#setFocusPolicy">setFocusPolicy</a>() and get this property's value with <a href="#focusPolicy">focusPolicy</a>().
2755<h3 class=fn><a href="qfont.html">QFont</a> <a name="font-prop"></a>font</h3>
2756<p>This property holds the font currently set for the widget.
2757<p>The <a href="#fontInfo">fontInfo</a>() function reports the actual font that is being used
2758by the widget.
2759<p> As long as no special font has been set, or after <a href="#unsetFont">unsetFont</a>() is
2760called, this is either a special font for the widget class, the
2761parent's font or (if this widget is a top level widget), the
2762default application font.
2763<p> This code fragment sets a 12 point helvetica bold font:
2764<pre>
2765 <a href="qfont.html">QFont</a> f( "Helvetica", 12, QFont::Bold );
2766 <a href="#setFont">setFont</a>( f );
2767 </pre>
2768
2769<p> In addition to setting the font, <a href="#setFont">setFont</a>() informs all children
2770about the change.
2771<p> <p>See also <a href="#fontChange">fontChange</a>(), <a href="#fontInfo">fontInfo</a>(), <a href="#fontMetrics">fontMetrics</a>(), and <a href="#ownFont-prop">ownFont</a>.
2772
2773<p>Set this property's value with <a href="#setFont">setFont</a>(), get this property's value with <a href="#font">font</a>(), and reset this property's value with <a href="#unsetFont">unsetFont</a>().
2774<h3 class=fn><a href="qrect.html">QRect</a> <a name="frameGeometry-prop"></a>frameGeometry</h3>
2775<p>This property holds geometry of the widget relative to its parent including any window frame.
2776<p>See the <a href="geometry.html">Window Geometry documentation</a>
2777for an overview of geometry issues with top-level widgets.
2778<p> <p>See also <a href="#geometry-prop">geometry</a>, <a href="#x-prop">x</a>, <a href="#y-prop">y</a>, and <a href="#pos-prop">pos</a>.
2779
2780<p>Get this property's value with <a href="#frameGeometry">frameGeometry</a>().
2781<h3 class=fn><a href="qsize.html">QSize</a> <a name="frameSize-prop"></a>frameSize</h3>
2782<p>This property holds the size of the widget including any window frame.
2783<p>
2784<p>Get this property's value with <a href="#frameSize">frameSize</a>().
2785<h3 class=fn>bool <a name="fullScreen-prop"></a>fullScreen</h3>
2786<p>This property holds whether the widget is full screen.
2787<p>Get this property's value with <a href="#isFullScreen">isFullScreen</a>().
2788<p><p>See also <a href="#windowState">windowState</a>(), <a href="#minimized-prop">minimized</a>, and <a href="#maximized-prop">maximized</a>.
2789
2790<h3 class=fn><a href="qrect.html">QRect</a> <a name="geometry-prop"></a>geometry</h3>
2791<p>This property holds the geometry of the widget relative to its parent and excluding the window frame.
2792<p>When changing the geometry, the widget, if visible, receives a
2793move event (<a href="#moveEvent">moveEvent</a>()) and/or a resize event (<a href="#resizeEvent">resizeEvent</a>())
2794immediately. If the widget is not currently visible, it is
2795guaranteed to receive appropriate events before it is shown.
2796<p> The size component is adjusted if it lies outside the range
2797defined by <a href="#minimumSize">minimumSize</a>() and <a href="#maximumSize">maximumSize</a>().
2798<p> <a href="#setGeometry">setGeometry</a>() is virtual, and all other overloaded setGeometry()
2799implementations in Qt call it.
2800<p> <b>Warning:</b> Calling setGeometry() inside resizeEvent() or moveEvent()
2801can lead to infinite recursion.
2802<p> See the <a href="geometry.html">Window Geometry documentation</a>
2803for an overview of top-level widget geometry.
2804<p> <p>See also <a href="#frameGeometry-prop">frameGeometry</a>, <a href="#rect-prop">rect</a>, <a href="#pos-prop">pos</a>, <a href="#size-prop">size</a>, <a href="#moveEvent">moveEvent</a>(), <a href="#resizeEvent">resizeEvent</a>(), <a href="#minimumSize-prop">minimumSize</a>, and <a href="#maximumSize-prop">maximumSize</a>.
2805
2806<p>Set this property's value with <a href="#setGeometry">setGeometry</a>() and get this property's value with <a href="#geometry">geometry</a>().
2807<h3 class=fn>int <a name="height-prop"></a>height</h3>
2808<p>This property holds the height of the widget excluding any window frame.
2809<p>See the <a href="geometry.html">Window Geometry documentation</a>
2810for an overview of top-level widget geometry.
2811<p> <p>See also <a href="#geometry-prop">geometry</a>, <a href="#width-prop">width</a>, and <a href="#size-prop">size</a>.
2812
2813<p>Get this property's value with <a href="#height">height</a>().
2814<h3 class=fn>bool <a name="hidden-prop"></a>hidden</h3>
2815<p>This property holds whether the widget is explicitly hidden.
2816<p>If FALSE, the widget is visible or would become visible if all its
2817ancestors became visible.
2818<p> <p>See also <a href="#hide">hide</a>(), <a href="#show">show</a>(), <a href="#visible-prop">visible</a>, <a href="#isVisibleTo">isVisibleTo</a>(), and <a href="#shown-prop">shown</a>.
2819
2820<p>Set this property's value with <a href="#setHidden">setHidden</a>() and get this property's value with <a href="#isHidden">isHidden</a>().
2821<h3 class=fn><a href="qpixmap.html">QPixmap</a> <a name="icon-prop"></a>icon</h3>
2822<p>This property holds the widget's icon.
2823<p>This property only makes sense for top-level widgets. If no icon
2824has been set, <a href="#icon">icon</a>() returns 0.
2825<p> <p>See also <a href="#iconText-prop">iconText</a>, <a href="#caption-prop">caption</a>, and <a href="appicon.html">Setting the Application Icon</a>.
2826
2827<p>Set this property's value with <a href="#setIcon">setIcon</a>() and get this property's value with <a href="#icon">icon</a>().
2828<h3 class=fn><a href="qstring.html">QString</a> <a name="iconText-prop"></a>iconText</h3>
2829<p>This property holds the widget's icon text.
2830<p>This property only makes sense for top-level widgets. If no icon
2831text has been set, this functions returns <a href="qstring.html#QString-null">QString::null</a>.
2832<p> <p>See also <a href="#icon-prop">icon</a> and <a href="#caption-prop">caption</a>.
2833
2834<p>Set this property's value with <a href="#setIconText">setIconText</a>() and get this property's value with <a href="#iconText">iconText</a>().
2835<h3 class=fn>bool <a name="inputMethodEnabled-prop"></a>inputMethodEnabled</h3>
2836<p>This property holds enables or disables the use of input methods for this widget.
2837<p>Most Widgets (as eg. buttons) that do not handle text input should have
2838the input method disabled if they have focus. This is the default.
2839<p> If a widget handles text input it should set this property to TRUE.
2840
2841<p>Set this property's value with <a href="#setInputMethodEnabled">setInputMethodEnabled</a>() and get this property's value with <a href="#isInputMethodEnabled">isInputMethodEnabled</a>().
2842<h3 class=fn>bool <a name="isActiveWindow-prop"></a>isActiveWindow</h3>
2843<p>This property holds whether this widget is the active window.
2844<p>The active window is the window that contains the widget
2845that has <a href="focus.html#keyboard-focus">keyboard focus</a>.
2846<p> When popup windows are visible, this property is TRUE for both the
2847active window <em>and</em> for the popup.
2848<p> <p>See also <a href="#setActiveWindow">setActiveWindow</a>() and <a href="qapplication.html#activeWindow">QApplication::activeWindow</a>().
2849
2850<p>Get this property's value with <a href="#isActiveWindow">isActiveWindow</a>().
2851<h3 class=fn>bool <a name="isDesktop-prop"></a>isDesktop</h3>
2852<p>This property holds whether the widget is a desktop widget, i.e. represents the desktop.
2853<p>A desktop widget is also a top-level widget.
2854<p> <p>See also <a href="#isTopLevel-prop">isTopLevel</a> and <a href="qapplication.html#desktop">QApplication::desktop</a>().
2855
2856<p>Get this property's value with <a href="#isDesktop">isDesktop</a>().
2857<h3 class=fn>bool <a name="isDialog-prop"></a>isDialog</h3>
2858<p>This property holds whether the widget is a dialog widget.
2859<p>A dialog widget is a secondary top-level widget, i.e. a top-level
2860widget with a parent.
2861<p> <p>See also <a href="#isTopLevel-prop">isTopLevel</a> and <a href="qdialog.html">QDialog</a>.
2862
2863<p>Get this property's value with <a href="#isDialog">isDialog</a>().
2864<h3 class=fn>bool <a name="isModal-prop"></a>isModal</h3>
2865<p>This property holds whether the widget is a modal widget.
2866<p>This property only makes sense for top-level widgets. A modal
2867widget prevents widgets in all other top-level widgets from
2868getting any input.
2869<p> <p>See also <a href="#isTopLevel-prop">isTopLevel</a>, <a href="#isDialog-prop">isDialog</a>, and <a href="qdialog.html">QDialog</a>.
2870
2871<p>Get this property's value with <a href="#isModal">isModal</a>().
2872<h3 class=fn>bool <a name="isPopup-prop"></a>isPopup</h3>
2873<p>This property holds whether the widget is a popup widget.
2874<p>A popup widget is created by specifying the <a href="qt.html#WidgetFlags">widget flag</a> <a href="qt.html#WidgetFlags-enum">WType_Popup</a> to the widget constructor. A popup widget is also a
2875top-level widget.
2876<p> <p>See also <a href="#isTopLevel-prop">isTopLevel</a>.
2877
2878<p>Get this property's value with <a href="#isPopup">isPopup</a>().
2879<h3 class=fn>bool <a name="isTopLevel-prop"></a>isTopLevel</h3>
2880<p>This property holds whether the widget is a top-level widget.
2881<p>A top-level widget is a widget which usually has a frame and a
2882<a href="#caption-prop">caption (title)</a>. <a href="#isPopup">Popup</a> and <a href="#isDesktop">desktop</a> widgets are also top-level widgets.
2883<p> A top-level widget can have a <a href="#parentWidget">parent
2884 widget</a>. It will then be grouped with its parent and deleted
2885when the parent is deleted, minimized when the parent is minimized
2886etc. If supported by the window manager, it will also have a
2887common taskbar entry with its parent.
2888<p> <a href="qdialog.html">QDialog</a> and <a href="qmainwindow.html">QMainWindow</a> widgets are by default top-level, even if
2889a parent widget is specified in the constructor. This behavior is
2890specified by the <a href="qt.html#WidgetFlags-enum">WType_TopLevel</a> widget flag.
2891<p> <p>See also <a href="#topLevelWidget">topLevelWidget</a>(), <a href="#isDialog-prop">isDialog</a>, <a href="#isModal-prop">isModal</a>, <a href="#isPopup-prop">isPopup</a>, <a href="#isDesktop-prop">isDesktop</a>, and <a href="#parentWidget">parentWidget</a>().
2892
2893<p>Get this property's value with <a href="#isTopLevel">isTopLevel</a>().
2894<h3 class=fn>bool <a name="maximized-prop"></a>maximized</h3>
2895<p>This property holds whether this widget is maximized.
2896<p>This property is only relevant for top-level widgets.
2897<p> Note that due to limitations in some window-systems, this does not
2898always report the expected results (e.g. if the user on X11
2899maximizes the window via the window manager, Qt has no way of
2900distinguishing this from any other resize). This is expected to
2901improve as window manager protocols evolve.
2902<p> <p>See also <a href="#windowState">windowState</a>(), <a href="#showMaximized">showMaximized</a>(), <a href="#visible-prop">visible</a>, <a href="#show">show</a>(), <a href="#hide">hide</a>(), <a href="#showNormal">showNormal</a>(), and <a href="#minimized-prop">minimized</a>.
2903
2904<p>Get this property's value with <a href="#isMaximized">isMaximized</a>().
2905<h3 class=fn>int <a name="maximumHeight-prop"></a>maximumHeight</h3>
2906<p>This property holds the widget's maximum height.
2907<p>This property corresponds to <a href="#maximumSize">maximumSize</a>().<a href="#height">height</a>().
2908<p> <p>See also <a href="#maximumSize-prop">maximumSize</a> and <a href="#maximumWidth-prop">maximumWidth</a>.
2909
2910<p>Set this property's value with <a href="#setMaximumHeight">setMaximumHeight</a>() and get this property's value with <a href="#maximumHeight">maximumHeight</a>().
2911<h3 class=fn><a href="qsize.html">QSize</a> <a name="maximumSize-prop"></a>maximumSize</h3>
2912<p>This property holds the widget's maximum size.
2913<p>The widget cannot be resized to a larger size than the maximum
2914widget size.
2915<p> <p>See also <a href="#maximumWidth-prop">maximumWidth</a>, <a href="#maximumHeight-prop">maximumHeight</a>, <a href="#maximumSize-prop">maximumSize</a>, <a href="#minimumSize-prop">minimumSize</a>, and <a href="#sizeIncrement-prop">sizeIncrement</a>.
2916
2917<p>Set this property's value with <a href="#setMaximumSize">setMaximumSize</a>() and get this property's value with <a href="#maximumSize">maximumSize</a>().
2918<h3 class=fn>int <a name="maximumWidth-prop"></a>maximumWidth</h3>
2919<p>This property holds the widget's maximum width.
2920<p>This property corresponds to <a href="#maximumSize">maximumSize</a>().<a href="#width">width</a>().
2921<p> <p>See also <a href="#maximumSize-prop">maximumSize</a> and <a href="#maximumHeight-prop">maximumHeight</a>.
2922
2923<p>Set this property's value with <a href="#setMaximumWidth">setMaximumWidth</a>() and get this property's value with <a href="#maximumWidth">maximumWidth</a>().
2924<h3 class=fn><a href="qrect.html">QRect</a> <a name="microFocusHint-prop"></a>microFocusHint</h3>
2925<p>This property holds the currently set micro focus hint for this widget.
2926<p>See the documentation of <a href="#setMicroFocusHint">setMicroFocusHint</a>() for more information.
2927
2928<p>Get this property's value with <a href="#microFocusHint">microFocusHint</a>().
2929<h3 class=fn>bool <a name="minimized-prop"></a>minimized</h3>
2930<p>This property holds whether this widget is minimized (iconified).
2931<p>This property is only relevant for top-level widgets.
2932<p> <p>See also <a href="#showMinimized">showMinimized</a>(), <a href="#visible-prop">visible</a>, <a href="#show">show</a>(), <a href="#hide">hide</a>(), <a href="#showNormal">showNormal</a>(), and <a href="#maximized-prop">maximized</a>.
2933
2934<p>Get this property's value with <a href="#isMinimized">isMinimized</a>().
2935<h3 class=fn>int <a name="minimumHeight-prop"></a>minimumHeight</h3>
2936<p>This property holds the widget's minimum height.
2937<p>This property corresponds to <a href="#minimumSize">minimumSize</a>().<a href="#height">height</a>().
2938<p> <p>See also <a href="#minimumSize-prop">minimumSize</a> and <a href="#minimumWidth-prop">minimumWidth</a>.
2939
2940<p>Set this property's value with <a href="#setMinimumHeight">setMinimumHeight</a>() and get this property's value with <a href="#minimumHeight">minimumHeight</a>().
2941<h3 class=fn><a href="qsize.html">QSize</a> <a name="minimumSize-prop"></a>minimumSize</h3>
2942<p>This property holds the widget's minimum size.
2943<p>The widget cannot be resized to a smaller size than the minimum
2944widget size. The widget's size is forced to the minimum size if
2945the current size is smaller.
2946<p> If you use a layout inside the widget, the minimum size will be
2947set by the layout and not by <a href="#setMinimumSize">setMinimumSize</a>(), unless you set the
2948layout's resize mode to QLayout::FreeResize.
2949<p> <p>See also <a href="#minimumWidth-prop">minimumWidth</a>, <a href="#minimumHeight-prop">minimumHeight</a>, <a href="#maximumSize-prop">maximumSize</a>, <a href="#sizeIncrement-prop">sizeIncrement</a>, and <a href="qlayout.html#resizeMode-prop">QLayout::resizeMode</a>.
2950
2951<p>Set this property's value with <a href="#setMinimumSize">setMinimumSize</a>() and get this property's value with <a href="#minimumSize">minimumSize</a>().
2952<h3 class=fn><a href="qsize.html">QSize</a> <a name="minimumSizeHint-prop"></a>minimumSizeHint</h3>
2953<p>This property holds the recommended minimum size for the widget.
2954<p>If the value of this property is an invalid size, no minimum size
2955is recommended.
2956<p> The default implementation of <a href="#minimumSizeHint">minimumSizeHint</a>() returns an invalid
2957size if there is no layout for this widget, and returns the
2958layout's minimum size otherwise. Most built-in widgets reimplement
2959minimumSizeHint().
2960<p> <a href="qlayout.html">QLayout</a> will never resize a widget to a size smaller than
2961minimumSizeHint.
2962<p> <p>See also <a href="qsize.html#isValid">QSize::isValid</a>(), <a href="#size-prop">size</a>, <a href="#minimumSize-prop">minimumSize</a>, and <a href="#sizePolicy-prop">sizePolicy</a>.
2963
2964<p>Get this property's value with <a href="#minimumSizeHint">minimumSizeHint</a>().
2965<h3 class=fn>int <a name="minimumWidth-prop"></a>minimumWidth</h3>
2966<p>This property holds the widget's minimum width.
2967<p>This property corresponds to <a href="#minimumSize">minimumSize</a>().<a href="#width">width</a>().
2968<p> <p>See also <a href="#minimumSize-prop">minimumSize</a> and <a href="#minimumHeight-prop">minimumHeight</a>.
2969
2970<p>Set this property's value with <a href="#setMinimumWidth">setMinimumWidth</a>() and get this property's value with <a href="#minimumWidth">minimumWidth</a>().
2971<h3 class=fn>bool <a name="mouseTracking-prop"></a>mouseTracking</h3>
2972<p>This property holds whether mouse tracking is enabled for the widget.
2973<p>If mouse tracking is disabled (the default), the widget only
2974receives mouse move events when at least one mouse button is
2975pressed while the mouse is being moved.
2976<p> If mouse tracking is enabled, the widget receives mouse move
2977events even if no buttons are pressed.
2978<p> <p>See also <a href="#mouseMoveEvent">mouseMoveEvent</a>() and <a href="qapplication.html#setGlobalMouseTracking">QApplication::setGlobalMouseTracking</a>().
2979
2980<p>Set this property's value with <a href="#setMouseTracking">setMouseTracking</a>() and get this property's value with <a href="#hasMouseTracking">hasMouseTracking</a>().
2981<h3 class=fn>bool <a name="ownCursor-prop"></a>ownCursor</h3>
2982<p>This property holds whether the widget uses its own cursor.
2983<p>If FALSE, the widget uses its parent widget's cursor.
2984<p> <p>See also <a href="#cursor-prop">cursor</a>.
2985
2986<p>Get this property's value with <a href="#ownCursor">ownCursor</a>().
2987<h3 class=fn>bool <a name="ownFont-prop"></a>ownFont</h3>
2988<p>This property holds whether the widget uses its own font.
2989<p>If FALSE, the widget uses its parent widget's font.
2990<p> <p>See also <a href="#font-prop">font</a>.
2991
2992<p>Get this property's value with <a href="#ownFont">ownFont</a>().
2993<h3 class=fn>bool <a name="ownPalette-prop"></a>ownPalette</h3>
2994<p>This property holds whether the widget uses its own palette.
2995<p>If FALSE, the widget uses its parent widget's palette.
2996<p> <p>See also <a href="#palette-prop">palette</a>.
2997
2998<p>Get this property's value with <a href="#ownPalette">ownPalette</a>().
2999<h3 class=fn><a href="qpalette.html">QPalette</a> <a name="palette-prop"></a>palette</h3>
3000<p>This property holds the widget's palette.
3001<p>As long as no special palette has been set, or after <a href="#unsetPalette">unsetPalette</a>()
3002has been called, this is either a special palette for the widget
3003class, the parent's palette or (if this widget is a top level
3004widget), the default application palette.
3005<p> Instead of defining an entirely new palette, you can also use the
3006<a href="#paletteBackgroundColor-prop">paletteBackgroundColor</a>,
3007<a href="#paletteBackgroundPixmap-prop">paletteBackgroundPixmap</a> and
3008<a href="#paletteForegroundColor-prop">paletteForegroundColor</a>
3009convenience properties to change a widget's
3010background and foreground appearance only.
3011<p> <p>See also <a href="#ownPalette-prop">ownPalette</a>, <a href="#colorGroup-prop">colorGroup</a>, and <a href="qapplication.html#palette">QApplication::palette</a>().
3012
3013<p>Set this property's value with <a href="#setPalette">setPalette</a>(), get this property's value with <a href="#palette">palette</a>(), and reset this property's value with <a href="#unsetPalette">unsetPalette</a>().
3014<h3 class=fn><a href="qcolor.html">QColor</a> <a name="paletteBackgroundColor-prop"></a>paletteBackgroundColor</h3>
3015<p>This property holds the background color of the widget.
3016<p>The palette background color is usually set implicitly by
3017<a href="#setBackgroundMode">setBackgroundMode</a>(), although it can also be set explicitly by
3018<a href="#setPaletteBackgroundColor">setPaletteBackgroundColor</a>(). setPaletteBackgroundColor() is a
3019convenience function that creates and sets a modified <a href="qpalette.html">QPalette</a>
3020with <a href="#setPalette">setPalette</a>(). The palette is modified according to the
3021widget's background mode. For example, if the background mode is
3022<a href="qt.html#BackgroundMode-enum">PaletteButton</a> the color used for the palette's <a href="qcolorgroup.html#ColorRole-enum">QColorGroup::Button</a> color entry is set.
3023<p> If there is a background pixmap (set using
3024<a href="#setPaletteBackgroundPixmap">setPaletteBackgroundPixmap</a>()), then the return value of this
3025function is indeterminate.
3026<p> <p>See also <a href="#paletteBackgroundPixmap-prop">paletteBackgroundPixmap</a>, <a href="#paletteForegroundColor-prop">paletteForegroundColor</a>, <a href="#palette-prop">palette</a>, and <a href="#colorGroup-prop">colorGroup</a>.
3027
3028<p>Set this property's value with <a href="#setPaletteBackgroundColor">setPaletteBackgroundColor</a>(), get this property's value with <a href="#paletteBackgroundColor">paletteBackgroundColor</a>(), and reset this property's value with <a href="#unsetPalette">unsetPalette</a>().
3029<h3 class=fn><a href="qpixmap.html">QPixmap</a> <a name="paletteBackgroundPixmap-prop"></a>paletteBackgroundPixmap</h3>
3030<p>This property holds the background pixmap of the widget.
3031<p>The palette background pixmap is usually set implicitly by
3032<a href="#setBackgroundMode">setBackgroundMode</a>(), although it can also be set explicitly by
3033<a href="#setPaletteBackgroundPixmap">setPaletteBackgroundPixmap</a>(). setPaletteBackgroundPixmap() is a
3034convenience function that creates and sets a modified <a href="qpalette.html">QPalette</a>
3035with <a href="#setPalette">setPalette</a>(). The palette is modified according to the
3036widget's background mode. For example, if the background mode is
3037<a href="qt.html#BackgroundMode-enum">PaletteButton</a> the pixmap used for the palette's
3038<a href="qcolorgroup.html#ColorRole-enum">QColorGroup::Button</a> color entry is set.
3039<p> If there is a plain background color (set using
3040<a href="#setPaletteBackgroundColor">setPaletteBackgroundColor</a>()), then this function returns 0.
3041<p> <p>See also <a href="#paletteBackgroundColor-prop">paletteBackgroundColor</a>, <a href="#paletteForegroundColor-prop">paletteForegroundColor</a>, <a href="#palette-prop">palette</a>, and <a href="#colorGroup-prop">colorGroup</a>.
3042
3043<p>Set this property's value with <a href="#setPaletteBackgroundPixmap">setPaletteBackgroundPixmap</a>(), get this property's value with <a href="#paletteBackgroundPixmap">paletteBackgroundPixmap</a>(), and reset this property's value with <a href="#unsetPalette">unsetPalette</a>().
3044<h3 class=fn><a href="qcolor.html">QColor</a> <a name="paletteForegroundColor-prop"></a>paletteForegroundColor</h3>
3045<p>This property holds the foreground color of the widget.
3046<p>setPaletteForegroundColor() is a convenience function that creates
3047and sets a modified <a href="qpalette.html">QPalette</a> with <a href="#setPalette">setPalette</a>(). The palette is
3048modified according to the widget's <em>background mode</em>. For
3049example, if the background mode is <a href="qt.html#BackgroundMode-enum">PaletteButton</a> the palette entry
3050<a href="qcolorgroup.html#ColorRole-enum">QColorGroup::ButtonText</a> is set to color.
3051<p> <p>See also <a href="#palette-prop">palette</a>, <a href="qapplication.html#setPalette">QApplication::setPalette</a>(), <a href="#backgroundMode-prop">backgroundMode</a>, <a href="#foregroundColor">foregroundColor</a>(), <a href="#backgroundMode-prop">backgroundMode</a>, and <a href="#setEraseColor">setEraseColor</a>().
3052
3053<p>Set this property's value with <a href="#setPaletteForegroundColor">setPaletteForegroundColor</a>(), get this property's value with <a href="#paletteForegroundColor">paletteForegroundColor</a>(), and reset this property's value with <a href="#unsetPalette">unsetPalette</a>().
3054<h3 class=fn><a href="qpoint.html">QPoint</a> <a name="pos-prop"></a>pos</h3>
3055<p>This property holds the position of the widget within its parent widget.
3056<p>If the widget is a top-level widget, the position is that of the
3057widget on the desktop, including its frame.
3058<p> When changing the position, the widget, if visible, receives a
3059move event (<a href="#moveEvent">moveEvent</a>()) immediately. If the widget is not
3060currently visible, it is guaranteed to receive an event before it
3061is shown.
3062<p> <a href="#move">move</a>() is virtual, and all other overloaded move() implementations
3063in Qt call it.
3064<p> <b>Warning:</b> Calling move() or <a href="#setGeometry">setGeometry</a>() inside moveEvent() can
3065lead to infinite recursion.
3066<p> See the <a href="geometry.html">Window Geometry documentation</a>
3067for an overview of top-level widget geometry.
3068<p> <p>See also <a href="#frameGeometry-prop">frameGeometry</a>, <a href="#size-prop">size</a>, <a href="#x-prop">x</a>, and <a href="#y-prop">y</a>.
3069
3070<p>Set this property's value with <a href="#move">move</a>() and get this property's value with <a href="#pos">pos</a>().
3071<h3 class=fn><a href="qrect.html">QRect</a> <a name="rect-prop"></a>rect</h3>
3072<p>This property holds the internal geometry of the widget excluding any window frame.
3073<p>The rect property equals <a href="qrect.html">QRect</a>(0, 0, <a href="#width">width</a>(), <a href="#height">height</a>()).
3074<p> See the <a href="geometry.html">Window Geometry documentation</a>
3075for an overview of top-level widget geometry.
3076<p> <p>See also <a href="#size-prop">size</a>.
3077
3078<p>Get this property's value with <a href="#rect">rect</a>().
3079<h3 class=fn>bool <a name="shown-prop"></a>shown</h3>
3080<p>This property holds whether the widget is shown.
3081<p>If TRUE, the widget is visible or would become visible if all its
3082ancestors became visible.
3083<p> <p>See also <a href="#hide">hide</a>(), <a href="#show">show</a>(), <a href="#visible-prop">visible</a>, <a href="#isVisibleTo">isVisibleTo</a>(), and <a href="#hidden-prop">hidden</a>.
3084
3085<p>Set this property's value with <a href="#setShown">setShown</a>() and get this property's value with <a href="#isShown">isShown</a>().
3086<h3 class=fn><a href="qsize.html">QSize</a> <a name="size-prop"></a>size</h3>
3087<p>This property holds the size of the widget excluding any window frame.
3088<p>When resizing, the widget, if visible, receives a resize event
3089(<a href="#resizeEvent">resizeEvent</a>()) immediately. If the widget is not currently
3090visible, it is guaranteed to receive an event before it is shown.
3091<p> The size is adjusted if it lies outside the range defined by
3092<a href="#minimumSize">minimumSize</a>() and <a href="#maximumSize">maximumSize</a>(). Furthermore, the size is always
3093at least <a href="qsize.html">QSize</a>(1, 1). For toplevel widgets, the minimum size
3094might be larger, depending on the window manager.
3095<p> If you want a top-level window to have a fixed size, call
3096setResizeMode( QLayout::FreeResize ) on its layout.
3097<p> <a href="#resize">resize</a>() is virtual, and all other overloaded resize()
3098implementations in Qt call it.
3099<p> <b>Warning:</b> Calling resize() or <a href="#setGeometry">setGeometry</a>() inside resizeEvent() can
3100lead to infinite recursion.
3101<p> <p>See also <a href="#pos-prop">pos</a>, <a href="#geometry-prop">geometry</a>, <a href="#minimumSize-prop">minimumSize</a>, <a href="#maximumSize-prop">maximumSize</a>, and <a href="#resizeEvent">resizeEvent</a>().
3102
3103<p>Set this property's value with <a href="#resize">resize</a>() and get this property's value with <a href="#size">size</a>().
3104<h3 class=fn><a href="qsize.html">QSize</a> <a name="sizeHint-prop"></a>sizeHint</h3>
3105<p>This property holds the recommended size for the widget.
3106<p>If the value of this property is an invalid size, no size is
3107recommended.
3108<p> The default implementation of <a href="#sizeHint">sizeHint</a>() returns an invalid size
3109if there is no layout for this widget, and returns the layout's
3110preferred size otherwise.
3111<p> <p>See also <a href="qsize.html#isValid">QSize::isValid</a>(), <a href="#minimumSizeHint-prop">minimumSizeHint</a>, <a href="#sizePolicy-prop">sizePolicy</a>, <a href="#minimumSize-prop">minimumSize</a>, and <a href="#updateGeometry">updateGeometry</a>().
3112
3113<p>Get this property's value with <a href="#sizeHint">sizeHint</a>().
3114<h3 class=fn><a href="qsize.html">QSize</a> <a name="sizeIncrement-prop"></a>sizeIncrement</h3>
3115<p>This property holds the size increment of the widget.
3116<p>When the user resizes the window, the size will move in steps of
3117<a href="#sizeIncrement">sizeIncrement</a>().<a href="#width">width</a>() pixels horizontally and
3118sizeIncrement.<a href="#height">height</a>() pixels vertically, with <a href="#baseSize">baseSize</a>() as the
3119basis. Preferred widget sizes are for non-negative integers <em>i</em>
3120and <em>j</em>:
3121<pre>
3122 <a href="#width-prop">width</a> = <a href="#baseSize">baseSize</a>().width() + i * sizeIncrement().width();
3123 <a href="#height-prop">height</a> = <a href="#baseSize">baseSize</a>().height() + j * sizeIncrement().height();
3124 </pre>
3125
3126<p> Note that while you can set the size increment for all widgets, it
3127only affects top-level widgets.
3128<p> <b>Warning:</b> The size increment has no effect under Windows, and may
3129be disregarded by the window manager on X.
3130<p> <p>See also <a href="#size-prop">size</a>, <a href="#minimumSize-prop">minimumSize</a>, and <a href="#maximumSize-prop">maximumSize</a>.
3131
3132<p>Set this property's value with <a href="#setSizeIncrement">setSizeIncrement</a>() and get this property's value with <a href="#sizeIncrement">sizeIncrement</a>().
3133<h3 class=fn><a href="qsizepolicy.html">QSizePolicy</a> <a name="sizePolicy-prop"></a>sizePolicy</h3>
3134<p>This property holds the default layout behavior of the widget.
3135<p>If there is a <a href="qlayout.html">QLayout</a> that manages this widget's children, the
3136size policy specified by that layout is used. If there is no such
3137QLayout, the result of this function is used.
3138<p> The default policy is Preferred/Preferred, which means that the
3139widget can be freely resized, but prefers to be the size
3140<a href="#sizeHint">sizeHint</a>() returns. Button-like widgets set the size policy to
3141specify that they may stretch horizontally, but are fixed
3142vertically. The same applies to lineedit controls (such as
3143<a href="qlineedit.html">QLineEdit</a>, <a href="qspinbox.html">QSpinBox</a> or an editable <a href="qcombobox.html">QComboBox</a>) and other
3144horizontally orientated widgets (such as <a href="qprogressbar.html">QProgressBar</a>).
3145<a href="qtoolbutton.html">QToolButton</a>'s are normally square, so they allow growth in both
3146directions. Widgets that support different directions (such as
3147<a href="qslider.html">QSlider</a>, <a href="qscrollbar.html">QScrollBar</a> or <a href="qheader.html">QHeader</a>) specify stretching in the
3148respective direction only. Widgets that can provide scrollbars
3149(usually subclasses of <a href="qscrollview.html">QScrollView</a>) tend to specify that they can
3150use additional space, and that they can make do with less than
3151sizeHint().
3152<p> <p>See also <a href="#sizeHint-prop">sizeHint</a>, <a href="qlayout.html">QLayout</a>, <a href="qsizepolicy.html">QSizePolicy</a>, and <a href="#updateGeometry">updateGeometry</a>().
3153
3154<p>Set this property's value with <a href="#setSizePolicy">setSizePolicy</a>() and get this property's value with <a href="#sizePolicy">sizePolicy</a>().
3155<h3 class=fn>bool <a name="underMouse-prop"></a>underMouse</h3>
3156<p>This property holds whether the widget is under the mouse cursor.
3157<p>This value is not updated properly during drag and drop
3158operations.
3159<p> <p>See also <a href="qevent.html#Type-enum">QEvent::Enter</a> and <a href="qevent.html#Type-enum">QEvent::Leave</a>.
3160
3161<p>Get this property's value with <a href="#hasMouse">hasMouse</a>().
3162<h3 class=fn>bool <a name="updatesEnabled-prop"></a>updatesEnabled</h3>
3163<p>This property holds whether updates are enabled.
3164<p>Calling <a href="#update">update</a>() and <a href="#repaint">repaint</a>() has no effect if updates are
3165disabled. Paint events from the window system are processed
3166normally even if updates are disabled.
3167<p> <a href="#setUpdatesEnabled">setUpdatesEnabled</a>() is normally used to disable updates for a
3168short period of time, for instance to avoid screen flicker during
3169large changes.
3170<p> Example:
3171<pre>
3172 <a href="#setUpdatesEnabled">setUpdatesEnabled</a>( FALSE );
3173 bigVisualChanges();
3174 <a href="#setUpdatesEnabled">setUpdatesEnabled</a>( TRUE );
3175 <a href="#repaint">repaint</a>();
3176 </pre>
3177
3178<p> <p>See also <a href="#update">update</a>(), <a href="#repaint">repaint</a>(), and <a href="#paintEvent">paintEvent</a>().
3179
3180<p>Set this property's value with <a href="#setUpdatesEnabled">setUpdatesEnabled</a>() and get this property's value with <a href="#isUpdatesEnabled">isUpdatesEnabled</a>().
3181<h3 class=fn>bool <a name="visible-prop"></a>visible</h3>
3182<p>This property holds whether the widget is visible.
3183<p>Calling <a href="#show">show</a>() sets the widget to visible status if all its parent
3184widgets up to the top-level widget are visible. If an ancestor is
3185not visible, the widget won't become visible until all its
3186ancestors are shown.
3187<p> Calling <a href="#hide">hide</a>() hides a widget explicitly. An explicitly hidden
3188widget will never become visible, even if all its ancestors become
3189visible, unless you show it.
3190<p> A widget receives show and hide events when its visibility status
3191changes. Between a hide and a show event, there is no need to
3192waste CPU cycles preparing or displaying information to the user.
3193A video application, for example, might simply stop generating new
3194frames.
3195<p> A widget that happens to be obscured by other windows on the
3196screen is considered to be visible. The same applies to iconified
3197top-level widgets and windows that exist on another virtual
3198desktop (on platforms that support this concept). A widget
3199receives spontaneous show and hide events when its mapping status
3200is changed by the window system, e.g. a spontaneous hide event
3201when the user minimizes the window, and a spontaneous show event
3202when the window is restored again.
3203<p> <p>See also <a href="#show">show</a>(), <a href="#hide">hide</a>(), <a href="#hidden-prop">hidden</a>, <a href="#isVisibleTo">isVisibleTo</a>(), <a href="#minimized-prop">minimized</a>, <a href="#showEvent">showEvent</a>(), and <a href="#hideEvent">hideEvent</a>().
3204
3205<p>Get this property's value with <a href="#isVisible">isVisible</a>().
3206<h3 class=fn><a href="qrect.html">QRect</a> <a name="visibleRect-prop"></a>visibleRect</h3>
3207<p>This property holds the visible rectangle.
3208<p><b>This property is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
3209<p> No longer necessary, you can simply call <a href="#repaint">repaint</a>(). If you do not
3210need the rectangle for repaint(), use <a href="#clipRegion">clipRegion</a>() instead.
3211
3212<p>Get this property's value with <a href="#visibleRect">visibleRect</a>().
3213<h3 class=fn>int <a name="width-prop"></a>width</h3>
3214<p>This property holds the width of the widget excluding any window frame.
3215<p>See the <a href="geometry.html">Window Geometry documentation</a>
3216for an overview of top-level widget geometry.
3217<p> <p>See also <a href="#geometry-prop">geometry</a>, <a href="#height-prop">height</a>, and <a href="#size-prop">size</a>.
3218
3219<p>Get this property's value with <a href="#width">width</a>().
3220<h3 class=fn>double <a name="windowOpacity-prop"></a>windowOpacity</h3>
3221<p>This property holds the level of opacity for the window.
3222<p>The valid range of opacity is from 1.0 (completely opaque) to
32230.0 (completely transparent).
3224<p> By default the value of this property is 1.0.
3225<p> This feature is only present on Mac OS X and Windows 2000 and up.
3226<p> <b>Warning:</b> Changing this property from opaque to transparent might issue a
3227paint event that needs to be processed before the window is displayed
3228correctly. This affects mainly the use of <a href="qpixmap.html#grabWindow">QPixmap::grabWindow</a>(). Also note
3229that semi-transparent windows update and resize significantely slower than
3230opaque windows.
3231
3232<p>Set this property's value with <a href="#setWindowOpacity">setWindowOpacity</a>() and get this property's value with <a href="#windowOpacity">windowOpacity</a>().
3233<h3 class=fn>int <a name="x-prop"></a>x</h3> <p>This property holds the x coordinate of the widget relative to its parent including any window frame.
3234<p>See the <a href="geometry.html">Window Geometry documentation</a>
3235for an overview of top-level widget geometry.
3236<p> <p>See also <a href="#frameGeometry-prop">frameGeometry</a>, <a href="#y-prop">y</a>, and <a href="#pos-prop">pos</a>.
3237
3238<p>Get this property's value with <a href="#x">x</a>().
3239<h3 class=fn>int <a name="y-prop"></a>y</h3>
3240<p>This property holds the y coordinate of the widget relative to its parent and including any window frame.
3241<p>See the <a href="geometry.html">Window Geometry documentation</a>
3242for an overview of top-level widget geometry.
3243<p> <p>See also <a href="#frameGeometry-prop">frameGeometry</a>, <a href="#x-prop">x</a>, and <a href="#pos-prop">pos</a>.
3244
3245<p>Get this property's value with <a href="#y">y</a>().
3246<!-- eof -->
3247<hr><p>
3248This file is part of the <a href="index.html">Qt toolkit</a>.
3249Copyright &copy; 1995-2007
3250<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
3251<table width=100% cellspacing=0 border=0><tr>
3252<td>Copyright &copy; 2007
3253<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
3254<td align=right><div align=right>Qt 3.3.8</div>
3255</table></div></address></body>
3256</html>
Note: See TracBrowser for help on using the repository browser.