Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > 8e6051afcdb111a0317a58fb64c2abf5 > files > 5512

qt4-doc-4.6.3-0.2mdv2010.2.i586.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- qwidget.cpp -->
<head>
  <title>Qt 4.6: QWidget Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<a name="//apple_ref/cpp/cl//QWidget"></a>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td></tr></table><h1 class="title">QWidget Class Reference<br /><span class="small-subtitle">[<a href="qtgui.html">QtGui</a> module]</span>
</h1>
<p>The QWidget class is the base class of all user interface objects. <a href="#details">More...</a></p>
<pre> #include &lt;QWidget&gt;</pre><p>Inherits <a href="qobject.html">QObject</a> and <a href="qpaintdevice.html">QPaintDevice</a>.</p>
<p>Inherited by <a href="phonon-effectwidget.html">Phonon::EffectWidget</a>, <a href="phonon-seekslider.html">Phonon::SeekSlider</a>, <a href="phonon-videoplayer.html">Phonon::VideoPlayer</a>, <a href="phonon-videowidget.html">Phonon::VideoWidget</a>, <a href="phonon-volumeslider.html">Phonon::VolumeSlider</a>, <a href="q3combobox.html" class="compat">Q3ComboBox</a>, <a href="q3databrowser.html" class="compat">Q3DataBrowser</a>, <a href="q3dataview.html" class="compat">Q3DataView</a>, <a href="q3datetimeedit.html" class="compat">Q3DateTimeEdit</a>, <a href="q3datetimeeditbase.html" class="compat">Q3DateTimeEditBase</a>, <a href="q3dockarea.html" class="compat">Q3DockArea</a>, <a href="q3header.html" class="compat">Q3Header</a>, <a href="q3mainwindow.html" class="compat">Q3MainWindow</a>, <a href="qabstractbutton.html">QAbstractButton</a>, <a href="qabstractslider.html">QAbstractSlider</a>, <a href="qabstractspinbox.html">QAbstractSpinBox</a>, <a href="qaxwidget.html">QAxWidget</a>, <a href="qcalendarwidget.html">QCalendarWidget</a>, <a href="qcombobox.html">QComboBox</a>, <a href="qdesigneractioneditorinterface.html">QDesignerActionEditorInterface</a>, <a href="qdesignerformwindowinterface.html">QDesignerFormWindowInterface</a>, <a href="qdesignerobjectinspectorinterface.html">QDesignerObjectInspectorInterface</a>, <a href="qdesignerpropertyeditorinterface.html">QDesignerPropertyEditorInterface</a>, <a href="qdesignerwidgetboxinterface.html">QDesignerWidgetBoxInterface</a>, <a href="qdesktopwidget.html">QDesktopWidget</a>, <a href="qdialog.html">QDialog</a>, <a href="qdialogbuttonbox.html">QDialogButtonBox</a>, <a href="qdockwidget.html">QDockWidget</a>, <a href="qfocusframe.html">QFocusFrame</a>, <a href="qframe.html">QFrame</a>, <a href="qglwidget.html">QGLWidget</a>, <a href="qgroupbox.html">QGroupBox</a>, <a href="qhelpsearchquerywidget.html">QHelpSearchQueryWidget</a>, <a href="qhelpsearchresultwidget.html">QHelpSearchResultWidget</a>, <a href="qlineedit.html">QLineEdit</a>, <a href="qmaccocoaviewcontainer.html">QMacCocoaViewContainer</a>, <a href="qmacnativewidget.html">QMacNativeWidget</a>, <a href="qmainwindow.html">QMainWindow</a>, <a href="qmdisubwindow.html">QMdiSubWindow</a>, <a href="qmenu.html">QMenu</a>, <a href="qmenubar.html">QMenuBar</a>, <a href="qprintpreviewwidget.html">QPrintPreviewWidget</a>, <a href="qprogressbar.html">QProgressBar</a>, <a href="qrubberband.html">QRubberBand</a>, <a href="qsizegrip.html">QSizeGrip</a>, <a href="qsplashscreen.html">QSplashScreen</a>, <a href="qsplitterhandle.html">QSplitterHandle</a>, <a href="qstatusbar.html">QStatusBar</a>, <a href="qsvgwidget.html">QSvgWidget</a>, <a href="qtabbar.html">QTabBar</a>, <a href="qtabwidget.html">QTabWidget</a>, <a href="qtoolbar.html">QToolBar</a>, <a href="qwebinspector.html">QWebInspector</a>, <a href="qwebview.html">QWebView</a>, <a href="qwizardpage.html">QWizardPage</a>, <a href="qworkspace.html" class="obsolete">QWorkspace</a>, <a href="qwsembedwidget.html">QWSEmbedWidget</a>, <a href="qx11embedcontainer.html">QX11EmbedContainer</a>, and <a href="qx11embedwidget.html">QX11EmbedWidget</a>.</p>
<ul>
<li><a href="qwidget-members.html">List of all members, including inherited members</a></li>
<li><a href="qwidget-obsolete.html">Obsolete members</a></li>
<li><a href="qwidget-qt3.html">Qt 3 support members</a></li>
</ul>
<hr />
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#RenderFlag-enum">RenderFlag</a></b> { DrawWindowBackground, DrawChildren, IgnoreMask }</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">flags </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#RenderFlag-enum">RenderFlags</a></b></td></tr>
</table>
<hr />
<a name="properties"></a>
<h2>Properties</h2>
<p><table class="propsummary" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td width="45%" valign="top"><ul>
<li><div class="fn"><b><a href="qwidget.html#acceptDrops-prop">acceptDrops</a></b> : bool</div></li>
<li><div class="fn"><b><a href="qwidget.html#accessibleDescription-prop">accessibleDescription</a></b> : QString</div></li>
<li><div class="fn"><b><a href="qwidget.html#accessibleName-prop">accessibleName</a></b> : QString</div></li>
<li><div class="fn"><b><a href="qwidget.html#autoFillBackground-prop">autoFillBackground</a></b> : bool</div></li>
<li><div class="fn"><b><a href="qwidget.html#baseSize-prop">baseSize</a></b> : QSize</div></li>
<li><div class="fn"><b><a href="qwidget.html#childrenRect-prop">childrenRect</a></b> : const QRect</div></li>
<li><div class="fn"><b><a href="qwidget.html#childrenRegion-prop">childrenRegion</a></b> : const QRegion</div></li>
<li><div class="fn"><b><a href="qwidget.html#contextMenuPolicy-prop">contextMenuPolicy</a></b> : Qt::ContextMenuPolicy</div></li>
<li><div class="fn"><b><a href="qwidget.html#cursor-prop">cursor</a></b> : QCursor</div></li>
<li><div class="fn"><b><a href="qwidget.html#enabled-prop">enabled</a></b> : bool</div></li>
<li><div class="fn"><b><a href="qwidget.html#focus-prop">focus</a></b> : const bool</div></li>
<li><div class="fn"><b><a href="qwidget.html#focusPolicy-prop">focusPolicy</a></b> : Qt::FocusPolicy</div></li>
<li><div class="fn"><b><a href="qwidget.html#font-prop">font</a></b> : QFont</div></li>
<li><div class="fn"><b><a href="qwidget.html#frameGeometry-prop">frameGeometry</a></b> : const QRect</div></li>
<li><div class="fn"><b><a href="qwidget.html#frameSize-prop">frameSize</a></b> : const QSize</div></li>
<li><div class="fn"><b><a href="qwidget.html#fullScreen-prop">fullScreen</a></b> : const bool</div></li>
<li><div class="fn"><b><a href="qwidget.html#geometry-prop">geometry</a></b> : QRect</div></li>
<li><div class="fn"><b><a href="qwidget.html#height-prop">height</a></b> : const int</div></li>
<li><div class="fn"><b><a href="qwidget.html#inputMethodHints-prop">inputMethodHints</a></b> : Qt::InputMethodHints</div></li>
<li><div class="fn"><b><a href="qwidget.html#isActiveWindow-prop">isActiveWindow</a></b> : const bool</div></li>
<li><div class="fn"><b><a href="qwidget.html#layoutDirection-prop">layoutDirection</a></b> : Qt::LayoutDirection</div></li>
<li><div class="fn"><b><a href="qwidget.html#locale-prop">locale</a></b> : QLocale</div></li>
<li><div class="fn"><b><a href="qwidget.html#maximized-prop">maximized</a></b> : const bool</div></li>
<li><div class="fn"><b><a href="qwidget.html#maximumHeight-prop">maximumHeight</a></b> : int</div></li>
<li><div class="fn"><b><a href="qwidget.html#maximumSize-prop">maximumSize</a></b> : QSize</div></li>
<li><div class="fn"><b><a href="qwidget.html#maximumWidth-prop">maximumWidth</a></b> : int</div></li>
<li><div class="fn"><b><a href="qwidget.html#minimized-prop">minimized</a></b> : const bool</div></li>
<li><div class="fn"><b><a href="qwidget.html#minimumHeight-prop">minimumHeight</a></b> : int</div></li>
<li><div class="fn"><b><a href="qwidget.html#minimumSize-prop">minimumSize</a></b> : QSize</div></li>
</ul></td><td valign="top"><ul>
<li><div class="fn"><b><a href="qwidget.html#minimumSizeHint-prop">minimumSizeHint</a></b> : const QSize</div></li>
<li><div class="fn"><b><a href="qwidget.html#minimumWidth-prop">minimumWidth</a></b> : int</div></li>
<li><div class="fn"><b><a href="qwidget.html#modal-prop">modal</a></b> : const bool</div></li>
<li><div class="fn"><b><a href="qwidget.html#mouseTracking-prop">mouseTracking</a></b> : bool</div></li>
<li><div class="fn"><b><a href="qwidget.html#normalGeometry-prop">normalGeometry</a></b> : const QRect</div></li>
<li><div class="fn"><b><a href="qwidget.html#palette-prop">palette</a></b> : QPalette</div></li>
<li><div class="fn"><b><a href="qwidget.html#pos-prop">pos</a></b> : QPoint</div></li>
<li><div class="fn"><b><a href="qwidget.html#rect-prop">rect</a></b> : const QRect</div></li>
<li><div class="fn"><b><a href="qwidget.html#size-prop">size</a></b> : QSize</div></li>
<li><div class="fn"><b><a href="qwidget.html#sizeHint-prop">sizeHint</a></b> : const QSize</div></li>
<li><div class="fn"><b><a href="qwidget.html#sizeIncrement-prop">sizeIncrement</a></b> : QSize</div></li>
<li><div class="fn"><b><a href="qwidget.html#sizePolicy-prop">sizePolicy</a></b> : QSizePolicy</div></li>
<li><div class="fn"><b><a href="qwidget.html#statusTip-prop">statusTip</a></b> : QString</div></li>
<li><div class="fn"><b><a href="qwidget.html#styleSheet-prop">styleSheet</a></b> : QString</div></li>
<li><div class="fn"><b><a href="qwidget.html#toolTip-prop">toolTip</a></b> : QString</div></li>
<li><div class="fn"><b><a href="qwidget.html#updatesEnabled-prop">updatesEnabled</a></b> : bool</div></li>
<li><div class="fn"><b><a href="qwidget.html#visible-prop">visible</a></b> : bool</div></li>
<li><div class="fn"><b><a href="qwidget.html#whatsThis-prop">whatsThis</a></b> : QString</div></li>
<li><div class="fn"><b><a href="qwidget.html#width-prop">width</a></b> : const int</div></li>
<li><div class="fn"><b><a href="qwidget.html#windowFilePath-prop">windowFilePath</a></b> : QString</div></li>
<li><div class="fn"><b><a href="qwidget.html#windowFlags-prop">windowFlags</a></b> : Qt::WindowFlags</div></li>
<li><div class="fn"><b><a href="qwidget.html#windowIcon-prop">windowIcon</a></b> : QIcon</div></li>
<li><div class="fn"><b><a href="qwidget.html#windowIconText-prop">windowIconText</a></b> : QString</div></li>
<li><div class="fn"><b><a href="qwidget.html#windowModality-prop">windowModality</a></b> : Qt::WindowModality</div></li>
<li><div class="fn"><b><a href="qwidget.html#windowModified-prop">windowModified</a></b> : bool</div></li>
<li><div class="fn"><b><a href="qwidget.html#windowOpacity-prop">windowOpacity</a></b> : double</div></li>
<li><div class="fn"><b><a href="qwidget.html#windowTitle-prop">windowTitle</a></b> : QString</div></li>
<li><div class="fn"><b><a href="qwidget.html#x-prop">x</a></b> : const int</div></li>
<li><div class="fn"><b><a href="qwidget.html#y-prop">y</a></b> : const int</div></li>
</ul>
</td></tr>
</table></p>
<ul>
<li><div bar="2" class="fn"></div>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<hr />
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#QWidget">QWidget</a></b> ( QWidget * <i>parent</i> = 0, Qt::WindowFlags <i>f</i> = 0 )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#dtor.QWidget">~QWidget</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#acceptDrops-prop">acceptDrops</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#accessibleDescription-prop">accessibleDescription</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#accessibleName-prop">accessibleName</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QList&lt;QAction *&gt; </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#actions">actions</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#activateWindow">activateWindow</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#addAction">addAction</a></b> ( QAction * <i>action</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#addActions">addActions</a></b> ( QList&lt;QAction *&gt; <i>actions</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#adjustSize">adjustSize</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#autoFillBackground-prop">autoFillBackground</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPalette::ColorRole </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#backgroundRole">backgroundRole</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QSize </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#baseSize-prop">baseSize</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QWidget * </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#childAt">childAt</a></b> ( int <i>x</i>, int <i>y</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QWidget * </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#childAt-4">childAt</a></b> ( const QPoint &amp; <i>p</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QRect </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#childrenRect-prop">childrenRect</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QRegion </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#childrenRegion-prop">childrenRegion</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#clearFocus">clearFocus</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#clearMask">clearMask</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QMargins </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#contentsMargins">contentsMargins</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QRect </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#contentsRect">contentsRect</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Qt::ContextMenuPolicy </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#contextMenuPolicy-prop">contextMenuPolicy</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QCursor </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#cursor-prop">cursor</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">WId </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#effectiveWinId">effectiveWinId</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#ensurePolished">ensurePolished</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Qt::FocusPolicy </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#focusPolicy-prop">focusPolicy</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QWidget * </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#focusProxy">focusProxy</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QWidget * </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#focusWidget">focusWidget</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const QFont &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#font-prop">font</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QFontInfo </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#fontInfo">fontInfo</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QFontMetrics </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#fontMetrics">fontMetrics</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPalette::ColorRole </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#foregroundRole">foregroundRole</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QRect </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#frameGeometry-prop">frameGeometry</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QSize </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#frameSize-prop">frameSize</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const QRect &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#geometry-prop">geometry</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#getContentsMargins">getContentsMargins</a></b> ( int * <i>left</i>, int * <i>top</i>, int * <i>right</i>, int * <i>bottom</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#grabGesture">grabGesture</a></b> ( Qt::GestureType <i>gesture</i>, Qt::GestureFlags <i>flags</i> = Qt::GestureFlags() )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#grabKeyboard">grabKeyboard</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#grabMouse">grabMouse</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#grabMouse-2">grabMouse</a></b> ( const QCursor &amp; <i>cursor</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#grabShortcut">grabShortcut</a></b> ( const QKeySequence &amp; <i>key</i>, Qt::ShortcutContext <i>context</i> = Qt::WindowShortcut )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QGraphicsEffect * </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#graphicsEffect">graphicsEffect</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QGraphicsProxyWidget * </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#graphicsProxyWidget">graphicsProxyWidget</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#hasEditFocus">hasEditFocus</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#focus-prop">hasFocus</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#mouseTracking-prop">hasMouseTracking</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#height-prop">height</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#heightForWidth">heightForWidth</a></b> ( int <i>w</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QInputContext * </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#inputContext">inputContext</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Qt::InputMethodHints </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#inputMethodHints-prop">inputMethodHints</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QVariant </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#inputMethodQuery">inputMethodQuery</a></b> ( Qt::InputMethodQuery <i>query</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#insertAction">insertAction</a></b> ( QAction * <i>before</i>, QAction * <i>action</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#insertActions">insertActions</a></b> ( QAction * <i>before</i>, QList&lt;QAction *&gt; <i>actions</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#isActiveWindow-prop">isActiveWindow</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#isAncestorOf">isAncestorOf</a></b> ( const QWidget * <i>child</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#enabled-prop">isEnabled</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#isEnabledTo">isEnabledTo</a></b> ( QWidget * <i>ancestor</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#fullScreen-prop">isFullScreen</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#isHidden">isHidden</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#maximized-prop">isMaximized</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#minimized-prop">isMinimized</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#modal-prop">isModal</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#visible-prop">isVisible</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#isVisibleTo">isVisibleTo</a></b> ( QWidget * <i>ancestor</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#isWindow">isWindow</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#windowModified-prop">isWindowModified</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QLayout * </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#layout">layout</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Qt::LayoutDirection </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#layoutDirection-prop">layoutDirection</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QLocale </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#locale-prop">locale</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Qt::HANDLE </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#macCGHandle">macCGHandle</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Qt::HANDLE </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#macQDHandle">macQDHandle</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPoint </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#mapFrom">mapFrom</a></b> ( QWidget * <i>parent</i>, const QPoint &amp; <i>pos</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPoint </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#mapFromGlobal">mapFromGlobal</a></b> ( const QPoint &amp; <i>pos</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPoint </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#mapFromParent">mapFromParent</a></b> ( const QPoint &amp; <i>pos</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPoint </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#mapTo">mapTo</a></b> ( QWidget * <i>parent</i>, const QPoint &amp; <i>pos</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPoint </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#mapToGlobal">mapToGlobal</a></b> ( const QPoint &amp; <i>pos</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPoint </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#mapToParent">mapToParent</a></b> ( const QPoint &amp; <i>pos</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QRegion </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#mask">mask</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#maximumHeight-prop">maximumHeight</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QSize </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#maximumSize-prop">maximumSize</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#maximumWidth-prop">maximumWidth</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#minimumHeight-prop">minimumHeight</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QSize </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#minimumSize-prop">minimumSize</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QSize </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#minimumSizeHint-prop">minimumSizeHint</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#minimumWidth-prop">minimumWidth</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#pos-prop">move</a></b> ( const QPoint &amp; )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#pos-prop">move</a></b> ( int <i>x</i>, int <i>y</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QWidget * </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#nativeParentWidget">nativeParentWidget</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QWidget * </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#nextInFocusChain">nextInFocusChain</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QRect </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#normalGeometry-prop">normalGeometry</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#overrideWindowFlags">overrideWindowFlags</a></b> ( Qt::WindowFlags <i>flags</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const QPalette &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#palette-prop">palette</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QWidget * </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#parentWidget">parentWidget</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPoint </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#pos-prop">pos</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QWidget * </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#previousInFocusChain">previousInFocusChain</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QRect </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#rect-prop">rect</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#releaseKeyboard">releaseKeyboard</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#releaseMouse">releaseMouse</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#releaseShortcut">releaseShortcut</a></b> ( int <i>id</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#removeAction">removeAction</a></b> ( QAction * <i>action</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#render">render</a></b> ( QPaintDevice * <i>target</i>, const QPoint &amp; <i>targetOffset</i> = QPoint(), const QRegion &amp; <i>sourceRegion</i> = QRegion(), RenderFlags <i>renderFlags</i> = RenderFlags( DrawWindowBackground | DrawChildren ) )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#render-2">render</a></b> ( QPainter * <i>painter</i>, const QPoint &amp; <i>targetOffset</i> = QPoint(), const QRegion &amp; <i>sourceRegion</i> = QRegion(), RenderFlags <i>renderFlags</i> = RenderFlags( DrawWindowBackground | DrawChildren ) )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#repaint-6">repaint</a></b> ( int <i>x</i>, int <i>y</i>, int <i>w</i>, int <i>h</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#repaint-7">repaint</a></b> ( const QRect &amp; <i>rect</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#repaint-8">repaint</a></b> ( const QRegion &amp; <i>rgn</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#size-prop">resize</a></b> ( const QSize &amp; )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#size-prop">resize</a></b> ( int <i>w</i>, int <i>h</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#restoreGeometry">restoreGeometry</a></b> ( const QByteArray &amp; <i>geometry</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#saveGeometry">saveGeometry</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#scroll">scroll</a></b> ( int <i>dx</i>, int <i>dy</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#scroll-2">scroll</a></b> ( int <i>dx</i>, int <i>dy</i>, const QRect &amp; <i>r</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#acceptDrops-prop">setAcceptDrops</a></b> ( bool <i>on</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#accessibleDescription-prop">setAccessibleDescription</a></b> ( const QString &amp; <i>description</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#accessibleName-prop">setAccessibleName</a></b> ( const QString &amp; <i>name</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setAttribute">setAttribute</a></b> ( Qt::WidgetAttribute <i>attribute</i>, bool <i>on</i> = true )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#autoFillBackground-prop">setAutoFillBackground</a></b> ( bool <i>enabled</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setBackgroundRole">setBackgroundRole</a></b> ( QPalette::ColorRole <i>role</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#baseSize-prop">setBaseSize</a></b> ( const QSize &amp; )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#baseSize-prop">setBaseSize</a></b> ( int <i>basew</i>, int <i>baseh</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setContentsMargins">setContentsMargins</a></b> ( int <i>left</i>, int <i>top</i>, int <i>right</i>, int <i>bottom</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setContentsMargins-2">setContentsMargins</a></b> ( const QMargins &amp; <i>margins</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#contextMenuPolicy-prop">setContextMenuPolicy</a></b> ( Qt::ContextMenuPolicy <i>policy</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#cursor-prop">setCursor</a></b> ( const QCursor &amp; )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setEditFocus">setEditFocus</a></b> ( bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setFixedHeight">setFixedHeight</a></b> ( int <i>h</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setFixedSize">setFixedSize</a></b> ( const QSize &amp; <i>s</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setFixedSize-2">setFixedSize</a></b> ( int <i>w</i>, int <i>h</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setFixedWidth">setFixedWidth</a></b> ( int <i>w</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setFocus">setFocus</a></b> ( Qt::FocusReason <i>reason</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a></b> ( Qt::FocusPolicy <i>policy</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setFocusProxy">setFocusProxy</a></b> ( QWidget * <i>w</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#font-prop">setFont</a></b> ( const QFont &amp; )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setForegroundRole">setForegroundRole</a></b> ( QPalette::ColorRole <i>role</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#geometry-prop">setGeometry</a></b> ( const QRect &amp; )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#geometry-prop">setGeometry</a></b> ( int <i>x</i>, int <i>y</i>, int <i>w</i>, int <i>h</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setGraphicsEffect">setGraphicsEffect</a></b> ( QGraphicsEffect * <i>effect</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setInputContext">setInputContext</a></b> ( QInputContext * <i>context</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#inputMethodHints-prop">setInputMethodHints</a></b> ( Qt::InputMethodHints <i>hints</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setLayout">setLayout</a></b> ( QLayout * <i>layout</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#layoutDirection-prop">setLayoutDirection</a></b> ( Qt::LayoutDirection <i>direction</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#locale-prop">setLocale</a></b> ( const QLocale &amp; <i>locale</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setMask">setMask</a></b> ( const QBitmap &amp; <i>bitmap</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setMask-2">setMask</a></b> ( const QRegion &amp; <i>region</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#maximumHeight-prop">setMaximumHeight</a></b> ( int <i>maxh</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#maximumSize-prop">setMaximumSize</a></b> ( const QSize &amp; )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#maximumSize-prop">setMaximumSize</a></b> ( int <i>maxw</i>, int <i>maxh</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#maximumWidth-prop">setMaximumWidth</a></b> ( int <i>maxw</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#minimumHeight-prop">setMinimumHeight</a></b> ( int <i>minh</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#minimumSize-prop">setMinimumSize</a></b> ( const QSize &amp; )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#minimumSize-prop">setMinimumSize</a></b> ( int <i>minw</i>, int <i>minh</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#minimumWidth-prop">setMinimumWidth</a></b> ( int <i>minw</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#mouseTracking-prop">setMouseTracking</a></b> ( bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#palette-prop">setPalette</a></b> ( const QPalette &amp; )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setParent">setParent</a></b> ( QWidget * <i>parent</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setParent-2">setParent</a></b> ( QWidget * <i>parent</i>, Qt::WindowFlags <i>f</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setShortcutAutoRepeat">setShortcutAutoRepeat</a></b> ( int <i>id</i>, bool <i>enable</i> = true )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setShortcutEnabled">setShortcutEnabled</a></b> ( int <i>id</i>, bool <i>enable</i> = true )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#sizeIncrement-prop">setSizeIncrement</a></b> ( const QSize &amp; )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#sizeIncrement-prop">setSizeIncrement</a></b> ( int <i>w</i>, int <i>h</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#sizePolicy-prop">setSizePolicy</a></b> ( QSizePolicy )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#sizePolicy-prop">setSizePolicy</a></b> ( QSizePolicy::Policy <i>horizontal</i>, QSizePolicy::Policy <i>vertical</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#statusTip-prop">setStatusTip</a></b> ( const QString &amp; )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setStyle">setStyle</a></b> ( QStyle * <i>style</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#toolTip-prop">setToolTip</a></b> ( const QString &amp; )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#updatesEnabled-prop">setUpdatesEnabled</a></b> ( bool <i>enable</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#whatsThis-prop">setWhatsThis</a></b> ( const QString &amp; )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#windowFilePath-prop">setWindowFilePath</a></b> ( const QString &amp; <i>filePath</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#windowFlags-prop">setWindowFlags</a></b> ( Qt::WindowFlags <i>type</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#windowIcon-prop">setWindowIcon</a></b> ( const QIcon &amp; <i>icon</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#windowIconText-prop">setWindowIconText</a></b> ( const QString &amp; )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#windowModality-prop">setWindowModality</a></b> ( Qt::WindowModality <i>windowModality</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#windowOpacity-prop">setWindowOpacity</a></b> ( qreal <i>level</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setWindowRole">setWindowRole</a></b> ( const QString &amp; <i>role</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setWindowState">setWindowState</a></b> ( Qt::WindowStates <i>windowState</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setWindowSurface">setWindowSurface</a></b> ( QWindowSurface * <i>surface</i> )&nbsp;&nbsp;<tt> (preliminary)</tt></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setupUi">setupUi</a></b> ( QWidget * <i>widget</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QSize </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#size-prop">size</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QSize </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#sizeHint-prop">sizeHint</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QSize </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#sizeIncrement-prop">sizeIncrement</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QSizePolicy </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#sizePolicy-prop">sizePolicy</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#stackUnder">stackUnder</a></b> ( QWidget * <i>w</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#statusTip-prop">statusTip</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QStyle * </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#style">style</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#styleSheet-prop">styleSheet</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#testAttribute">testAttribute</a></b> ( Qt::WidgetAttribute <i>attribute</i> ) const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#toolTip-prop">toolTip</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#underMouse">underMouse</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#ungrabGesture">ungrabGesture</a></b> ( Qt::GestureType <i>gesture</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#cursor-prop">unsetCursor</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#layoutDirection-prop">unsetLayoutDirection</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#locale-prop">unsetLocale</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#update-2">update</a></b> ( int <i>x</i>, int <i>y</i>, int <i>w</i>, int <i>h</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#update-3">update</a></b> ( const QRect &amp; <i>rect</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#update-4">update</a></b> ( const QRegion &amp; <i>rgn</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#updateGeometry">updateGeometry</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#updatesEnabled-prop">updatesEnabled</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QRegion </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#visibleRegion">visibleRegion</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#whatsThis-prop">whatsThis</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#width-prop">width</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">WId </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#winId">winId</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QWidget * </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#window">window</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#windowFilePath-prop">windowFilePath</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Qt::WindowFlags </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#windowFlags-prop">windowFlags</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QIcon </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#windowIcon-prop">windowIcon</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#windowIconText-prop">windowIconText</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Qt::WindowModality </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#windowModality-prop">windowModality</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">qreal </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#windowOpacity-prop">windowOpacity</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#windowRole">windowRole</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Qt::WindowStates </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#windowState">windowState</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QWindowSurface * </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#windowSurface">windowSurface</a></b> () const&nbsp;&nbsp;<tt> (preliminary)</tt></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#windowTitle-prop">windowTitle</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Qt::WindowType </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#windowType">windowType</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#x-prop">x</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const QX11Info &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#x11Info">x11Info</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Qt::HANDLE </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#x11PictureHandle">x11PictureHandle</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#y-prop">y</a></b> () const</td></tr>
</table>
<hr />
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">virtual HDC </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#getDC">getDC</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QPaintEngine * </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#paintEngine">paintEngine</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#releaseDC">releaseDC</a></b> ( HDC <i>hdc</i> ) const</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li><div bar="2" class="fn"></div>13 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<hr />
<a name="public-slots"></a>
<h2>Public Slots</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#close">close</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#hide">hide</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#lower">lower</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#raise">raise</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#repaint">repaint</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setDisabled">setDisabled</a></b> ( bool <i>disable</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#enabled-prop">setEnabled</a></b> ( bool )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setFocus-2">setFocus</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setHidden">setHidden</a></b> ( bool <i>hidden</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#styleSheet-prop">setStyleSheet</a></b> ( const QString &amp; <i>styleSheet</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#visible-prop">setVisible</a></b> ( bool <i>visible</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#windowModified-prop">setWindowModified</a></b> ( bool )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#windowTitle-prop">setWindowTitle</a></b> ( const QString &amp; )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#show">show</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#showFullScreen">showFullScreen</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#showMaximized">showMaximized</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#showMinimized">showMinimized</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#showNormal">showNormal</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#update">update</a></b> ()</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
</ul>
<hr />
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#customContextMenuRequested">customContextMenuRequested</a></b> ( const QPoint &amp; <i>pos</i> )</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<hr />
<a name="static-public-members"></a>
<h2>Static Public Members</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QWidget * </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#find">find</a></b> ( WId <i>id</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QWidget * </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#keyboardGrabber">keyboardGrabber</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QWidget * </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#mouseGrabber">mouseGrabber</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#setTabOrder">setTabOrder</a></b> ( QWidget * <i>first</i>, QWidget * <i>second</i> )</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>5 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
</ul>
<hr />
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#actionEvent">actionEvent</a></b> ( QActionEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#changeEvent">changeEvent</a></b> ( QEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#closeEvent">closeEvent</a></b> ( QCloseEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#contextMenuEvent">contextMenuEvent</a></b> ( QContextMenuEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#create">create</a></b> ( WId <i>window</i> = 0, bool <i>initializeWindow</i> = true, bool <i>destroyOldWindow</i> = true )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#destroy">destroy</a></b> ( bool <i>destroyWindow</i> = true, bool <i>destroySubWindows</i> = true )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#dragEnterEvent">dragEnterEvent</a></b> ( QDragEnterEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#dragLeaveEvent">dragLeaveEvent</a></b> ( QDragLeaveEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#dragMoveEvent">dragMoveEvent</a></b> ( QDragMoveEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#dropEvent">dropEvent</a></b> ( QDropEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#enterEvent">enterEvent</a></b> ( QEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#focusInEvent">focusInEvent</a></b> ( QFocusEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#focusNextChild">focusNextChild</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#focusNextPrevChild">focusNextPrevChild</a></b> ( bool <i>next</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#focusOutEvent">focusOutEvent</a></b> ( QFocusEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#focusPreviousChild">focusPreviousChild</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#hideEvent">hideEvent</a></b> ( QHideEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#inputMethodEvent">inputMethodEvent</a></b> ( QInputMethodEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#keyPressEvent">keyPressEvent</a></b> ( QKeyEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#keyReleaseEvent">keyReleaseEvent</a></b> ( QKeyEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#leaveEvent">leaveEvent</a></b> ( QEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#macEvent">macEvent</a></b> ( EventHandlerCallRef <i>caller</i>, EventRef <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a></b> ( QMouseEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a></b> ( QMouseEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#mousePressEvent">mousePressEvent</a></b> ( QMouseEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a></b> ( QMouseEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#moveEvent">moveEvent</a></b> ( QMoveEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#paintEvent">paintEvent</a></b> ( QPaintEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#qwsEvent">qwsEvent</a></b> ( QWSEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#resizeEvent">resizeEvent</a></b> ( QResizeEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#showEvent">showEvent</a></b> ( QShowEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#tabletEvent">tabletEvent</a></b> ( QTabletEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#wheelEvent">wheelEvent</a></b> ( QWheelEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#winEvent">winEvent</a></b> ( MSG * <i>message</i>, long * <i>result</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#x11Event">x11Event</a></b> ( XEvent * <i>event</i> )</td></tr>
</table>
<hr />
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#event">event</a></b> ( QEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#metric">metric</a></b> ( PaintDeviceMetric <i>m</i> ) const</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li><div bar="2" class="fn"></div>1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<hr />
<a name="protected-slots"></a>
<h2>Protected Slots</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#updateMicroFocus">updateMicroFocus</a></b> ()</td></tr>
</table>
<hr />
<a name="related-non-members"></a>
<h2>Related Non-Members</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">typedef </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#QWidgetList-typedef">QWidgetList</a></b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef </td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#WId-typedef">WId</a></b></td></tr>
</table>
<hr />
<a name="macros"></a>
<h2>Macros</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qwidget.html#QWIDGETSIZE_MAX">QWIDGETSIZE_MAX</a></b></td></tr>
</table>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QWidget class is the base class of all user interface objects.</p>
<p>The widget is the atom of the user interface: it receives mouse, keyboard and other events from the window system, and paints a representation of itself on the screen. Every widget is rectangular, and they are sorted in a Z-order. A widget is clipped by its parent and by the widgets in front of it.</p>
<p>A widget that is not embedded in a parent widget is called a window. Usually, windows have a frame and a title bar, although it is also possible to create windows without such decoration using suitable <a href="qt.html#WindowType-enum">window flags</a>). In Qt, <a href="qmainwindow.html">QMainWindow</a> and the various subclasses of <a href="qdialog.html">QDialog</a> are the most common window types.</p>
<p>Every widget's constructor accepts one or two standard arguments:</p>
<ol type="1">
<li><tt>QWidget *parent = 0</tt> is the parent of the new widget. If it is 0 (the default), the new widget will be a window. If not, it will be a child of <i>parent</i>, and be constrained by <i>parent</i>'s geometry (unless you specify <a href="qt.html#WindowType-enum">Qt::Window</a> as window flag).</li>
<li><tt>Qt::WindowFlags f = 0</tt> (where available) sets the window flags; the default is suitable for almost all widgets, but to get, for example, a window without a window system frame, you must use special flags.</li>
</ol>
<p>QWidget has many member functions, but some of them have little direct functionality; for example, QWidget has a font property, but never uses this itself. There are many subclasses which provide real functionality, such as <a href="qlabel.html">QLabel</a>, <a href="qpushbutton.html">QPushButton</a>, <a href="qlistwidget.html">QListWidget</a>, and <a href="qtabwidget.html">QTabWidget</a>.</p>
<a name="top-level-and-child-widgets"></a>
<h3>Top-Level and Child Widgets</h3>
<p>A widget without a parent widget is always an independent window (top-level widget). For these widgets, <a href="qwidget.html#windowTitle-prop">setWindowTitle</a>() and <a href="qwidget.html#windowIcon-prop">setWindowIcon</a>() set the title bar and icon respectively.</p>
<p>Non-window widgets are child widgets, displayed within their parent widgets. Most widgets in Qt are mainly useful as child widgets. For example, it is possible to display a button as a top-level window, but most people prefer to put their buttons inside other widgets, such as <a href="qdialog.html">QDialog</a>.</p>
<p align="center"><img src="images/parent-child-widgets.png" alt="A parent widget containing various child widgets." /></p><p>The diagram above shows a <a href="qgroupbox.html">QGroupBox</a> widget being used to hold various child widgets in a layout provided by <a href="qgridlayout.html">QGridLayout</a>. The <a href="qlabel.html">QLabel</a> child widgets have been outlined to indicate their full sizes.</p>
<p>If you want to use a QWidget to hold child widgets you will usually want to add a layout to the parent QWidget. See <a href="layout.html">Layout Management</a> for more information.</p>
<a name="composite-widgets"></a>
<h3>Composite Widgets</h3>
<p>When a widget is used as a container to group a number of child widgets, it is known as a composite widget. These can be created by constructing a widget with the required visual properties - a <a href="qframe.html">QFrame</a>, for example - and adding child widgets to it, usually managed by a layout. The above diagram shows such a composite widget that was created using <a href="designer-manual.html#qt-designer">Qt Designer</a>.</p>
<p>Composite widgets can also be created by subclassing a standard widget, such as QWidget or <a href="qframe.html">QFrame</a>, and adding the necessary layout and child widgets in the constructor of the subclass. Many of the <a href="examples.html">examples provided with Qt</a> use this approach, and it is also covered in the Qt <a href="tutorials.html">Tutorials</a>.</p>
<a name="custom-widgets-and-painting"></a>
<h3>Custom Widgets and Painting</h3>
<p>Since QWidget is a subclass of <a href="qpaintdevice.html">QPaintDevice</a>, subclasses can be used to display custom content that is composed using a series of painting operations with an instance of the <a href="qpainter.html">QPainter</a> class. This approach contrasts with the canvas-style approach used by the <a href="graphicsview.html#graphics-view">Graphics View Framework</a> where items are added to a scene by the application and are rendered by the framework itself.</p>
<p>Each widget performs all painting operations from within its <a href="qwidget.html#paintEvent">paintEvent</a>() function. This is called whenever the widget needs to be redrawn, either as a result of some external change or when requested by the application.</p>
<p>The <a href="widgets-analogclock.html">Analog Clock example</a> shows how a simple widget can handle paint events.</p>
<a name="size-hints-and-size-policies"></a>
<h3>Size Hints and Size Policies</h3>
<p>When implementing a new widget, it is almost always useful to reimplement <a href="qwidget.html#sizeHint-prop">sizeHint</a>() to provide a reasonable default size for the widget and to set the correct size policy with <a href="qwidget.html#sizePolicy-prop">setSizePolicy</a>().</p>
<p>By default, composite widgets which do not provide a size hint will be sized according to the space requirements of their child widgets.</p>
<p>The size policy lets you supply good default behavior for the layout management system, so that other widgets can contain and manage yours easily. The default size policy indicates that the size hint represents the preferred size of the widget, and this is often good enough for many widgets.</p>
<p><b>Note:</b> The size of top-level widgets are constrained to 2/3 of the desktop's height and width. You can <a href="qwidget.html#size-prop">resize</a>() the widget manually if these bounds are inadequate.</p>
<a name="events"></a>
<h3>Events</h3>
<p>Widgets respond to events that are typically caused by user actions. Qt delivers events to widgets by calling specific event handler functions with instances of <a href="qevent.html">QEvent</a> subclasses containing information about each event.</p>
<p>If your widget only contains child widgets, you probably do not need to implement any event handlers. If you want to detect a mouse click in a child widget call the child's <a href="qwidget.html#underMouse">underMouse</a>() function inside the widget's <a href="qwidget.html#mousePressEvent">mousePressEvent</a>().</p>
<p>The <a href="widgets-scribble.html">Scribble example</a> implements a wider set of events to handle mouse movement, button presses, and window resizing.</p>
<p>You will need to supply the behavior and content for your own widgets, but here is a brief overview of the events that are relevant to QWidget, starting with the most common ones:</p>
<ul>
<li><a href="qwidget.html#paintEvent">paintEvent</a>() is called whenever the widget needs to be repainted. Every widget displaying custom content must implement it. Painting using a <a href="qpainter.html">QPainter</a> can only take place in a <a href="qwidget.html#paintEvent">paintEvent</a>() or a function called by a <a href="qwidget.html#paintEvent">paintEvent</a>().</li>
<li><a href="qwidget.html#resizeEvent">resizeEvent</a>() is called when the widget has been resized.</li>
<li><a href="qwidget.html#mousePressEvent">mousePressEvent</a>() is called when a mouse button is pressed while the mouse cursor is inside the widget, or when the widget has grabbed the mouse using <a href="qwidget.html#grabMouse">grabMouse</a>(). Pressing the mouse without releasing it is effectively the same as calling <a href="qwidget.html#grabMouse">grabMouse</a>().</li>
<li><a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>() is called when a mouse button is released. A widget receives mouse release events when it has received the corresponding mouse press event. This means that if the user presses the mouse inside <i>your</i> widget, then drags the mouse somewhere else before releasing the mouse button, <i>your</i> widget receives the release event. There is one exception: if a popup menu appears while the mouse button is held down, this popup immediately steals the mouse events.</li>
<li><a href="qwidget.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a>() is called when the user double-clicks in the widget. If the user double-clicks, the widget receives a mouse press event, a mouse release event and finally this event instead of a second mouse press event. (Some mouse move events may also be received if the mouse is not held steady during this operation.) It is <i>not possible</i> to distinguish a click from a double-click until the second click arrives. (This is one reason why most GUI books recommend that double-clicks be an extension of single-clicks, rather than trigger a different action.)</li>
</ul>
<p>Widgets that accept keyboard input need to reimplement a few more event handlers:</p>
<ul>
<li><a href="qwidget.html#keyPressEvent">keyPressEvent</a>() is called whenever a key is pressed, and again when a key has been held down long enough for it to auto-repeat. The <b>Tab</b> and <b>Shift+Tab</b> keys are only passed to the widget if they are not used by the focus-change mechanisms. To force those keys to be processed by your widget, you must reimplement <a href="qwidget.html#event">QWidget::event</a>().</li>
<li><a href="qwidget.html#focusInEvent">focusInEvent</a>() is called when the widget gains keyboard focus (assuming you have called <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>()). Well-behaved widgets indicate that they own the keyboard focus in a clear but discreet way.</li>
<li><a href="qwidget.html#focusOutEvent">focusOutEvent</a>() is called when the widget loses keyboard focus.</li>
</ul>
<p>You may be required to also reimplement some of the less common event handlers:</p>
<ul>
<li><a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>() is called whenever the mouse moves while a mouse button is held down. This can be useful during drag and drop operations. If you call setMouseTracking(true), you get mouse move events even when no buttons are held down. (See also the <a href="dnd.html">Drag and Drop</a> guide.)</li>
<li><a href="qwidget.html#keyReleaseEvent">keyReleaseEvent</a>() is called whenever a key is released and while it is held down (if the key is auto-repeating). In that case, the widget will receive a pair of key release and key press event for every repeat. The <b>Tab</b> and <b>Shift+Tab</b> keys are only passed to the widget if they are not used by the focus-change mechanisms. To force those keys to be processed by your widget, you must reimplement <a href="qwidget.html#event">QWidget::event</a>().</li>
<li><a href="qwidget.html#wheelEvent">wheelEvent</a>() is called whenever the user turns the mouse wheel while the widget has the focus.</li>
<li><a href="qwidget.html#enterEvent">enterEvent</a>() is called when the mouse enters the widget's screen space. (This excludes screen space owned by any of the widget's children.)</li>
<li><a href="qwidget.html#leaveEvent">leaveEvent</a>() is called when the mouse leaves the widget's screen space. If the mouse enters a child widget it will not cause a <a href="qwidget.html#leaveEvent">leaveEvent</a>().</li>
<li><a href="qwidget.html#moveEvent">moveEvent</a>() is called when the widget has been moved relative to its parent.</li>
<li><a href="qwidget.html#closeEvent">closeEvent</a>() is called when the user closes the widget (or when <a href="qwidget.html#close">close</a>() is called).</li>
</ul>
<p>There are also some rather obscure events described in the documentation for <a href="qevent.html#Type-enum">QEvent::Type</a>. To handle these events, you need to reimplement <a href="qwidget.html#event">event</a>() directly.</p>
<p>The default implementation of <a href="qwidget.html#event">event</a>() handles <b>Tab</b> and <b>Shift+Tab</b> (to move the keyboard focus), and passes on most of the other events to one of the more specialized handlers above.</p>
<p>Events and the mechanism used to deliver them are covered in the <a href="eventsandfilters.html">Events and Event Filters</a> document.</p>
<a name="groups-of-functions-and-properties"></a>
<h3>Groups of Functions and Properties</h3>
<p><table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>Context</th><th>Functions and Properties</th></tr></thead>
<tr valign="top" class="odd"><td>Window functions</td><td><a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), <a href="qwidget.html#raise">raise</a>(), <a href="qwidget.html#lower">lower</a>(), <a href="qwidget.html#close">close</a>().</td></tr>
<tr valign="top" class="even"><td>Top-level windows</td><td><a href="qwidget.html#windowModified-prop">windowModified</a>, <a href="qwidget.html#windowTitle-prop">windowTitle</a>, <a href="qwidget.html#windowIcon-prop">windowIcon</a>, <a href="qwidget.html#windowIconText-prop">windowIconText</a>, <a href="qwidget.html#isActiveWindow-prop">isActiveWindow</a>, <a href="qwidget.html#activateWindow">activateWindow</a>(), <a href="qwidget.html#minimized-prop">minimized</a>, <a href="qwidget.html#showMinimized">showMinimized</a>(), <a href="qwidget.html#maximized-prop">maximized</a>, <a href="qwidget.html#showMaximized">showMaximized</a>(), <a href="qwidget.html#fullScreen-prop">fullScreen</a>, <a href="qwidget.html#showFullScreen">showFullScreen</a>(), <a href="qwidget.html#showNormal">showNormal</a>().</td></tr>
<tr valign="top" class="odd"><td>Window contents</td><td><a href="qwidget.html#update">update</a>(), <a href="qwidget.html#repaint">repaint</a>(), <a href="qwidget.html#scroll">scroll</a>().</td></tr>
<tr valign="top" class="even"><td>Geometry</td><td><a href="qwidget.html#pos-prop">pos</a>, <a href="qwidget.html#x-prop">x</a>(), <a href="qwidget.html#y-prop">y</a>(), <a href="qwidget.html#rect-prop">rect</a>, <a href="qwidget.html#size-prop">size</a>, <a href="qwidget.html#width-prop">width</a>(), <a href="qwidget.html#height-prop">height</a>(), <a href="qwidget.html#pos-prop">move</a>(), <a href="qwidget.html#size-prop">resize</a>(), <a href="qwidget.html#sizePolicy-prop">sizePolicy</a>, <a href="qwidget.html#sizeHint-prop">sizeHint</a>(), <a href="qwidget.html#minimumSizeHint-prop">minimumSizeHint</a>(), <a href="qwidget.html#updateGeometry">updateGeometry</a>(), <a href="qwidget.html#layout">layout</a>(), <a href="qwidget.html#frameGeometry-prop">frameGeometry</a>, <a href="qwidget.html#geometry-prop">geometry</a>, <a href="qwidget.html#childrenRect-prop">childrenRect</a>, <a href="qwidget.html#childrenRegion-prop">childrenRegion</a>, <a href="qwidget.html#adjustSize">adjustSize</a>(), <a href="qwidget.html#mapFromGlobal">mapFromGlobal</a>(), <a href="qwidget.html#mapToGlobal">mapToGlobal</a>(), <a href="qwidget.html#mapFromParent">mapFromParent</a>(), <a href="qwidget.html#mapToParent">mapToParent</a>(), <a href="qwidget.html#maximumSize-prop">maximumSize</a>, <a href="qwidget.html#minimumSize-prop">minimumSize</a>, <a href="qwidget.html#sizeIncrement-prop">sizeIncrement</a>, <a href="qwidget.html#baseSize-prop">baseSize</a>, <a href="qwidget.html#setFixedSize">setFixedSize</a>()</td></tr>
<tr valign="top" class="odd"><td>Mode</td><td><a href="qwidget.html#visible-prop">visible</a>, <a href="qwidget.html#isVisibleTo">isVisibleTo</a>(), <a href="qwidget.html#enabled-prop">enabled</a>, <a href="qwidget.html#isEnabledTo">isEnabledTo</a>(), <a href="qwidget.html#modal-prop">modal</a>, <a href="qwidget.html#isWindow">isWindow</a>(), <a href="qwidget.html#mouseTracking-prop">mouseTracking</a>, <a href="qwidget.html#updatesEnabled-prop">updatesEnabled</a>, <a href="qwidget.html#visibleRegion">visibleRegion</a>().</td></tr>
<tr valign="top" class="even"><td>Look and feel</td><td><a href="qwidget.html#style">style</a>(), <a href="qwidget.html#setStyle">setStyle</a>(), <a href="qwidget.html#styleSheet-prop">styleSheet</a>, <a href="qwidget.html#cursor-prop">cursor</a>, <a href="qwidget.html#font-prop">font</a>, <a href="qwidget.html#palette-prop">palette</a>, <a href="qwidget.html#backgroundRole">backgroundRole</a>(), <a href="qwidget.html#setBackgroundRole">setBackgroundRole</a>(), <a href="qwidget.html#fontInfo">fontInfo</a>(), <a href="qwidget.html#fontMetrics">fontMetrics</a>().</td></tr>
<tr valign="top" class="odd"><td>Keyboard focus functions</td><td><a href="qwidget.html#focus-prop">focus</a>, <a href="qwidget.html#focusPolicy-prop">focusPolicy</a>, <a href="qwidget.html#setFocus">setFocus</a>(), <a href="qwidget.html#clearFocus">clearFocus</a>(), <a href="qwidget.html#setTabOrder">setTabOrder</a>(), <a href="qwidget.html#setFocusProxy">setFocusProxy</a>(), <a href="qwidget.html#focusNextChild">focusNextChild</a>(), <a href="qwidget.html#focusPreviousChild">focusPreviousChild</a>().</td></tr>
<tr valign="top" class="even"><td>Mouse and keyboard grabbing</td><td><a href="qwidget.html#grabMouse">grabMouse</a>(), <a href="qwidget.html#releaseMouse">releaseMouse</a>(), <a href="qwidget.html#grabKeyboard">grabKeyboard</a>(), <a href="qwidget.html#releaseKeyboard">releaseKeyboard</a>(), <a href="qwidget.html#mouseGrabber">mouseGrabber</a>(), <a href="qwidget.html#keyboardGrabber">keyboardGrabber</a>().</td></tr>
<tr valign="top" class="odd"><td>Event handlers</td><td><a href="qwidget.html#event">event</a>(), <a href="qwidget.html#mousePressEvent">mousePressEvent</a>(), <a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>(), <a href="qwidget.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a>(), <a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>(), <a href="qwidget.html#keyPressEvent">keyPressEvent</a>(), <a href="qwidget.html#keyReleaseEvent">keyReleaseEvent</a>(), <a href="qwidget.html#focusInEvent">focusInEvent</a>(), <a href="qwidget.html#focusOutEvent">focusOutEvent</a>(), <a href="qwidget.html#wheelEvent">wheelEvent</a>(), <a href="qwidget.html#enterEvent">enterEvent</a>(), <a href="qwidget.html#leaveEvent">leaveEvent</a>(), <a href="qwidget.html#paintEvent">paintEvent</a>(), <a href="qwidget.html#moveEvent">moveEvent</a>(), <a href="qwidget.html#resizeEvent">resizeEvent</a>(), <a href="qwidget.html#closeEvent">closeEvent</a>(), <a href="qwidget.html#dragEnterEvent">dragEnterEvent</a>(), <a href="qwidget.html#dragMoveEvent">dragMoveEvent</a>(), <a href="qwidget.html#dragLeaveEvent">dragLeaveEvent</a>(), <a href="qwidget.html#dropEvent">dropEvent</a>(), <a href="qobject.html#childEvent">childEvent</a>(), <a href="qwidget.html#showEvent">showEvent</a>(), <a href="qwidget.html#hideEvent">hideEvent</a>(), <a href="qobject.html#customEvent">customEvent</a>(). <a href="qwidget.html#changeEvent">changeEvent</a>(),</td></tr>
<tr valign="top" class="even"><td>System functions</td><td><a href="qwidget.html#parentWidget">parentWidget</a>(), <a href="qwidget.html#window">window</a>(), <a href="qwidget.html#setParent">setParent</a>(), <a href="qwidget.html#winId">winId</a>(), <a href="qwidget.html#find">find</a>(), <a href="qwidget.html#metric">metric</a>().</td></tr>
<tr valign="top" class="odd"><td>Interactive help</td><td><a href="qwidget.html#toolTip-prop">setToolTip</a>(), <a href="qwidget.html#whatsThis-prop">setWhatsThis</a>()</td></tr>
</table></p>
<a name="widget-style-sheets"></a>
<h3>Widget Style Sheets</h3>
<p>In addition to the standard widget styles for each platform, widgets can also be styled according to rules specified in a <a href="qwidget.html#styleSheet-prop">style sheet</a>. This feature enables you to customize the appearance of specific widgets to provide visual cues to users about their purpose. For example, a button could be styled in a particular way to indicate that it performs a destructive action.</p>
<p>The use of widget style sheets is described in more detail in the <a href="stylesheet.html">Qt Style Sheets</a> document.</p>
<a name="transparency-and-double-buffering"></a>
<h3>Transparency and Double Buffering</h3>
<p>Since Qt 4.0, QWidget automatically double-buffers its painting, so there is no need to write double-buffering code in <a href="qwidget.html#paintEvent">paintEvent</a>() to avoid flicker.</p>
<p>Since Qt 4.1, the <a href="qt.html#WidgetAttribute-enum">Qt::WA_ContentsPropagated</a> widget attribute has been deprecated. Instead, the contents of parent widgets are propagated by default to each of their children as long as <a href="qt.html#WidgetAttribute-enum">Qt::WA_PaintOnScreen</a> is not set. Custom widgets can be written to take advantage of this feature by updating irregular regions (to create non-rectangular child widgets), or painting with colors that have less than full alpha component. The following diagram shows how attributes and properties of a custom widget can be fine-tuned to achieve different effects.</p>
<p align="center"><img src="images/propagation-custom.png" /></p><p>In the above diagram, a semi-transparent rectangular child widget with an area removed is constructed and added to a parent widget (a <a href="qlabel.html">QLabel</a> showing a pixmap). Then, different properties and widget attributes are set to achieve different effects:</p>
<ul>
<li>The left widget has no additional properties or widget attributes set. This default state suits most custom widgets using transparency, are irregularly-shaped, or do not paint over their entire area with an opaque brush.</li>
<li>The center widget has the <a href="qwidget.html#autoFillBackground-prop">autoFillBackground</a> property set. This property is used with custom widgets that rely on the widget to supply a default background, and do not paint over their entire area with an opaque brush.</li>
<li>The right widget has the <a href="qt.html#WidgetAttribute-enum">Qt::WA_OpaquePaintEvent</a> widget attribute set. This indicates that the widget will paint over its entire area with opaque colors. The widget's area will initially be <i>uninitialized</i>, represented in the diagram with a red diagonal grid pattern that shines through the overpainted area. The Qt::WA_OpaquePaintArea attribute is useful for widgets that need to paint their own specialized contents quickly and do not need a default filled background.</li>
</ul>
<p>To rapidly update custom widgets with simple background colors, such as real-time plotting or graphing widgets, it is better to define a suitable background color (using <a href="qwidget.html#setBackgroundRole">setBackgroundRole</a>() with the <a href="qpalette.html#ColorRole-enum">QPalette::Window</a> role), set the <a href="qwidget.html#autoFillBackground-prop">autoFillBackground</a> property, and only implement the necessary drawing functionality in the widget's <a href="qwidget.html#paintEvent">paintEvent</a>().</p>
<p>To rapidly update custom widgets that constantly paint over their entire areas with opaque content, e.g&#x2e;, video streaming widgets, it is better to set the widget's <a href="qt.html#WidgetAttribute-enum">Qt::WA_OpaquePaintEvent</a>, avoiding any unnecessary overhead associated with repainting the widget's background.</p>
<p>If a widget has both the <a href="qt.html#WidgetAttribute-enum">Qt::WA_OpaquePaintEvent</a> widget attribute <i>and</i> the <a href="qwidget.html#autoFillBackground-prop">autoFillBackground</a> property set, the <a href="qt.html#WidgetAttribute-enum">Qt::WA_OpaquePaintEvent</a> attribute takes precedence. Depending on your requirements, you should choose either one of them.</p>
<p>Since Qt 4.1, the contents of parent widgets are also propagated to standard Qt widgets. This can lead to some unexpected results if the parent widget is decorated in a non-standard way, as shown in the diagram below.</p>
<p align="center"><img src="images/propagation-standard.png" /></p><p>The scope for customizing the painting behavior of standard Qt widgets, without resorting to subclassing, is slightly less than that possible for custom widgets. Usually, the desired appearance of a standard widget can be achieved by setting its <a href="qwidget.html#autoFillBackground-prop">autoFillBackground</a> property.</p>
<a name="creating-translucent-windows"></a>
<h3>Creating Translucent Windows</h3>
<p>Since Qt 4.5, it has been possible to create windows with translucent regions on window systems that support compositing.</p>
<p>To enable this feature in a top-level widget, set its <a href="qt.html#WidgetAttribute-enum">Qt::WA_TranslucentBackground</a> attribute with <a href="qwidget.html#setAttribute">setAttribute</a>() and ensure that its background is painted with non-opaque colors in the regions you want to be partially transparent.</p>
<p>Platform notes:</p>
<ul>
<li>X11: This feature relies on the use of an X server that supports ARGB visuals and a compositing window manager.</li>
<li>Windows: The widget needs to have the <a href="qt.html#WindowType-enum">Qt::FramelessWindowHint</a> window flag set for the translucency to work.</li>
</ul>
<a name="native-widgets-vs-alien-widgets"></a>
<h3>Native Widgets vs Alien Widgets</h3>
<p>Introduced in Qt 4.4, alien widgets are widgets unknown to the windowing system. They do not have a native window handle associated with them. This feature significantly speeds up widget painting, resizing, and removes flicker.</p>
<p>Should you require the old behavior with native windows, you can choose one of the following options:</p>
<ol type="1">
<li>Use the <tt>QT_USE_NATIVE_WINDOWS=1</tt> in your environment.</li>
<li>Set the <a href="qt.html#ApplicationAttribute-enum">Qt::AA_NativeWindows</a> attribute on your application. All widgets will be native widgets.</li>
<li>Set the <a href="qt.html#WidgetAttribute-enum">Qt::WA_NativeWindow</a> attribute on widgets: The widget itself and all of its ancestors will become native (unless <a href="qt.html#WidgetAttribute-enum">Qt::WA_DontCreateNativeAncestors</a> is set).</li>
<li>Call QWidget::winId to enforce a native window (this implies 3).</li>
<li>Set the <a href="qt.html#WidgetAttribute-enum">Qt::WA_PaintOnScreen</a> attribute to enforce a native window (this implies 3).</li>
</ol>
<a name="softkeys"></a>
<h3>Softkeys</h3>
<p>Since Qt 4.6, Softkeys are usually physical keys on a device that have a corresponding label or other visual representation on the screen that is generally located next to its physical counterpart. They are most often found on mobile phone platforms. In modern touch based user interfaces it is also possible to have softkeys that do not correspond to any physical keys. Softkeys differ from other onscreen labels in that they are contextual.</p>
<p>In Qt, contextual softkeys are added to a widget by calling <a href="qwidget.html#addAction">addAction</a>() and passing a <tt>QAction</tt> with a softkey role set on it. When the widget containing the softkey actions has focus, its softkeys should appear in the user interface. Softkeys are discovered by traversing the widget hierarchy so it is possible to define a single set of softkeys that are present at all times by calling <a href="qwidget.html#addAction">addAction</a>() for a given top level widget.</p>
<p>On some platforms, this concept overlaps with <tt>QMenuBar</tt> such that if no other softkeys are found and the top level widget is a <a href="qmainwindow.html">QMainWindow</a> containing a <a href="qmenubar.html">QMenuBar</a>, the menubar actions may appear on one of the softkeys.</p>
<p>Note: Currently softkeys are only supported on the Symbian Platform.</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>, <a href="qwidget.html#addAction">addAction</a>(), <a href="qaction.html">QAction</a>, and <a href="qmenubar.html">QMenuBar</a>.</p>
<hr />
<h2>Member Type Documentation</h2>
<a name="//apple_ref/cpp/tag/QWidget/RenderFlag"></a>
<a name="//apple_ref/cpp/econst/QWidget/DrawWindowBackground"></a>
<a name="//apple_ref/cpp/econst/QWidget/DrawChildren"></a>
<a name="//apple_ref/cpp/econst/QWidget/IgnoreMask"></a>
<a name="//apple_ref/cpp/tdef/QWidget/RenderFlags"></a>
<h3 class="flags"><a name="RenderFlag-enum"></a>enum QWidget::RenderFlag<br />flags QWidget::RenderFlags</h3>
<p>This enum describes how to render the widget when calling <a href="qwidget.html#render">QWidget::render</a>().</p>
<p><table class="valuelist" border="1" cellpadding="2" cellspacing="1" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QWidget::DrawWindowBackground</tt></td><td align="center" valign="top"><tt>0x1</tt></td><td valign="top">If you enable this option, the widget's background is rendered into the target even if <a href="qwidget.html#autoFillBackground-prop">autoFillBackground</a> is not set. By default, this option is enabled.</td></tr>
<tr><td valign="top"><tt>QWidget::DrawChildren</tt></td><td align="center" valign="top"><tt>0x2</tt></td><td valign="top">If you enable this option, the widget's children are rendered recursively into the target. By default, this option is enabled.</td></tr>
<tr><td valign="top"><tt>QWidget::IgnoreMask</tt></td><td align="center" valign="top"><tt>0x4</tt></td><td valign="top">If you enable this option, the widget's <a href="qwidget.html#mask">QWidget::mask</a>() is ignored when rendering into the target. By default, this option is disabled.</td></tr>
</table></p>
<p>This enum was introduced in Qt 4.3.</p>
<p>The RenderFlags type is a typedef for <a href="qflags.html">QFlags</a>&lt;RenderFlag&gt;. It stores an OR combination of RenderFlag values.</p>
<hr />
<h2>Property Documentation</h2>
<a name="//apple_ref/cpp/instm/QWidget/acceptDrops"></a>
<a name="//apple_ref/cpp/instm/QWidget/setAcceptDrops"></a>
<h3 class="fn"><a name="acceptDrops-prop"></a>acceptDrops : bool</h3>
<p>This property holds whether drop events are enabled for this widget.</p>
<p>Setting this property to true announces to the system that this widget <i>may</i> be able to accept drop events.</p>
<p>If the widget is the desktop (<a href="qwidget.html#windowType">windowType</a>() == <a href="qt.html#WindowType-enum">Qt::Desktop</a>), this may fail if another application is using the desktop; you can call acceptDrops() to test if this occurs.</p>
<p><b>Warning:</b> Do not modify this property in a drag and drop event handler.</p>
<p>By default, this property is false.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b>acceptDrops</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setAcceptDrops</b> ( bool <i>on</i> )</td></tr>
</table>
<p>See also <a href="dnd.html">Drag and Drop</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/accessibleDescription"></a>
<a name="//apple_ref/cpp/instm/QWidget/setAccessibleDescription"></a>
<h3 class="fn"><a name="accessibleDescription-prop"></a>accessibleDescription : <a href="qstring.html">QString</a></h3>
<p>This property holds the widget's description as seen by assistive technologies.</p>
<p>By default, this property contains an empty string.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b>accessibleDescription</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setAccessibleDescription</b> ( const QString &amp; <i>description</i> )</td></tr>
</table>
<p>See also <a href="qaccessibleinterface.html#text">QAccessibleInterface::text</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/accessibleName"></a>
<a name="//apple_ref/cpp/instm/QWidget/setAccessibleName"></a>
<h3 class="fn"><a name="accessibleName-prop"></a>accessibleName : <a href="qstring.html">QString</a></h3>
<p>This property holds the widget's name as seen by assistive technologies.</p>
<p>This property is used by accessible clients to identify, find, or announce the widget for accessible clients.</p>
<p>By default, this property contains an empty string.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b>accessibleName</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setAccessibleName</b> ( const QString &amp; <i>name</i> )</td></tr>
</table>
<p>See also <a href="qaccessibleinterface.html#text">QAccessibleInterface::text</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/autoFillBackground"></a>
<a name="//apple_ref/cpp/instm/QWidget/setAutoFillBackground"></a>
<h3 class="fn"><a name="autoFillBackground-prop"></a>autoFillBackground : bool</h3>
<p>This property holds whether the widget background is filled automatically.</p>
<p>If enabled, this property will cause Qt to fill the background of the widget before invoking the paint event. The color used is defined by the <a href="qpalette.html#ColorRole-enum">QPalette::Window</a> color role from the widget's <a href="qpalette.html">palette</a>.</p>
<p>In addition, Windows are always filled with <a href="qpalette.html#ColorRole-enum">QPalette::Window</a>, unless the WA_OpaquePaintEvent or WA_NoSystemBackground attributes are set.</p>
<p>This property cannot be turned off (i.e&#x2e;, set to false) if a widget's parent has a static gradient for its background.</p>
<p><b>Warning:</b> Use this property with caution in conjunction with <a href="stylesheet.html">Qt Style Sheets</a>. When a widget has a style sheet with a valid background or a border-image, this property is automatically disabled.</p>
<p>By default, this property is false.</p>
<p>This property was introduced in Qt 4.1.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b>autoFillBackground</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setAutoFillBackground</b> ( bool <i>enabled</i> )</td></tr>
</table>
<p>See also <a href="qt.html#WidgetAttribute-enum">Qt::WA_OpaquePaintEvent</a>, <a href="qt.html#WidgetAttribute-enum">Qt::WA_NoSystemBackground</a>, and <a href="qwidget.html#transparency-and-double-buffering">Transparency and Double Buffering</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/baseSize"></a>
<a name="//apple_ref/cpp/instm/QWidget/setBaseSize"></a>
<h3 class="fn"><a name="baseSize-prop"></a>baseSize : <a href="qsize.html">QSize</a></h3>
<p>This property holds the base size of the widget.</p>
<p>The base size is used to calculate a proper widget size if the widget defines <a href="qwidget.html#sizeIncrement-prop">sizeIncrement</a>().</p>
<p>By default, for a newly-created widget, this property contains a size with zero width and height.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QSize </td><td class="memItemRight" valign="bottom"><b>baseSize</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setBaseSize</b> ( const QSize &amp; )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setBaseSize</b> ( int <i>basew</i>, int <i>baseh</i> )</td></tr>
</table>
<p>See also <a href="qwidget.html#sizeIncrement-prop">setSizeIncrement</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/childrenRect"></a>
<h3 class="fn"><a name="childrenRect-prop"></a>childrenRect : const <a href="qrect.html">QRect</a></h3>
<p>This property holds the bounding rectangle of the widget's children.</p>
<p>Hidden children are excluded.</p>
<p>By default, for a widget with no children, this property contains a rectangle with zero width and height located at the origin.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QRect </td><td class="memItemRight" valign="bottom"><b>childrenRect</b> () const</td></tr>
</table>
<p>See also <a href="qwidget.html#childrenRegion-prop">childrenRegion</a>() and <a href="qwidget.html#geometry-prop">geometry</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/childrenRegion"></a>
<h3 class="fn"><a name="childrenRegion-prop"></a>childrenRegion : const <a href="qregion.html">QRegion</a></h3>
<p>This property holds the combined region occupied by the widget's children.</p>
<p>Hidden children are excluded.</p>
<p>By default, for a widget with no children, this property contains an empty region.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QRegion </td><td class="memItemRight" valign="bottom"><b>childrenRegion</b> () const</td></tr>
</table>
<p>See also <a href="qwidget.html#childrenRect-prop">childrenRect</a>(), <a href="qwidget.html#geometry-prop">geometry</a>(), and <a href="qwidget.html#mask">mask</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/contextMenuPolicy"></a>
<a name="//apple_ref/cpp/instm/QWidget/setContextMenuPolicy"></a>
<h3 class="fn"><a name="contextMenuPolicy-prop"></a>contextMenuPolicy : <a href="qt.html#ContextMenuPolicy-enum">Qt::ContextMenuPolicy</a></h3>
<p>This property holds how the widget shows a context menu.</p>
<p>The default value of this property is <a href="qt.html#ContextMenuPolicy-enum">Qt::DefaultContextMenu</a>, which means the <a href="qwidget.html#contextMenuEvent">contextMenuEvent</a>() handler is called. Other values are <a href="qt.html#ContextMenuPolicy-enum">Qt::NoContextMenu</a>, <a href="qt.html#ContextMenuPolicy-enum">Qt::PreventContextMenu</a>, <a href="qt.html#ContextMenuPolicy-enum">Qt::ActionsContextMenu</a>, and <a href="qt.html#ContextMenuPolicy-enum">Qt::CustomContextMenu</a>. With <a href="qt.html#ContextMenuPolicy-enum">Qt::CustomContextMenu</a>, the signal <a href="qwidget.html#customContextMenuRequested">customContextMenuRequested</a>() is emitted.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">Qt::ContextMenuPolicy </td><td class="memItemRight" valign="bottom"><b>contextMenuPolicy</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setContextMenuPolicy</b> ( Qt::ContextMenuPolicy <i>policy</i> )</td></tr>
</table>
<p>See also <a href="qwidget.html#contextMenuEvent">contextMenuEvent</a>(), <a href="qwidget.html#customContextMenuRequested">customContextMenuRequested</a>(), and <a href="qwidget.html#actions">actions</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/cursor"></a>
<a name="//apple_ref/cpp/instm/QWidget/setCursor"></a>
<a name="//apple_ref/cpp/instm/QWidget/unsetCursor"></a>
<h3 class="fn"><a name="cursor-prop"></a>cursor : <a href="qcursor.html">QCursor</a></h3>
<p>This property holds the cursor shape for this widget.</p>
<p>The mouse cursor will assume this shape when it's over this widget. See the <a href="qt.html#CursorShape-enum">list of predefined cursor objects</a> for a range of useful shapes.</p>
<p>An editor widget might use an I-beam cursor:</p>
<pre> setCursor(Qt::IBeamCursor);</pre>
<p>If no cursor has been set, or after a call to unsetCursor(), the parent's cursor is used.</p>
<p>By default, this property contains a cursor with the <a href="qt.html#CursorShape-enum">Qt::ArrowCursor</a> shape.</p>
<p>Some underlying window implementations will reset the cursor if it leaves a widget even if the mouse is grabbed. If you want to have a cursor set for all widgets, even when outside the window, consider <a href="qapplication.html#setOverrideCursor">QApplication::setOverrideCursor</a>().</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QCursor </td><td class="memItemRight" valign="bottom"><b>cursor</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setCursor</b> ( const QCursor &amp; )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>unsetCursor</b> ()</td></tr>
</table>
<p>See also <a href="qapplication.html#setOverrideCursor">QApplication::setOverrideCursor</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/isEnabled"></a>
<a name="//apple_ref/cpp/instm/QWidget/setEnabled"></a>
<h3 class="fn"><a name="enabled-prop"></a>enabled : bool</h3>
<p>This property holds whether the widget is enabled.</p>
<p>An enabled widget handles keyboard and mouse events; a disabled widget does not.</p>
<p>Some widgets display themselves differently when they are disabled. For example a button might draw its label grayed out. If your widget needs to know when it becomes enabled or disabled, you can use the <a href="qwidget.html#changeEvent">changeEvent</a>() with type <a href="qevent.html#Type-enum">QEvent::EnabledChange</a>.</p>
<p>Disabling a widget implicitly disables all its children. Enabling respectively enables all child widgets unless they have been explicitly disabled.</p>
<p>By default, this property is true.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b>isEnabled</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setEnabled</b> ( bool )</td></tr>
</table>
<p>See also <a href="qwidget.html#isEnabledTo">isEnabledTo</a>(), <a href="qkeyevent.html">QKeyEvent</a>, <a href="qmouseevent.html">QMouseEvent</a>, and <a href="qwidget.html#changeEvent">changeEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/hasFocus"></a>
<h3 class="fn"><a name="focus-prop"></a>focus : const bool</h3>
<p>This property holds whether this widget (or its focus proxy) has the keyboard input focus.</p>
<p>By default, this property is false.</p>
<p><b>Note:</b> Obtaining the value of this property for a widget is effectively equivalent to checking whether <a href="qapplication.html#focusWidget">QApplication::focusWidget</a>() refers to the widget.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b>hasFocus</b> () const</td></tr>
</table>
<p>See also <a href="qwidget.html#setFocus">setFocus</a>(), <a href="qwidget.html#clearFocus">clearFocus</a>(), <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>(), and <a href="qapplication.html#focusWidget">QApplication::focusWidget</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/focusPolicy"></a>
<a name="//apple_ref/cpp/instm/QWidget/setFocusPolicy"></a>
<h3 class="fn"><a name="focusPolicy-prop"></a>focusPolicy : <a href="qt.html#FocusPolicy-enum">Qt::FocusPolicy</a></h3>
<p>This property holds the way the widget accepts keyboard focus.</p>
<p>The policy is <a href="qt.html#FocusPolicy-enum">Qt::TabFocus</a> if the widget accepts keyboard focus by tabbing, <a href="qt.html#FocusPolicy-enum">Qt::ClickFocus</a> if the widget accepts focus by clicking, <a href="qt.html#FocusPolicy-enum">Qt::StrongFocus</a> if it accepts both, and <a href="qt.html#FocusPolicy-enum">Qt::NoFocus</a> (the default) if it does not accept focus at all.</p>
<p>You must enable keyboard focus for a widget if it processes keyboard events. This is normally done from the widget's constructor. For instance, the <a href="qlineedit.html">QLineEdit</a> constructor calls setFocusPolicy(<a href="qt.html#FocusPolicy-enum">Qt::StrongFocus</a>).</p>
<p>If the widget has a focus proxy, then the focus policy will be propagated to it.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">Qt::FocusPolicy </td><td class="memItemRight" valign="bottom"><b>focusPolicy</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setFocusPolicy</b> ( Qt::FocusPolicy <i>policy</i> )</td></tr>
</table>
<p>See also <a href="qwidget.html#focusInEvent">focusInEvent</a>(), <a href="qwidget.html#focusOutEvent">focusOutEvent</a>(), <a href="qwidget.html#keyPressEvent">keyPressEvent</a>(), <a href="qwidget.html#keyReleaseEvent">keyReleaseEvent</a>(), and <a href="qwidget.html#enabled-prop">enabled</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/font"></a>
<a name="//apple_ref/cpp/instm/QWidget/setFont"></a>
<h3 class="fn"><a name="font-prop"></a>font : <a href="qfont.html">QFont</a></h3>
<p>This property holds the font currently set for the widget.</p>
<p>This property describes the widget's requested font. The font is used by the widget's style when rendering standard components, and is available as a means to ensure that custom widgets can maintain consistency with the native platform's look and feel. It's common that different platforms, or different styles, define different fonts for an application.</p>
<p>When you assign a new font to a widget, the properties from this font are combined with the widget's default font to form the widget's final font. You can call <a href="qwidget.html#fontInfo">fontInfo</a>() to get a copy of the widget's final font. The final font is also used to initialize <a href="qpainter.html">QPainter</a>'s font.</p>
<p>The default depends on the system environment. <a href="qapplication.html">QApplication</a> maintains a system/theme font which serves as a default for all widgets. There may also be special font defaults for certain types of widgets. You can also define default fonts for widgets yourself by passing a custom font and the name of a widget to <a href="qapplication.html#setFont">QApplication::setFont</a>(). Finally, the font is matched against Qt's font database to find the best match.</p>
<p><a href="qwidget.html">QWidget</a> propagates explicit font properties from parent to child. If you change a specific property on a font and assign that font to a widget, that property will propagate to all the widget's children, overriding any system defaults for that property. Note that fonts by default don't propagate to windows (see <a href="qwidget.html#isWindow">isWindow</a>()) unless the <a href="qt.html#WidgetAttribute-enum">Qt::WA_WindowPropagation</a> attribute is enabled.</p>
<p><a href="qwidget.html">QWidget</a>'s font propagation is similar to its palette propagation.</p>
<p>The current style, which is used to render the content of all standard Qt widgets, is free to choose to use the widget font, or in some cases, to ignore it (partially, or completely). In particular, certain styles like GTK style, Mac style, Windows XP, and Vista style, apply special modifications to the widget font to match the platform's native look and feel. Because of this, assigning properties to a widget's font is not guaranteed to change the appearance of the widget. Instead, you may choose to apply a <a href="qwidget.html#styleSheet-prop">styleSheet</a>.</p>
<p><b>Note:</b> If <a href="stylesheet.html">Qt Style Sheets</a> are used on the same widget as setFont(), style sheets will take precedence if the settings conflict.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">const QFont &amp; </td><td class="memItemRight" valign="bottom"><b>font</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setFont</b> ( const QFont &amp; )</td></tr>
</table>
<p>See also <a href="qwidget.html#fontInfo">fontInfo</a>() and <a href="qwidget.html#fontMetrics">fontMetrics</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/frameGeometry"></a>
<h3 class="fn"><a name="frameGeometry-prop"></a>frameGeometry : const <a href="qrect.html">QRect</a></h3>
<p>This property holds geometry of the widget relative to its parent including any window frame.</p>
<p>See the <a href="application-windows.html#window-geometry">Window Geometry</a> documentation for an overview of geometry issues with windows.</p>
<p>By default, this property contains a value that depends on the user's platform and screen geometry.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QRect </td><td class="memItemRight" valign="bottom"><b>frameGeometry</b> () const</td></tr>
</table>
<p>See also <a href="qwidget.html#geometry-prop">geometry</a>(), <a href="qwidget.html#x-prop">x</a>(), <a href="qwidget.html#y-prop">y</a>(), and <a href="qwidget.html#pos-prop">pos</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/frameSize"></a>
<h3 class="fn"><a name="frameSize-prop"></a>frameSize : const <a href="qsize.html">QSize</a></h3>
<p>This property holds the size of the widget including any window frame.</p>
<p>By default, this property contains a value that depends on the user's platform and screen geometry.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QSize </td><td class="memItemRight" valign="bottom"><b>frameSize</b> () const</td></tr>
</table>
<a name="//apple_ref/cpp/instm/QWidget/isFullScreen"></a>
<h3 class="fn"><a name="fullScreen-prop"></a>fullScreen : const bool</h3>
<p>This property holds whether the widget is shown in full screen mode.</p>
<p>A widget in full screen mode occupies the whole screen area and does not display window decorations, such as a title bar.</p>
<p>By default, this property is false.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b>isFullScreen</b> () const</td></tr>
</table>
<p>See also <a href="qwidget.html#windowState">windowState</a>(), <a href="qwidget.html#minimized-prop">minimized</a>, and <a href="qwidget.html#maximized-prop">maximized</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/geometry"></a>
<a name="//apple_ref/cpp/instm/QWidget/setGeometry"></a>
<h3 class="fn"><a name="geometry-prop"></a>geometry : <a href="qrect.html">QRect</a></h3>
<p>This property holds the geometry of the widget relative to its parent and excluding the window frame.</p>
<p>When changing the geometry, the widget, if visible, receives a move event (<a href="qwidget.html#moveEvent">moveEvent</a>()) and/or a resize event (<a href="qwidget.html#resizeEvent">resizeEvent</a>()) immediately. If the widget is not currently visible, it is guaranteed to receive appropriate events before it is shown.</p>
<p>The size component is adjusted if it lies outside the range defined by <a href="qwidget.html#minimumSize-prop">minimumSize</a>() and <a href="qwidget.html#maximumSize-prop">maximumSize</a>().</p>
<p><b>Warning:</b> Calling setGeometry() inside <a href="qwidget.html#resizeEvent">resizeEvent</a>() or <a href="qwidget.html#moveEvent">moveEvent</a>() can lead to infinite recursion.</p>
<p>See the <a href="application-windows.html#window-geometry">Window Geometry</a> documentation for an overview of geometry issues with windows.</p>
<p>By default, this property contains a value that depends on the user's platform and screen geometry.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">const QRect &amp; </td><td class="memItemRight" valign="bottom"><b>geometry</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setGeometry</b> ( int <i>x</i>, int <i>y</i>, int <i>w</i>, int <i>h</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setGeometry</b> ( const QRect &amp; )</td></tr>
</table>
<p>See also <a href="qwidget.html#frameGeometry-prop">frameGeometry</a>(), <a href="qwidget.html#rect-prop">rect</a>(), <a href="qwidget.html#pos-prop">move</a>(), <a href="qwidget.html#size-prop">resize</a>(), <a href="qwidget.html#moveEvent">moveEvent</a>(), <a href="qwidget.html#resizeEvent">resizeEvent</a>(), <a href="qwidget.html#minimumSize-prop">minimumSize</a>(), and <a href="qwidget.html#maximumSize-prop">maximumSize</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/height"></a>
<h3 class="fn"><a name="height-prop"></a>height : const int</h3>
<p>This property holds the height of the widget excluding any window frame.</p>
<p>See the <a href="application-windows.html#window-geometry">Window Geometry</a> documentation for an overview of geometry issues with windows.</p>
<p><b>Note:</b> Do not use this function to find the height of a screen on a <a href="qdesktopwidget.html">multiple screen desktop</a>. Read <a href="qdesktopwidget.html#screen-geometry">this note</a> for details.</p>
<p>By default, this property contains a value that depends on the user's platform and screen geometry.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b>height</b> () const</td></tr>
</table>
<p>See also <a href="qwidget.html#geometry-prop">geometry</a>, <a href="qwidget.html#width-prop">width</a>, and <a href="qwidget.html#size-prop">size</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/inputMethodHints"></a>
<a name="//apple_ref/cpp/instm/QWidget/setInputMethodHints"></a>
<h3 class="fn"><a name="inputMethodHints-prop"></a>inputMethodHints : <a href="qt.html#InputMethodHint-enum">Qt::InputMethodHints</a></h3>
<p>This property holds what input method specific hints the widget has.</p>
<p>This is only relevant for input widgets. It is used by the input method to retrieve hints as to how the input method should operate. For example, if the <a href="qt.html#InputMethodHint-enum">Qt::ImhFormattedNumbersOnly</a> flag is set, the input method may change its visual components to reflect that only numbers can be entered.</p>
<p><b>Note:</b> The flags are only hints, so the particular input method implementation is free to ignore them. If you want to be sure that a certain type of characters are entered, you should also set a <a href="qvalidator.html">QValidator</a> on the widget.</p>
<p>The default value is <a href="qt.html#InputMethodHint-enum">Qt::ImhNone</a>.</p>
<p>This property was introduced in Qt 4.6.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">Qt::InputMethodHints </td><td class="memItemRight" valign="bottom"><b>inputMethodHints</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setInputMethodHints</b> ( Qt::InputMethodHints <i>hints</i> )</td></tr>
</table>
<p>See also <a href="qwidget.html#inputMethodQuery">inputMethodQuery</a>() and <a href="qinputcontext.html">QInputContext</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/isActiveWindow"></a>
<h3 class="fn"><a name="isActiveWindow-prop"></a>isActiveWindow : const bool</h3>
<p>This property holds whether this widget's window is the active window.</p>
<p>The active window is the window that contains the widget that has keyboard focus (The window may still have focus if it has no widgets or none of its widgets accepts keyboard focus).</p>
<p>When popup windows are visible, this property is true for both the active window <i>and</i> for the popup.</p>
<p>By default, this property is false.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b>isActiveWindow</b> () const</td></tr>
</table>
<p>See also <a href="qwidget.html#activateWindow">activateWindow</a>() and <a href="qapplication.html#activeWindow">QApplication::activeWindow</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/layoutDirection"></a>
<a name="//apple_ref/cpp/instm/QWidget/setLayoutDirection"></a>
<a name="//apple_ref/cpp/instm/QWidget/unsetLayoutDirection"></a>
<h3 class="fn"><a name="layoutDirection-prop"></a>layoutDirection : <a href="qt.html#LayoutDirection-enum">Qt::LayoutDirection</a></h3>
<p>This property holds the layout direction for this widget.</p>
<p>By default, this property is set to <a href="qt.html#LayoutDirection-enum">Qt::LeftToRight</a>.</p>
<p>When the layout direction is set on a widget, it will propagate to the widget's children, but not to a child that is a window and not to a child for which setLayoutDirection() has been explicitly called. Also, child widgets added <i>after</i> setLayoutDirection() has been called for the parent do not inherit the parent's layout direction.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">Qt::LayoutDirection </td><td class="memItemRight" valign="bottom"><b>layoutDirection</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setLayoutDirection</b> ( Qt::LayoutDirection <i>direction</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>unsetLayoutDirection</b> ()</td></tr>
</table>
<p>See also <a href="qapplication.html#layoutDirection-prop">QApplication::layoutDirection</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/locale"></a>
<a name="//apple_ref/cpp/instm/QWidget/setLocale"></a>
<a name="//apple_ref/cpp/instm/QWidget/unsetLocale"></a>
<h3 class="fn"><a name="locale-prop"></a>locale : <a href="qlocale.html">QLocale</a></h3>
<p>This property holds the widget's locale.</p>
<p>As long as no special locale has been set, this is either the parent's locale or (if this widget is a top level widget), the default locale.</p>
<p>If the widget displays dates or numbers, these should be formatted using the widget's locale.</p>
<p>This property was introduced in Qt 4.3.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QLocale </td><td class="memItemRight" valign="bottom"><b>locale</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setLocale</b> ( const QLocale &amp; <i>locale</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>unsetLocale</b> ()</td></tr>
</table>
<p>See also <a href="qlocale.html">QLocale</a> and <a href="qlocale.html#setDefault">QLocale::setDefault</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/isMaximized"></a>
<h3 class="fn"><a name="maximized-prop"></a>maximized : const bool</h3>
<p>This property holds whether this widget is maximized.</p>
<p>This property is only relevant for windows.</p>
<p><b>Note:</b> Due to limitations on some window systems, this does not always report the expected results (e.g&#x2e;, if the user on X11 maximizes the window via the window manager, Qt has no way of distinguishing this from any other resize). This is expected to improve as window manager protocols evolve.</p>
<p>By default, this property is false.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b>isMaximized</b> () const</td></tr>
</table>
<p>See also <a href="qwidget.html#windowState">windowState</a>(), <a href="qwidget.html#showMaximized">showMaximized</a>(), <a href="qwidget.html#visible-prop">visible</a>, <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), <a href="qwidget.html#showNormal">showNormal</a>(), and <a href="qwidget.html#minimized-prop">minimized</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/maximumHeight"></a>
<a name="//apple_ref/cpp/instm/QWidget/setMaximumHeight"></a>
<h3 class="fn"><a name="maximumHeight-prop"></a>maximumHeight : int</h3>
<p>This property holds the widget's maximum height in pixels.</p>
<p>This property corresponds to the height held by the <a href="qwidget.html#maximumSize-prop">maximumSize</a> property.</p>
<p>By default, this property contains a value of 16777215.</p>
<p><b>Note:</b> The definition of the <tt>QWIDGETSIZE_MAX</tt> macro limits the maximum size of widgets.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b>maximumHeight</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setMaximumHeight</b> ( int <i>maxh</i> )</td></tr>
</table>
<p>See also <a href="qwidget.html#maximumSize-prop">maximumSize</a> and <a href="qwidget.html#maximumWidth-prop">maximumWidth</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/maximumSize"></a>
<a name="//apple_ref/cpp/instm/QWidget/setMaximumSize"></a>
<h3 class="fn"><a name="maximumSize-prop"></a>maximumSize : <a href="qsize.html">QSize</a></h3>
<p>This property holds the widget's maximum size in pixels.</p>
<p>The widget cannot be resized to a larger size than the maximum widget size.</p>
<p>By default, this property contains a size in which both width and height have values of 16777215.</p>
<p><b>Note:</b> The definition of the <tt>QWIDGETSIZE_MAX</tt> macro limits the maximum size of widgets.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QSize </td><td class="memItemRight" valign="bottom"><b>maximumSize</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setMaximumSize</b> ( const QSize &amp; )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setMaximumSize</b> ( int <i>maxw</i>, int <i>maxh</i> )</td></tr>
</table>
<p>See also <a href="qwidget.html#maximumWidth-prop">maximumWidth</a>, <a href="qwidget.html#maximumHeight-prop">maximumHeight</a>, <a href="qwidget.html#minimumSize-prop">minimumSize</a>, and <a href="qwidget.html#sizeIncrement-prop">sizeIncrement</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/maximumWidth"></a>
<a name="//apple_ref/cpp/instm/QWidget/setMaximumWidth"></a>
<h3 class="fn"><a name="maximumWidth-prop"></a>maximumWidth : int</h3>
<p>This property holds the widget's maximum width in pixels.</p>
<p>This property corresponds to the width held by the <a href="qwidget.html#maximumSize-prop">maximumSize</a> property.</p>
<p>By default, this property contains a value of 16777215.</p>
<p><b>Note:</b> The definition of the <tt>QWIDGETSIZE_MAX</tt> macro limits the maximum size of widgets.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b>maximumWidth</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setMaximumWidth</b> ( int <i>maxw</i> )</td></tr>
</table>
<p>See also <a href="qwidget.html#maximumSize-prop">maximumSize</a> and <a href="qwidget.html#maximumHeight-prop">maximumHeight</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/isMinimized"></a>
<h3 class="fn"><a name="minimized-prop"></a>minimized : const bool</h3>
<p>This property holds whether this widget is minimized (iconified).</p>
<p>This property is only relevant for windows.</p>
<p>By default, this property is false.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b>isMinimized</b> () const</td></tr>
</table>
<p>See also <a href="qwidget.html#showMinimized">showMinimized</a>(), <a href="qwidget.html#visible-prop">visible</a>, <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), <a href="qwidget.html#showNormal">showNormal</a>(), and <a href="qwidget.html#maximized-prop">maximized</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/minimumHeight"></a>
<a name="//apple_ref/cpp/instm/QWidget/setMinimumHeight"></a>
<h3 class="fn"><a name="minimumHeight-prop"></a>minimumHeight : int</h3>
<p>This property holds the widget's minimum height in pixels.</p>
<p>This property corresponds to the height held by the <a href="qwidget.html#minimumSize-prop">minimumSize</a> property.</p>
<p>By default, this property has a value of 0.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b>minimumHeight</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setMinimumHeight</b> ( int <i>minh</i> )</td></tr>
</table>
<p>See also <a href="qwidget.html#minimumSize-prop">minimumSize</a> and <a href="qwidget.html#minimumWidth-prop">minimumWidth</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/minimumSize"></a>
<a name="//apple_ref/cpp/instm/QWidget/setMinimumSize"></a>
<h3 class="fn"><a name="minimumSize-prop"></a>minimumSize : <a href="qsize.html">QSize</a></h3>
<p>This property holds the widget's minimum size.</p>
<p>The widget cannot be resized to a smaller size than the minimum widget size. The widget's size is forced to the minimum size if the current size is smaller.</p>
<p>The minimum size set by this function will override the minimum size defined by <a href="qlayout.html">QLayout</a>. In order to unset the minimum size, use a value of <tt>QSize(0, 0)</tt>.</p>
<p>By default, this property contains a size with zero width and height.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QSize </td><td class="memItemRight" valign="bottom"><b>minimumSize</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setMinimumSize</b> ( const QSize &amp; )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setMinimumSize</b> ( int <i>minw</i>, int <i>minh</i> )</td></tr>
</table>
<p>See also <a href="qwidget.html#minimumWidth-prop">minimumWidth</a>, <a href="qwidget.html#minimumHeight-prop">minimumHeight</a>, <a href="qwidget.html#maximumSize-prop">maximumSize</a>, and <a href="qwidget.html#sizeIncrement-prop">sizeIncrement</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/minimumSizeHint"></a>
<h3 class="fn"><a name="minimumSizeHint-prop"></a>minimumSizeHint : const <a href="qsize.html">QSize</a></h3>
<p>This property holds the recommended minimum size for the widget.</p>
<p>If the value of this property is an invalid size, no minimum size is recommended.</p>
<p>The default implementation of minimumSizeHint() returns an invalid size if there is no layout for this widget, and returns the layout's minimum size otherwise. Most built-in widgets reimplement minimumSizeHint().</p>
<p><a href="qlayout.html">QLayout</a> will never resize a widget to a size smaller than the minimum size hint unless <a href="qwidget.html#minimumSize-prop">minimumSize</a>() is set or the size policy is set to QSizePolicy::Ignore. If <a href="qwidget.html#minimumSize-prop">minimumSize</a>() is set, the minimum size hint will be ignored.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">virtual QSize </td><td class="memItemRight" valign="bottom"><b>minimumSizeHint</b> () const</td></tr>
</table>
<p>See also <a href="qsize.html#isValid">QSize::isValid</a>(), <a href="qwidget.html#size-prop">resize</a>(), <a href="qwidget.html#minimumSize-prop">setMinimumSize</a>(), and <a href="qwidget.html#sizePolicy-prop">sizePolicy</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/minimumWidth"></a>
<a name="//apple_ref/cpp/instm/QWidget/setMinimumWidth"></a>
<h3 class="fn"><a name="minimumWidth-prop"></a>minimumWidth : int</h3>
<p>This property holds the widget's minimum width in pixels.</p>
<p>This property corresponds to the width held by the <a href="qwidget.html#minimumSize-prop">minimumSize</a> property.</p>
<p>By default, this property has a value of 0.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b>minimumWidth</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setMinimumWidth</b> ( int <i>minw</i> )</td></tr>
</table>
<p>See also <a href="qwidget.html#minimumSize-prop">minimumSize</a> and <a href="qwidget.html#minimumHeight-prop">minimumHeight</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/isModal"></a>
<h3 class="fn"><a name="modal-prop"></a>modal : const bool</h3>
<p>This property holds whether the widget is a modal widget.</p>
<p>This property only makes sense for windows. A modal widget prevents widgets in all other windows from getting any input.</p>
<p>By default, this property is false.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b>isModal</b> () const</td></tr>
</table>
<p>See also <a href="qwidget.html#isWindow">isWindow</a>(), <a href="qwidget.html#windowModality-prop">windowModality</a>, and <a href="qdialog.html">QDialog</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/hasMouseTracking"></a>
<a name="//apple_ref/cpp/instm/QWidget/setMouseTracking"></a>
<h3 class="fn"><a name="mouseTracking-prop"></a>mouseTracking : bool</h3>
<p>This property holds whether mouse tracking is enabled for the widget.</p>
<p>If mouse tracking is disabled (the default), the widget only receives mouse move events when at least one mouse button is pressed while the mouse is being moved.</p>
<p>If mouse tracking is enabled, the widget receives mouse move events even if no buttons are pressed.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b>hasMouseTracking</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setMouseTracking</b> ( bool <i>enable</i> )</td></tr>
</table>
<p>See also <a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/normalGeometry"></a>
<h3 class="fn"><a name="normalGeometry-prop"></a>normalGeometry : const <a href="qrect.html">QRect</a></h3>
<p>This property holds the geometry of the widget as it will appear when shown as a normal (not maximized or full screen) top-level widget.</p>
<p>For child widgets this property always holds an empty rectangle.</p>
<p>By default, this property contains an empty rectangle.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QRect </td><td class="memItemRight" valign="bottom"><b>normalGeometry</b> () const</td></tr>
</table>
<p>See also <a href="qwidget.html#windowState">QWidget::windowState</a>() and <a href="qwidget.html#geometry-prop">QWidget::geometry</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/palette"></a>
<a name="//apple_ref/cpp/instm/QWidget/setPalette"></a>
<h3 class="fn"><a name="palette-prop"></a>palette : <a href="qpalette.html">QPalette</a></h3>
<p>This property holds the widget's palette.</p>
<p>This property describes the widget's palette. The palette is used by the widget's style when rendering standard components, and is available as a means to ensure that custom widgets can maintain consistency with the native platform's look and feel. It's common that different platforms, or different styles, have different palettes.</p>
<p>When you assign a new palette to a widget, the color roles from this palette are combined with the widget's default palette to form the widget's final palette. The palette entry for the widget's background role is used to fill the widget's background (see <a href="qwidget.html#autoFillBackground-prop">QWidget::autoFillBackground</a>), and the foreground role initializes <a href="qpainter.html">QPainter</a>'s pen.</p>
<p>The default depends on the system environment. <a href="qapplication.html">QApplication</a> maintains a system/theme palette which serves as a default for all widgets. There may also be special palette defaults for certain types of widgets (e.g&#x2e;, on Windows XP and Vista, all classes that derive from <a href="qmenubar.html">QMenuBar</a> have a special default palette). You can also define default palettes for widgets yourself by passing a custom palette and the name of a widget to <a href="qapplication.html#setPalette">QApplication::setPalette</a>(). Finally, the style always has the option of polishing the palette as it's assigned (see <a href="qstyle.html#polish">QStyle::polish</a>()).</p>
<p><a href="qwidget.html">QWidget</a> propagates explicit palette roles from parent to child. If you assign a brush or color to a specific role on a palette and assign that palette to a widget, that role will propagate to all the widget's children, overriding any system defaults for that role. Note that palettes by default don't propagate to windows (see <a href="qwidget.html#isWindow">isWindow</a>()) unless the <a href="qt.html#WidgetAttribute-enum">Qt::WA_WindowPropagation</a> attribute is enabled.</p>
<p><a href="qwidget.html">QWidget</a>'s palette propagation is similar to its font propagation.</p>
<p>The current style, which is used to render the content of all standard Qt widgets, is free to choose colors and brushes from the widget palette, or in some cases, to ignore the palette (partially, or completely). In particular, certain styles like GTK style, Mac style, Windows XP, and Vista style, depend on third party APIs to render the content of widgets, and these styles typically do not follow the palette. Because of this, assigning roles to a widget's palette is not guaranteed to change the appearance of the widget. Instead, you may choose to apply a <a href="qwidget.html#styleSheet-prop">styleSheet</a>. You can refer to our Knowledge Base article <a href="http://qt.nokia.com/developer/knowledgebase/22">here</a> for more information.</p>
<p><b>Warning:</b> Do not use this function in conjunction with <a href="stylesheet.html">Qt Style Sheets</a>. When using style sheets, the palette of a widget can be customized using the &quot;color&quot;, &quot;background-color&quot;, &quot;selection-color&quot;, &quot;selection-background-color&quot; and &quot;alternate-background-color&quot;.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">const QPalette &amp; </td><td class="memItemRight" valign="bottom"><b>palette</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setPalette</b> ( const QPalette &amp; )</td></tr>
</table>
<p>See also <a href="qapplication.html#palette">QApplication::palette</a>() and <a href="qwidget.html#font-prop">QWidget::font</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/pos"></a>
<a name="//apple_ref/cpp/instm/QWidget/move"></a>
<h3 class="fn"><a name="pos-prop"></a>pos : <a href="qpoint.html">QPoint</a></h3>
<p>This property holds the position of the widget within its parent widget.</p>
<p>If the widget is a window, the position is that of the widget on the desktop, including its frame.</p>
<p>When changing the position, the widget, if visible, receives a move event (<a href="qwidget.html#moveEvent">moveEvent</a>()) immediately. If the widget is not currently visible, it is guaranteed to receive an event before it is shown.</p>
<p>By default, this property contains a position that refers to the origin.</p>
<p><b>Warning:</b> Calling move() or <a href="qwidget.html#geometry-prop">setGeometry</a>() inside <a href="qwidget.html#moveEvent">moveEvent</a>() can lead to infinite recursion.</p>
<p>See the <a href="application-windows.html#window-geometry">Window Geometry</a> documentation for an overview of geometry issues with windows.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QPoint </td><td class="memItemRight" valign="bottom"><b>pos</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>move</b> ( int <i>x</i>, int <i>y</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>move</b> ( const QPoint &amp; )</td></tr>
</table>
<p>See also <a href="qwidget.html#frameGeometry-prop">frameGeometry</a>, <a href="qwidget.html#size-prop">size</a>, <a href="qwidget.html#x-prop">x</a>(), and <a href="qwidget.html#y-prop">y</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/rect"></a>
<h3 class="fn"><a name="rect-prop"></a>rect : const <a href="qrect.html">QRect</a></h3>
<p>This property holds the internal geometry of the widget excluding any window frame.</p>
<p>The rect property equals <a href="qrect.html">QRect</a>(0, 0, <a href="qwidget.html#width-prop">width</a>(), <a href="qwidget.html#height-prop">height</a>()).</p>
<p>See the <a href="application-windows.html#window-geometry">Window Geometry</a> documentation for an overview of geometry issues with windows.</p>
<p>By default, this property contains a value that depends on the user's platform and screen geometry.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QRect </td><td class="memItemRight" valign="bottom"><b>rect</b> () const</td></tr>
</table>
<p>See also <a href="qwidget.html#size-prop">size</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/size"></a>
<a name="//apple_ref/cpp/instm/QWidget/resize"></a>
<h3 class="fn"><a name="size-prop"></a>size : <a href="qsize.html">QSize</a></h3>
<p>This property holds the size of the widget excluding any window frame.</p>
<p>If the widget is visible when it is being resized, it receives a resize event (<a href="qwidget.html#resizeEvent">resizeEvent</a>()) immediately. If the widget is not currently visible, it is guaranteed to receive an event before it is shown.</p>
<p>The size is adjusted if it lies outside the range defined by <a href="qwidget.html#minimumSize-prop">minimumSize</a>() and <a href="qwidget.html#maximumSize-prop">maximumSize</a>().</p>
<p>By default, this property contains a value that depends on the user's platform and screen geometry.</p>
<p><b>Warning:</b> Calling resize() or <a href="qwidget.html#geometry-prop">setGeometry</a>() inside <a href="qwidget.html#resizeEvent">resizeEvent</a>() can lead to infinite recursion.</p>
<p><b>Note:</b> Setting the size to <tt>QSize(0, 0)</tt> will cause the widget to not appear on screen. This also applies to windows.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QSize </td><td class="memItemRight" valign="bottom"><b>size</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>resize</b> ( int <i>w</i>, int <i>h</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>resize</b> ( const QSize &amp; )</td></tr>
</table>
<p>See also <a href="qwidget.html#pos-prop">pos</a>, <a href="qwidget.html#geometry-prop">geometry</a>, <a href="qwidget.html#minimumSize-prop">minimumSize</a>, <a href="qwidget.html#maximumSize-prop">maximumSize</a>, <a href="qwidget.html#resizeEvent">resizeEvent</a>(), and <a href="qwidget.html#adjustSize">adjustSize</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/sizeHint"></a>
<h3 class="fn"><a name="sizeHint-prop"></a>sizeHint : const <a href="qsize.html">QSize</a></h3>
<p>This property holds the recommended size for the widget.</p>
<p>If the value of this property is an invalid size, no size is recommended.</p>
<p>The default implementation of sizeHint() returns an invalid size if there is no layout for this widget, and returns the layout's preferred size otherwise.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">virtual QSize </td><td class="memItemRight" valign="bottom"><b>sizeHint</b> () const</td></tr>
</table>
<p>See also <a href="qsize.html#isValid">QSize::isValid</a>(), <a href="qwidget.html#minimumSizeHint-prop">minimumSizeHint</a>(), <a href="qwidget.html#sizePolicy-prop">sizePolicy</a>(), <a href="qwidget.html#minimumSize-prop">setMinimumSize</a>(), and <a href="qwidget.html#updateGeometry">updateGeometry</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/sizeIncrement"></a>
<a name="//apple_ref/cpp/instm/QWidget/setSizeIncrement"></a>
<h3 class="fn"><a name="sizeIncrement-prop"></a>sizeIncrement : <a href="qsize.html">QSize</a></h3>
<p>This property holds the size increment of the widget.</p>
<p>When the user resizes the window, the size will move in steps of sizeIncrement().<a href="qwidget.html#width-prop">width</a>() pixels horizontally and sizeIncrement.<a href="qwidget.html#height-prop">height</a>() pixels vertically, with <a href="qwidget.html#baseSize-prop">baseSize</a>() as the basis. Preferred widget sizes are for non-negative integers <i>i</i> and <i>j</i>:</p>
<pre> width = baseSize().width() + i * sizeIncrement().width();
 height = baseSize().height() + j * sizeIncrement().height();</pre>
<p>Note that while you can set the size increment for all widgets, it only affects windows.</p>
<p>By default, this property contains a size with zero width and height.</p>
<p><b>Warning:</b> The size increment has no effect under Windows, and may be disregarded by the window manager on X11.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QSize </td><td class="memItemRight" valign="bottom"><b>sizeIncrement</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setSizeIncrement</b> ( const QSize &amp; )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setSizeIncrement</b> ( int <i>w</i>, int <i>h</i> )</td></tr>
</table>
<p>See also <a href="qwidget.html#size-prop">size</a>, <a href="qwidget.html#minimumSize-prop">minimumSize</a>, and <a href="qwidget.html#maximumSize-prop">maximumSize</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/sizePolicy"></a>
<a name="//apple_ref/cpp/instm/QWidget/setSizePolicy"></a>
<h3 class="fn"><a name="sizePolicy-prop"></a>sizePolicy : <a href="qsizepolicy.html">QSizePolicy</a></h3>
<p>This property holds the default layout behavior of the widget.</p>
<p>If there is a <a href="qlayout.html">QLayout</a> that manages this widget's children, the size policy specified by that layout is used. If there is no such <a href="qlayout.html">QLayout</a>, the result of this function is used.</p>
<p>The default policy is Preferred/Preferred, which means that the widget can be freely resized, but prefers to be the size <a href="qwidget.html#sizeHint-prop">sizeHint</a>() returns. Button-like widgets set the size policy to specify that they may stretch horizontally, but are fixed vertically. The same applies to lineedit controls (such as <a href="qlineedit.html">QLineEdit</a>, <a href="qspinbox.html">QSpinBox</a> or an editable <a href="qcombobox.html">QComboBox</a>) and other horizontally orientated widgets (such as <a href="qprogressbar.html">QProgressBar</a>). <a href="qtoolbutton.html">QToolButton</a>'s are normally square, so they allow growth in both directions. Widgets that support different directions (such as <a href="qslider.html">QSlider</a>, <a href="qscrollbar.html">QScrollBar</a> or <a href="porting4.html#qheader">QHeader</a>) specify stretching in the respective direction only. Widgets that can provide scroll bars (usually subclasses of <a href="qscrollarea.html">QScrollArea</a>) tend to specify that they can use additional space, and that they can make do with less than <a href="qwidget.html#sizeHint-prop">sizeHint</a>().</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QSizePolicy </td><td class="memItemRight" valign="bottom"><b>sizePolicy</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setSizePolicy</b> ( QSizePolicy )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setSizePolicy</b> ( QSizePolicy::Policy <i>horizontal</i>, QSizePolicy::Policy <i>vertical</i> )</td></tr>
</table>
<p>See also <a href="qwidget.html#sizeHint-prop">sizeHint</a>(), <a href="qlayout.html">QLayout</a>, <a href="qsizepolicy.html">QSizePolicy</a>, and <a href="qwidget.html#updateGeometry">updateGeometry</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/statusTip"></a>
<a name="//apple_ref/cpp/instm/QWidget/setStatusTip"></a>
<h3 class="fn"><a name="statusTip-prop"></a>statusTip : <a href="qstring.html">QString</a></h3>
<p>This property holds the widget's status tip.</p>
<p>By default, this property contains an empty string.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b>statusTip</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setStatusTip</b> ( const QString &amp; )</td></tr>
</table>
<p>See also <a href="qwidget.html#toolTip-prop">toolTip</a> and <a href="qwidget.html#whatsThis-prop">whatsThis</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/styleSheet"></a>
<a name="//apple_ref/cpp/instm/QWidget/setStyleSheet"></a>
<h3 class="fn"><a name="styleSheet-prop"></a>styleSheet : <a href="qstring.html">QString</a></h3>
<p>This property holds the widget's style sheet.</p>
<p>The style sheet contains a textual description of customizations to the widget's style, as described in the <a href="stylesheet.html">Qt Style Sheets</a> document.</p>
<p>Since Qt 4.5, Qt style sheets fully supports Mac OS X.</p>
<p><b>Warning:</b> Qt style sheets are currently not supported for custom <a href="qstyle.html">QStyle</a> subclasses. We plan to address this in some future release.</p>
<p>This property was introduced in Qt 4.2.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b>styleSheet</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setStyleSheet</b> ( const QString &amp; <i>styleSheet</i> )</td></tr>
</table>
<p>See also <a href="qwidget.html#setStyle">setStyle</a>(), <a href="qapplication.html#styleSheet-prop">QApplication::styleSheet</a>, and <a href="stylesheet.html">Qt Style Sheets</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/toolTip"></a>
<a name="//apple_ref/cpp/instm/QWidget/setToolTip"></a>
<h3 class="fn"><a name="toolTip-prop"></a>toolTip : <a href="qstring.html">QString</a></h3>
<p>This property holds the widget's tooltip.</p>
<p>Note that by default tooltips are only shown for widgets that are children of the active window. You can change this behavior by setting the attribute <a href="qt.html#WidgetAttribute-enum">Qt::WA_AlwaysShowToolTips</a> on the <i>window</i>, not on the widget with the tooltip.</p>
<p>If you want to control a tooltip's behavior, you can intercept the <a href="qwidget.html#event">event</a>() function and catch the <a href="qevent.html#Type-enum">QEvent::ToolTip</a> event (e.g&#x2e;, if you want to customize the area for which the tooltip should be shown).</p>
<p>By default, this property contains an empty string.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b>toolTip</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setToolTip</b> ( const QString &amp; )</td></tr>
</table>
<p>See also <a href="qtooltip.html">QToolTip</a>, <a href="qwidget.html#statusTip-prop">statusTip</a>, and <a href="qwidget.html#whatsThis-prop">whatsThis</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/updatesEnabled"></a>
<a name="//apple_ref/cpp/instm/QWidget/setUpdatesEnabled"></a>
<h3 class="fn"><a name="updatesEnabled-prop"></a>updatesEnabled : bool</h3>
<p>This property holds whether updates are enabled.</p>
<p>An updates enabled widget receives paint events and has a system background; a disabled widget does not. This also implies that calling <a href="qwidget.html#update">update</a>() and <a href="qwidget.html#repaint">repaint</a>() has no effect if updates are disabled.</p>
<p>By default, this property is true.</p>
<p>setUpdatesEnabled() is normally used to disable updates for a short period of time, for instance to avoid screen flicker during large changes. In Qt, widgets normally do not generate screen flicker, but on X11 the server might erase regions on the screen when widgets get hidden before they can be replaced by other widgets. Disabling updates solves this.</p>
<p>Example:</p>
<pre> setUpdatesEnabled(false);
 bigVisualChanges();
 setUpdatesEnabled(true);</pre>
<p>Disabling a widget implicitly disables all its children. Enabling a widget enables all child widgets <i>except</i> top-level widgets or those that have been explicitly disabled. Re-enabling updates implicitly calls <a href="qwidget.html#update">update</a>() on the widget.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b>updatesEnabled</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setUpdatesEnabled</b> ( bool <i>enable</i> )</td></tr>
</table>
<p>See also <a href="qwidget.html#paintEvent">paintEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/isVisible"></a>
<a name="//apple_ref/cpp/instm/QWidget/setVisible"></a>
<h3 class="fn"><a name="visible-prop"></a>visible : bool</h3>
<p>This property holds whether the widget is visible.</p>
<p>Calling setVisible(true) or <a href="qwidget.html#show">show</a>() sets the widget to visible status if all its parent widgets up to the window are visible. If an ancestor is not visible, the widget won't become visible until all its ancestors are shown. If its size or position has changed, Qt guarantees that a widget gets move and resize events just before it is shown. If the widget has not been resized yet, Qt will adjust the widget's size to a useful default using <a href="qwidget.html#adjustSize">adjustSize</a>().</p>
<p>Calling setVisible(false) or <a href="qwidget.html#hide">hide</a>() hides a widget explicitly. An explicitly hidden widget will never become visible, even if all its ancestors become visible, unless you show it.</p>
<p>A widget receives show and hide events when its visibility status changes. Between a hide and a show event, there is no need to waste CPU cycles preparing or displaying information to the user. A video application, for example, might simply stop generating new frames.</p>
<p>A widget that happens to be obscured by other windows on the screen is considered to be visible. The same applies to iconified windows and windows that exist on another virtual desktop (on platforms that support this concept). A widget receives spontaneous show and hide events when its mapping status is changed by the window system, e.g&#x2e; a spontaneous hide event when the user minimizes the window, and a spontaneous show event when the window is restored again.</p>
<p>You almost never have to reimplement the setVisible() function. If you need to change some settings before a widget is shown, use <a href="qwidget.html#showEvent">showEvent</a>() instead. If you need to do some delayed initialization use the Polish event delivered to the <a href="qwidget.html#event">event</a>() function.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b>isVisible</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b>setVisible</b> ( bool <i>visible</i> )</td></tr>
</table>
<p>See also <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), <a href="qwidget.html#isHidden">isHidden</a>(), <a href="qwidget.html#isVisibleTo">isVisibleTo</a>(), <a href="qwidget.html#minimized-prop">isMinimized</a>(), <a href="qwidget.html#showEvent">showEvent</a>(), and <a href="qwidget.html#hideEvent">hideEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/whatsThis"></a>
<a name="//apple_ref/cpp/instm/QWidget/setWhatsThis"></a>
<h3 class="fn"><a name="whatsThis-prop"></a>whatsThis : <a href="qstring.html">QString</a></h3>
<p>This property holds the widget's What's This help text.</p>
<p>By default, this property contains an empty string.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b>whatsThis</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setWhatsThis</b> ( const QString &amp; )</td></tr>
</table>
<p>See also <a href="qwhatsthis.html">QWhatsThis</a>, <a href="qwidget.html#toolTip-prop">QWidget::toolTip</a>, and <a href="qwidget.html#statusTip-prop">QWidget::statusTip</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/width"></a>
<h3 class="fn"><a name="width-prop"></a>width : const int</h3>
<p>This property holds the width of the widget excluding any window frame.</p>
<p>See the <a href="application-windows.html#window-geometry">Window Geometry</a> documentation for an overview of geometry issues with windows.</p>
<p><b>Note:</b> Do not use this function to find the width of a screen on a <a href="qdesktopwidget.html">multiple screen desktop</a>. Read <a href="qdesktopwidget.html#screen-geometry">this note</a> for details.</p>
<p>By default, this property contains a value that depends on the user's platform and screen geometry.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b>width</b> () const</td></tr>
</table>
<p>See also <a href="qwidget.html#geometry-prop">geometry</a>, <a href="qwidget.html#height-prop">height</a>, and <a href="qwidget.html#size-prop">size</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/windowFilePath"></a>
<a name="//apple_ref/cpp/instm/QWidget/setWindowFilePath"></a>
<h3 class="fn"><a name="windowFilePath-prop"></a>windowFilePath : <a href="qstring.html">QString</a></h3>
<p>This property holds the file path associated with a widget.</p>
<p>This property only makes sense for windows. It associates a file path with a window. If you set the file path, but have not set the window title, Qt sets the window title to contain a string created using the following components.</p>
<p>On Mac OS X:</p>
<ul>
<li>The file name of the specified path, obtained using <a href="qfileinfo.html#fileName">QFileInfo::fileName</a>().</li>
</ul>
<p>On Windows and X11:</p>
<ul>
<li>The file name of the specified path, obtained using <a href="qfileinfo.html#fileName">QFileInfo::fileName</a>().</li>
<li>An optional <tt>*</tt> character, if the <a href="qwidget.html#windowModified-prop">windowModified</a> property is set.</li>
<li>The <tt>0x2014</tt> unicode character, padded either side by spaces.</li>
<li>The application name, obtained from the application's <a href="qcoreapplication.html#applicationName-prop">applicationName</a> property.</li>
</ul>
<p>If the window title is set at any point, then the window title takes precedence and will be shown instead of the file path string.</p>
<p>Additionally, on Mac OS X, this has an added benefit that it sets the <a href="http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/XHIGWindows/chapter_17_section_3.html">proxy icon</a> for the window, assuming that the file path exists.</p>
<p>If no file path is set, this property contains an empty string.</p>
<p>By default, this property contains an empty string.</p>
<p>This property was introduced in Qt 4.4.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b>windowFilePath</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setWindowFilePath</b> ( const QString &amp; <i>filePath</i> )</td></tr>
</table>
<p>See also <a href="qwidget.html#windowTitle-prop">windowTitle</a> and <a href="qwidget.html#windowIcon-prop">windowIcon</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/windowFlags"></a>
<a name="//apple_ref/cpp/instm/QWidget/setWindowFlags"></a>
<h3 class="fn"><a name="windowFlags-prop"></a>windowFlags : <a href="qt.html#WindowType-enum">Qt::WindowFlags</a></h3>
<p>Window flags are a combination of a type (e.g&#x2e; <a href="qt.html#WindowType-enum">Qt::Dialog</a>) and zero or more hints to the window system (e.g&#x2e; <a href="qt.html#WindowType-enum">Qt::FramelessWindowHint</a>).</p>
<p>If the widget had type <a href="qt.html#WindowType-enum">Qt::Widget</a> or <a href="qt.html#WindowType-enum">Qt::SubWindow</a> and becomes a window (<a href="qt.html#WindowType-enum">Qt::Window</a>, <a href="qt.html#WindowType-enum">Qt::Dialog</a>, etc.), it is put at position (0, 0) on the desktop. If the widget is a window and becomes a <a href="qt.html#WindowType-enum">Qt::Widget</a> or <a href="qt.html#WindowType-enum">Qt::SubWindow</a>, it is put at position (0, 0) relative to its parent widget.</p>
<p><b>Note:</b> This function calls <a href="qwidget.html#setParent">setParent</a>() when changing the flags for a window, causing the widget to be hidden. You must call <a href="qwidget.html#show">show</a>() to make the widget visible again..</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">Qt::WindowFlags </td><td class="memItemRight" valign="bottom"><b>windowFlags</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setWindowFlags</b> ( Qt::WindowFlags <i>type</i> )</td></tr>
</table>
<p>See also <a href="qwidget.html#windowType">windowType</a>() and <a href="widgets-windowflags.html">Window Flags Example</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/windowIcon"></a>
<a name="//apple_ref/cpp/instm/QWidget/setWindowIcon"></a>
<h3 class="fn"><a name="windowIcon-prop"></a>windowIcon : <a href="qicon.html">QIcon</a></h3>
<p>This property holds the widget's icon.</p>
<p>This property only makes sense for windows. If no icon has been set, windowIcon() returns the application icon (<a href="qapplication.html#windowIcon-prop">QApplication::windowIcon</a>()).</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QIcon </td><td class="memItemRight" valign="bottom"><b>windowIcon</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setWindowIcon</b> ( const QIcon &amp; <i>icon</i> )</td></tr>
</table>
<p>See also <a href="qwidget.html#windowIconText-prop">windowIconText</a> and <a href="qwidget.html#windowTitle-prop">windowTitle</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/windowIconText"></a>
<a name="//apple_ref/cpp/instm/QWidget/setWindowIconText"></a>
<h3 class="fn"><a name="windowIconText-prop"></a>windowIconText : <a href="qstring.html">QString</a></h3>
<p>This property holds the widget's icon text.</p>
<p>This property only makes sense for windows. If no icon text has been set, this functions returns an empty string.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b>windowIconText</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setWindowIconText</b> ( const QString &amp; )</td></tr>
</table>
<p>See also <a href="qwidget.html#windowIcon-prop">windowIcon</a> and <a href="qwidget.html#windowTitle-prop">windowTitle</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/windowModality"></a>
<a name="//apple_ref/cpp/instm/QWidget/setWindowModality"></a>
<h3 class="fn"><a name="windowModality-prop"></a>windowModality : <a href="qt.html#WindowModality-enum">Qt::WindowModality</a></h3>
<p>This property holds which windows are blocked by the modal widget.</p>
<p>This property only makes sense for windows. A modal widget prevents widgets in other windows from getting input. The value of this property controls which windows are blocked when the widget is visible. Changing this property while the window is visible has no effect; you must <a href="qwidget.html#hide">hide</a>() the widget first, then <a href="qwidget.html#show">show</a>() it again.</p>
<p>By default, this property is <a href="qt.html#WindowModality-enum">Qt::NonModal</a>.</p>
<p>This property was introduced in Qt 4.1.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">Qt::WindowModality </td><td class="memItemRight" valign="bottom"><b>windowModality</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setWindowModality</b> ( Qt::WindowModality <i>windowModality</i> )</td></tr>
</table>
<p>See also <a href="qwidget.html#isWindow">isWindow</a>(), <a href="qwidget.html#modal-prop">QWidget::modal</a>, and <a href="qdialog.html">QDialog</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/isWindowModified"></a>
<a name="//apple_ref/cpp/instm/QWidget/setWindowModified"></a>
<h3 class="fn"><a name="windowModified-prop"></a>windowModified : bool</h3>
<p>This property holds whether the document shown in the window has unsaved changes.</p>
<p>A modified window is a window whose content has changed but has not been saved to disk. This flag will have different effects varied by the platform. On Mac OS X the close button will have a modified look; on other platforms, the window title will have an '*' (asterisk).</p>
<p>The window title must contain a &quot;[*]&quot; placeholder, which indicates where the '*' should appear. Normally, it should appear right after the file name (e.g&#x2e;, &quot;document1.txt[*] - Text Editor&quot;). If the window isn't modified, the placeholder is simply removed.</p>
<p>Note that if a widget is set as modified, all its ancestors will also be set as modified. However, if you call <tt>setWindowModified(false)</tt> on a widget, this will not propagate to its parent because other children of the parent might have been modified.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b>isWindowModified</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setWindowModified</b> ( bool )</td></tr>
</table>
<p>See also <a href="qwidget.html#windowTitle-prop">windowTitle</a>, <a href="mainwindows-application.html">Application Example</a>, <a href="mainwindows-sdi.html">SDI Example</a>, and <a href="mainwindows-mdi.html">MDI Example</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/windowOpacity"></a>
<a name="//apple_ref/cpp/instm/QWidget/setWindowOpacity"></a>
<h3 class="fn"><a name="windowOpacity-prop"></a>windowOpacity : double</h3>
<p>This property holds the level of opacity for the window.</p>
<p>The valid range of opacity is from 1.0 (completely opaque) to 0.0 (completely transparent).</p>
<p>By default the value of this property is 1.0&#x2e;</p>
<p>This feature is available on Embedded Linux, Mac OS X, Windows, and X11 platforms that support the Composite extension.</p>
<p>This feature is not available on Windows CE.</p>
<p>Note that under X11 you need to have a composite manager running, and the X11 specific _NET_WM_WINDOW_OPACITY atom needs to be supported by the window manager you are using.</p>
<p><b>Warning:</b> Changing this property from opaque to transparent might issue a paint event that needs to be processed before the window is displayed correctly. This affects mainly the use of <a href="qpixmap.html#grabWindow">QPixmap::grabWindow</a>(). Also note that semi-transparent windows update and resize significantly slower than opaque windows.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">qreal </td><td class="memItemRight" valign="bottom"><b>windowOpacity</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setWindowOpacity</b> ( qreal <i>level</i> )</td></tr>
</table>
<p>See also <a href="qwidget.html#setMask">setMask</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/windowTitle"></a>
<a name="//apple_ref/cpp/instm/QWidget/setWindowTitle"></a>
<h3 class="fn"><a name="windowTitle-prop"></a>windowTitle : <a href="qstring.html">QString</a></h3>
<p>This property holds the window title (caption).</p>
<p>This property only makes sense for top-level widgets, such as windows and dialogs. If no caption has been set, the title is based of the <a href="qwidget.html#windowFilePath-prop">windowFilePath</a>. If neither of these is set, then the title is an empty string.</p>
<p>If you use the <a href="qwidget.html#windowModified-prop">windowModified</a> mechanism, the window title must contain a &quot;[*]&quot; placeholder, which indicates where the '*' should appear. Normally, it should appear right after the file name (e.g&#x2e;, &quot;document1.txt[*] - Text Editor&quot;). If the <a href="qwidget.html#windowModified-prop">windowModified</a> property is false (the default), the placeholder is simply removed.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b>windowTitle</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setWindowTitle</b> ( const QString &amp; )</td></tr>
</table>
<p>See also <a href="qwidget.html#windowIcon-prop">windowIcon</a>, <a href="qwidget.html#windowIconText-prop">windowIconText</a>, <a href="qwidget.html#windowModified-prop">windowModified</a>, and <a href="qwidget.html#windowFilePath-prop">windowFilePath</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/x"></a>
<h3 class="fn"><a name="x-prop"></a>x : const int</h3>
<p>This property holds the x coordinate of the widget relative to its parent including any window frame.</p>
<p>See the <a href="application-windows.html#window-geometry">Window Geometry</a> documentation for an overview of geometry issues with windows.</p>
<p>By default, this property has a value of 0.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b>x</b> () const</td></tr>
</table>
<p>See also <a href="qwidget.html#frameGeometry-prop">frameGeometry</a>, <a href="qwidget.html#y-prop">y</a>, and <a href="qwidget.html#pos-prop">pos</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/y"></a>
<h3 class="fn"><a name="y-prop"></a>y : const int</h3>
<p>This property holds the y coordinate of the widget relative to its parent and including any window frame.</p>
<p>See the <a href="application-windows.html#window-geometry">Window Geometry</a> documentation for an overview of geometry issues with windows.</p>
<p>By default, this property has a value of 0.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b>y</b> () const</td></tr>
</table>
<p>See also <a href="qwidget.html#frameGeometry-prop">frameGeometry</a>, <a href="qwidget.html#x-prop">x</a>, and <a href="qwidget.html#pos-prop">pos</a>.</p>
<hr />
<h2>Member Function Documentation</h2>
<a name="//apple_ref/cpp/instm/QWidget/QWidget"></a>
<h3 class="fn"><a name="QWidget"></a>QWidget::QWidget ( QWidget * <i>parent</i> = 0, <a href="qt.html#WindowType-enum">Qt::WindowFlags</a> <i>f</i> = 0 )</h3>
<p>Constructs a widget which is a child of <i>parent</i>, with widget flags set to <i>f</i>.</p>
<p>If <i>parent</i> is 0, the new widget becomes a window. If <i>parent</i> is another widget, this widget becomes a child window inside <i>parent</i>. The new widget is deleted when its <i>parent</i> is deleted.</p>
<p>The widget flags argument, <i>f</i>, is normally 0, but it can be set to customize the frame of a window (i.e&#x2e; <i>parent</i> must be 0). To customize the frame, use a value composed from the bitwise OR of any of the <a href="qt.html#WindowType-enum">window flags</a>.</p>
<p>If you add a child widget to an already visible widget you must explicitly show the child to make it visible.</p>
<p>Note that the X11 version of Qt may not be able to deliver all combinations of style flags on all systems. This is because on X11, Qt can only ask the window manager, and the window manager can override the application's settings. On Windows, Qt can set whatever flags you want.</p>
<p>See also <a href="qwidget.html#windowFlags-prop">windowFlags</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/~QWidget"></a>
<h3 class="fn"><a name="dtor.QWidget"></a>QWidget::~QWidget ()</h3>
<p>Destroys the widget.</p>
<p>All this widget's children are deleted first. The application exits if this widget is the main widget.</p>
<a name="//apple_ref/cpp/instm/QWidget/actionEvent"></a>
<h3 class="fn"><a name="actionEvent"></a>void QWidget::actionEvent ( <a href="qactionevent.html">QActionEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler is called with the given <i>event</i> whenever the widget's actions are changed.</p>
<p>See also <a href="qwidget.html#addAction">addAction</a>(), <a href="qwidget.html#insertAction">insertAction</a>(), <a href="qwidget.html#removeAction">removeAction</a>(), <a href="qwidget.html#actions">actions</a>(), and <a href="qactionevent.html">QActionEvent</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/actions"></a>
<h3 class="fn"><a name="actions"></a><a href="qlist.html">QList</a>&lt;<a href="qaction.html">QAction</a> *&gt; QWidget::actions () const</h3>
<p>Returns the (possibly empty) list of this widget's actions.</p>
<p>See also <a href="qwidget.html#contextMenuPolicy-prop">contextMenuPolicy</a>, <a href="qwidget.html#insertAction">insertAction</a>(), and <a href="qwidget.html#removeAction">removeAction</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/activateWindow"></a>
<h3 class="fn"><a name="activateWindow"></a>void QWidget::activateWindow ()</h3>
<p>Sets the top-level widget containing this widget to be the active window.</p>
<p>An active window is a visible top-level window that has the keyboard input focus.</p>
<p>This function performs the same operation as clicking the mouse on the title bar of a top-level window. On X11, the result depends on the Window Manager. If you want to ensure that the window is stacked on top as well you should also call <a href="qwidget.html#raise">raise</a>(). Note that the window must be visible, otherwise activateWindow() has no effect.</p>
<p>On Windows, if you are calling this when the application is not currently the active one then it will not make it the active window. It will change the color of the taskbar entry to indicate that the window has changed in some way. This is because Microsoft does not allow an application to interrupt what the user is currently doing in another application.</p>
<p>See also <a href="qwidget.html#isActiveWindow-prop">isActiveWindow</a>(), <a href="qwidget.html#window">window</a>(), and <a href="qwidget.html#show">show</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/addAction"></a>
<h3 class="fn"><a name="addAction"></a>void QWidget::addAction ( <a href="qaction.html">QAction</a> * <i>action</i> )</h3>
<p>Appends the action <i>action</i> to this widget's list of actions.</p>
<p>All QWidgets have a list of <a href="qaction.html">QAction</a>s, however they can be represented graphically in many different ways. The default use of the <a href="qaction.html">QAction</a> list (as returned by <a href="qwidget.html#actions">actions</a>()) is to create a context <a href="qmenu.html">QMenu</a>.</p>
<p>A <a href="qwidget.html">QWidget</a> should only have one of each action and adding an action it already has will not cause the same action to be in the widget twice.</p>
<p>The ownership of <i>action</i> is not transferred to this <a href="qwidget.html">QWidget</a>.</p>
<p>See also <a href="qwidget.html#removeAction">removeAction</a>(), <a href="qwidget.html#insertAction">insertAction</a>(), <a href="qwidget.html#actions">actions</a>(), and <a href="qmenu.html">QMenu</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/addActions"></a>
<h3 class="fn"><a name="addActions"></a>void QWidget::addActions ( <a href="qlist.html">QList</a>&lt;<a href="qaction.html">QAction</a> *&gt; <i>actions</i> )</h3>
<p>Appends the actions <i>actions</i> to this widget's list of actions.</p>
<p>See also <a href="qwidget.html#removeAction">removeAction</a>(), <a href="qmenu.html">QMenu</a>, and <a href="qwidget.html#addAction">addAction</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/adjustSize"></a>
<h3 class="fn"><a name="adjustSize"></a>void QWidget::adjustSize ()</h3>
<p>Adjusts the size of the widget to fit its contents.</p>
<p>This function uses <a href="qwidget.html#sizeHint-prop">sizeHint</a>() if it is valid, i.e&#x2e;, the size hint's width and height are &gt;= 0. Otherwise, it sets the size to the children rectangle that covers all child widgets (the union of all child widget rectangles).</p>
<p>For windows, the screen size is also taken into account. If the <a href="qwidget.html#sizeHint-prop">sizeHint</a>() is less than (200, 100) and the size policy is <a href="qsizepolicy.html#Policy-enum">expanding</a>, the window will be at least (200, 100). The maximum size of a window is 2/3 of the screen's width and height.</p>
<p>See also <a href="qwidget.html#sizeHint-prop">sizeHint</a>() and <a href="qwidget.html#childrenRect-prop">childrenRect</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/backgroundRole"></a>
<h3 class="fn"><a name="backgroundRole"></a><a href="qpalette.html#ColorRole-enum">QPalette::ColorRole</a> QWidget::backgroundRole () const</h3>
<p>Returns the background role of the widget.</p>
<p>The background role defines the brush from the widget's <a href="qwidget.html#palette-prop">palette</a> that is used to render the background.</p>
<p>If no explicit background role is set, the widget inherts its parent widget's background role.</p>
<p>See also <a href="qwidget.html#setBackgroundRole">setBackgroundRole</a>() and <a href="qwidget.html#foregroundRole">foregroundRole</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/changeEvent"></a>
<h3 class="fn"><a name="changeEvent"></a>void QWidget::changeEvent ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler can be reimplemented to handle state changes.</p>
<p>The state being changed in this event can be retrieved through event <i>event</i>.</p>
<p>Change events include: <a href="qevent.html#Type-enum">QEvent::ToolBarChange</a>, <a href="qevent.html#Type-enum">QEvent::ActivationChange</a>, <a href="qevent.html#Type-enum">QEvent::EnabledChange</a>, <a href="qevent.html#Type-enum">QEvent::FontChange</a>, <a href="qevent.html#Type-enum">QEvent::StyleChange</a>, <a href="qevent.html#Type-enum">QEvent::PaletteChange</a>, <a href="qevent.html#Type-enum">QEvent::WindowTitleChange</a>, <a href="qevent.html#Type-enum">QEvent::IconTextChange</a>, <a href="qevent.html#Type-enum">QEvent::ModifiedChange</a>, <a href="qevent.html#Type-enum">QEvent::MouseTrackingChange</a>, <a href="qevent.html#Type-enum">QEvent::ParentChange</a>, <a href="qevent.html#Type-enum">QEvent::WindowStateChange</a>, <a href="qevent.html#Type-enum">QEvent::LanguageChange</a>, <a href="qevent.html#Type-enum">QEvent::LocaleChange</a>, <a href="qevent.html#Type-enum">QEvent::LayoutDirectionChange</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/childAt"></a>
<h3 class="fn"><a name="childAt"></a>QWidget * QWidget::childAt ( int <i>x</i>, int <i>y</i> ) const</h3>
<p>Returns the visible child widget at the position (<i>x</i>, <i>y</i>) in the widget's coordinate system. If there is no visible child widget at the specified position, the function returns 0.</p>
<h3 class="fn"><a name="childAt-4"></a>QWidget * QWidget::childAt ( const <a href="qpoint.html">QPoint</a> &amp; <i>p</i> ) const</h3>
<p>This is an overloaded function.</p>
<p>Returns the visible child widget at point <i>p</i> in the widget's own coordinate system.</p>
<a name="//apple_ref/cpp/instm/QWidget/clearFocus"></a>
<h3 class="fn"><a name="clearFocus"></a>void QWidget::clearFocus ()</h3>
<p>Takes keyboard input focus from the widget.</p>
<p>If the widget has active focus, a <a href="qwidget.html#focusOutEvent">focus out event</a> is sent to this widget to tell it that it is about to lose the focus.</p>
<p>This widget must enable focus setting in order to get the keyboard input focus, i.e&#x2e; it must call <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>().</p>
<p>See also <a href="qwidget.html#focus-prop">hasFocus</a>(), <a href="qwidget.html#setFocus">setFocus</a>(), <a href="qwidget.html#focusInEvent">focusInEvent</a>(), <a href="qwidget.html#focusOutEvent">focusOutEvent</a>(), <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>(), and <a href="qapplication.html#focusWidget">QApplication::focusWidget</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/clearMask"></a>
<h3 class="fn"><a name="clearMask"></a>void QWidget::clearMask ()</h3>
<p>Removes any mask set by <a href="qwidget.html#setMask">setMask</a>().</p>
<p>See also <a href="qwidget.html#setMask">setMask</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/close"></a>
<h3 class="fn"><a name="close"></a>bool QWidget::close ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Closes this widget. Returns true if the widget was closed; otherwise returns false.</p>
<p>First it sends the widget a <a href="qcloseevent.html">QCloseEvent</a>. The widget is <a href="qwidget.html#hide">hidden</a> if it <a href="qevent.html#accept">accepts</a> the close event. If it <a href="qevent.html#ignore">ignores</a> the event, nothing happens. The default implementation of <a href="qwidget.html#closeEvent">QWidget::closeEvent</a>() accepts the close event.</p>
<p>If the widget has the <a href="qt.html#WidgetAttribute-enum">Qt::WA_DeleteOnClose</a> flag, the widget is also deleted. A close events is delivered to the widget no matter if the widget is visible or not.</p>
<p>The <a href="qapplication.html#lastWindowClosed">QApplication::lastWindowClosed</a>() signal is emitted when the last visible primary window (i.e&#x2e; window with no parent) with the <a href="qt.html#WidgetAttribute-enum">Qt::WA_QuitOnClose</a> attribute set is closed. By default this attribute is set for all widgets except transient windows such as splash screens, tool windows, and popup menus.</p>
<a name="//apple_ref/cpp/instm/QWidget/closeEvent"></a>
<h3 class="fn"><a name="closeEvent"></a>void QWidget::closeEvent ( <a href="qcloseevent.html">QCloseEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler is called with the given <i>event</i> when Qt receives a window close request for a top-level widget from the window system.</p>
<p>By default, the event is accepted and the widget is closed. You can reimplement this function to change the way the widget responds to window close requests. For example, you can prevent the window from closing by calling <a href="qevent.html#ignore">ignore()</a> on all events.</p>
<p>Main window applications typically use reimplementations of this function to check whether the user's work has been saved and ask for permission before closing. For example, the <a href="mainwindows-application.html">Application Example</a> uses a helper function to determine whether or not to close the window:</p>
<pre> void MainWindow::closeEvent(QCloseEvent *event)
 {
     if (maybeSave()) {
         writeSettings();
         event-&gt;accept();
     } else {
         event-&gt;ignore();
     }
 }</pre>
<p>See also <a href="qwidget.html#event">event</a>(), <a href="qwidget.html#hide">hide</a>(), <a href="qwidget.html#close">close</a>(), <a href="qcloseevent.html">QCloseEvent</a>, and <a href="mainwindows-application.html">Application Example</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/contentsMargins"></a>
<h3 class="fn"><a name="contentsMargins"></a><a href="qmargins.html">QMargins</a> QWidget::contentsMargins () const</h3>
<p>The contentsMargins function returns the widget's contents margins.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qwidget.html#getContentsMargins">getContentsMargins</a>(), <a href="qwidget.html#setContentsMargins">setContentsMargins</a>(), and <a href="qwidget.html#contentsRect">contentsRect</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/contentsRect"></a>
<h3 class="fn"><a name="contentsRect"></a><a href="qrect.html">QRect</a> QWidget::contentsRect () const</h3>
<p>Returns the area inside the widget's margins.</p>
<p>See also <a href="qwidget.html#setContentsMargins">setContentsMargins</a>() and <a href="qwidget.html#getContentsMargins">getContentsMargins</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/contextMenuEvent"></a>
<h3 class="fn"><a name="contextMenuEvent"></a>void QWidget::contextMenuEvent ( <a href="qcontextmenuevent.html">QContextMenuEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented in a subclass to receive widget context menu events.</p>
<p>The handler is called when the widget's <a href="qwidget.html#contextMenuPolicy-prop">contextMenuPolicy</a> is <a href="qt.html#ContextMenuPolicy-enum">Qt::DefaultContextMenu</a>.</p>
<p>The default implementation ignores the context event. See the <a href="qcontextmenuevent.html">QContextMenuEvent</a> documentation for more details.</p>
<p>See also <a href="qwidget.html#event">event</a>(), <a href="qcontextmenuevent.html">QContextMenuEvent</a>, and <a href="qwidget.html#customContextMenuRequested">customContextMenuRequested</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/create"></a>
<h3 class="fn"><a name="create"></a>void QWidget::create ( <a href="qwidget.html#WId-typedef">WId</a> <i>window</i> = 0, bool <i>initializeWindow</i> = true, bool <i>destroyOldWindow</i> = true )&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Creates a new widget window if <i>window</i> is 0, otherwise sets the widget's window to <i>window</i>.</p>
<p>Initializes the window (sets the geometry etc.) if <i>initializeWindow</i> is true. If <i>initializeWindow</i> is false, no initialization is performed. This parameter only makes sense if <i>window</i> is a valid window.</p>
<p>Destroys the old window if <i>destroyOldWindow</i> is true. If <i>destroyOldWindow</i> is false, you are responsible for destroying the window yourself (using platform native code).</p>
<p>The <a href="qwidget.html">QWidget</a> constructor calls create(0,true,true) to create a window for this widget.</p>
<a name="//apple_ref/cpp/instm/QWidget/customContextMenuRequested"></a>
<h3 class="fn"><a name="customContextMenuRequested"></a>void QWidget::customContextMenuRequested ( const <a href="qpoint.html">QPoint</a> &amp; <i>pos</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the widget's <a href="qwidget.html#contextMenuPolicy-prop">contextMenuPolicy</a> is <a href="qt.html#ContextMenuPolicy-enum">Qt::CustomContextMenu</a>, and the user has requested a context menu on the widget. The position <i>pos</i> is the position of the context menu event that the widget receives. Normally this is in widget coordinates. The exception to this rule is <a href="qabstractscrollarea.html">QAbstractScrollArea</a> and its subclasses that map the context menu event to coordinates of the <a href="qabstractscrollarea.html#viewport">viewport()</a> .</p>
<p>See also <a href="qwidget.html#mapToGlobal">mapToGlobal</a>(), <a href="qmenu.html">QMenu</a>, and <a href="qwidget.html#contextMenuPolicy-prop">contextMenuPolicy</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/destroy"></a>
<h3 class="fn"><a name="destroy"></a>void QWidget::destroy ( bool <i>destroyWindow</i> = true, bool <i>destroySubWindows</i> = true )&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Frees up window system resources. Destroys the widget window if <i>destroyWindow</i> is true.</p>
<p>destroy() calls itself recursively for all the child widgets, passing <i>destroySubWindows</i> for the <i>destroyWindow</i> parameter. To have more control over destruction of subwidgets, destroy subwidgets selectively first.</p>
<p>This function is usually called from the <a href="qwidget.html">QWidget</a> destructor.</p>
<a name="//apple_ref/cpp/instm/QWidget/dragEnterEvent"></a>
<h3 class="fn"><a name="dragEnterEvent"></a>void QWidget::dragEnterEvent ( <a href="qdragenterevent.html">QDragEnterEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler is called when a drag is in progress and the mouse enters this widget. The event is passed in the <i>event</i> parameter.</p>
<p>If the event is ignored, the widget won't receive any <a href="qwidget.html#dragMoveEvent">drag move events</a>.</p>
<p>See the <a href="dnd.html">Drag-and-drop documentation</a> for an overview of how to provide drag-and-drop in your application.</p>
<p>See also <a href="qdrag.html">QDrag</a> and <a href="qdragenterevent.html">QDragEnterEvent</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/dragLeaveEvent"></a>
<h3 class="fn"><a name="dragLeaveEvent"></a>void QWidget::dragLeaveEvent ( <a href="qdragleaveevent.html">QDragLeaveEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler is called when a drag is in progress and the mouse leaves this widget. The event is passed in the <i>event</i> parameter.</p>
<p>See the <a href="dnd.html">Drag-and-drop documentation</a> for an overview of how to provide drag-and-drop in your application.</p>
<p>See also <a href="qdrag.html">QDrag</a> and <a href="qdragleaveevent.html">QDragLeaveEvent</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/dragMoveEvent"></a>
<h3 class="fn"><a name="dragMoveEvent"></a>void QWidget::dragMoveEvent ( <a href="qdragmoveevent.html">QDragMoveEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler is called if a drag is in progress, and when any of the following conditions occur: the cursor enters this widget, the cursor moves within this widget, or a modifier key is pressed on the keyboard while this widget has the focus. The event is passed in the <i>event</i> parameter.</p>
<p>See the <a href="dnd.html">Drag-and-drop documentation</a> for an overview of how to provide drag-and-drop in your application.</p>
<p>See also <a href="qdrag.html">QDrag</a> and <a href="qdragmoveevent.html">QDragMoveEvent</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/dropEvent"></a>
<h3 class="fn"><a name="dropEvent"></a>void QWidget::dropEvent ( <a href="qdropevent.html">QDropEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler is called when the drag is dropped on this widget. The event is passed in the <i>event</i> parameter.</p>
<p>See the <a href="dnd.html">Drag-and-drop documentation</a> for an overview of how to provide drag-and-drop in your application.</p>
<p>See also <a href="qdrag.html">QDrag</a> and <a href="qdropevent.html">QDropEvent</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/effectiveWinId"></a>
<h3 class="fn"><a name="effectiveWinId"></a><a href="qwidget.html#WId-typedef">WId</a> QWidget::effectiveWinId () const</h3>
<p>Returns the effective window system identifier of the widget, i.e&#x2e; the native parent's window system identifier.</p>
<p>If the widget is native, this function returns the native widget ID. Otherwise, the window ID of the first native parent widget, i.e&#x2e;, the top-level widget that contains this widget, is returned.</p>
<p><b>Note:</b> We recommend that you do not store this value as it is likely to change at run-time.</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qwidget.html#nativeParentWidget">nativeParentWidget</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/ensurePolished"></a>
<h3 class="fn"><a name="ensurePolished"></a>void QWidget::ensurePolished () const</h3>
<p>Ensures that the widget has been polished by <a href="qstyle.html">QStyle</a> (i.e&#x2e;, has a proper font and palette).</p>
<p><a href="qwidget.html">QWidget</a> calls this function after it has been fully constructed but before it is shown the very first time. You can call this function if you want to ensure that the widget is polished before doing an operation, e.g&#x2e;, the correct font size might be needed in the widget's <a href="qwidget.html#sizeHint-prop">sizeHint</a>() reimplementation. Note that this function <i>is</i> called from the default implementation of <a href="qwidget.html#sizeHint-prop">sizeHint</a>().</p>
<p>Polishing is useful for final initialization that must happen after all constructors (from base classes as well as from subclasses) have been called.</p>
<p>If you need to change some settings when a widget is polished, reimplement <a href="qwidget.html#event">event</a>() and handle the <a href="qevent.html#Type-enum">QEvent::Polish</a> event type.</p>
<p><b>Note:</b> The function is declared const so that it can be called from other const functions (e.g&#x2e;, <a href="qwidget.html#sizeHint-prop">sizeHint</a>()).</p>
<p>See also <a href="qwidget.html#event">event</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/enterEvent"></a>
<h3 class="fn"><a name="enterEvent"></a>void QWidget::enterEvent ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler can be reimplemented in a subclass to receive widget enter events which are passed in the <i>event</i> parameter.</p>
<p>An event is sent to the widget when the mouse cursor enters the widget.</p>
<p>See also <a href="qwidget.html#leaveEvent">leaveEvent</a>(), <a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>(), and <a href="qwidget.html#event">event</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/event"></a>
<h3 class="fn"><a name="event"></a>bool QWidget::event ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qobject.html#event">QObject::event</a>().</p>
<p>This is the main event handler; it handles event <i>event</i>. You can reimplement this function in a subclass, but we recommend using one of the specialized event handlers instead.</p>
<p>Key press and release events are treated differently from other events. event() checks for Tab and Shift+Tab and tries to move the focus appropriately. If there is no widget to move the focus to (or the key press is not Tab or Shift+Tab), event() calls <a href="qwidget.html#keyPressEvent">keyPressEvent</a>().</p>
<p>Mouse and tablet event handling is also slightly special: only when the widget is <a href="qwidget.html#enabled-prop">enabled</a>, event() will call the specialized handlers such as <a href="qwidget.html#mousePressEvent">mousePressEvent</a>(); otherwise it will discard the event.</p>
<p>This function returns true if the event was recognized, otherwise it returns false. If the recognized event was accepted (see <a href="qevent.html#accepted-prop">QEvent::accepted</a>), any further processing such as event propagation to the parent widget stops.</p>
<p>See also <a href="qwidget.html#closeEvent">closeEvent</a>(), <a href="qwidget.html#focusInEvent">focusInEvent</a>(), <a href="qwidget.html#focusOutEvent">focusOutEvent</a>(), <a href="qwidget.html#enterEvent">enterEvent</a>(), <a href="qwidget.html#keyPressEvent">keyPressEvent</a>(), <a href="qwidget.html#keyReleaseEvent">keyReleaseEvent</a>(), <a href="qwidget.html#leaveEvent">leaveEvent</a>(), <a href="qwidget.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a>(), <a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>(), <a href="qwidget.html#mousePressEvent">mousePressEvent</a>(), <a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>(), <a href="qwidget.html#moveEvent">moveEvent</a>(), <a href="qwidget.html#paintEvent">paintEvent</a>(), <a href="qwidget.html#resizeEvent">resizeEvent</a>(), <a href="qobject.html#event">QObject::event</a>(), and <a href="qobject.html#timerEvent">QObject::timerEvent</a>().</p>
<a name="//apple_ref/cpp/clm/QWidget/find"></a>
<h3 class="fn"><a name="find"></a>QWidget * QWidget::find ( <a href="qwidget.html#WId-typedef">WId</a> <i>id</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Returns a pointer to the widget with window identifer/handle <i>id</i>.</p>
<p>The window identifier type depends on the underlying window system, see <tt>qwindowdefs.h</tt> for the actual definition. If there is no widget with this identifier, 0 is returned.</p>
<a name="//apple_ref/cpp/instm/QWidget/focusInEvent"></a>
<h3 class="fn"><a name="focusInEvent"></a>void QWidget::focusInEvent ( <a href="qfocusevent.html">QFocusEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler can be reimplemented in a subclass to receive keyboard focus events (focus received) for the widget. The event is passed in the <i>event</i> parameter</p>
<p>A widget normally must <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>() to something other than <a href="qt.html#FocusPolicy-enum">Qt::NoFocus</a> in order to receive focus events. (Note that the application programmer can call <a href="qwidget.html#setFocus">setFocus</a>() on any widget, even those that do not normally accept focus.)</p>
<p>The default implementation updates the widget (except for windows that do not specify a <a href="qwidget.html#focusPolicy-prop">focusPolicy</a>()).</p>
<p>See also <a href="qwidget.html#focusOutEvent">focusOutEvent</a>(), <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>(), <a href="qwidget.html#keyPressEvent">keyPressEvent</a>(), <a href="qwidget.html#keyReleaseEvent">keyReleaseEvent</a>(), <a href="qwidget.html#event">event</a>(), and <a href="qfocusevent.html">QFocusEvent</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/focusNextChild"></a>
<h3 class="fn"><a name="focusNextChild"></a>bool QWidget::focusNextChild ()&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Finds a new widget to give the keyboard focus to, as appropriate for <b>Tab</b>, and returns true if it can find a new widget, or false if it can't.</p>
<p>See also <a href="qwidget.html#focusPreviousChild">focusPreviousChild</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/focusNextPrevChild"></a>
<h3 class="fn"><a name="focusNextPrevChild"></a>bool QWidget::focusNextPrevChild ( bool <i>next</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Finds a new widget to give the keyboard focus to, as appropriate for Tab and Shift+Tab, and returns true if it can find a new widget, or false if it can't.</p>
<p>If <i>next</i> is true, this function searches forward, if <i>next</i> is false, it searches backward.</p>
<p>Sometimes, you will want to reimplement this function. For example, a web browser might reimplement it to move its &quot;current active link&quot; forward or backward, and call focusNextPrevChild() only when it reaches the last or first link on the &quot;page&quot;.</p>
<p>Child widgets call focusNextPrevChild() on their parent widgets, but only the window that contains the child widgets decides where to redirect focus. By reimplementing this function for an object, you thus gain control of focus traversal for all child widgets.</p>
<p>See also <a href="qwidget.html#focusNextChild">focusNextChild</a>() and <a href="qwidget.html#focusPreviousChild">focusPreviousChild</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/focusOutEvent"></a>
<h3 class="fn"><a name="focusOutEvent"></a>void QWidget::focusOutEvent ( <a href="qfocusevent.html">QFocusEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler can be reimplemented in a subclass to receive keyboard focus events (focus lost) for the widget. The events is passed in the <i>event</i> parameter.</p>
<p>A widget normally must <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>() to something other than <a href="qt.html#FocusPolicy-enum">Qt::NoFocus</a> in order to receive focus events. (Note that the application programmer can call <a href="qwidget.html#setFocus">setFocus</a>() on any widget, even those that do not normally accept focus.)</p>
<p>The default implementation updates the widget (except for windows that do not specify a <a href="qwidget.html#focusPolicy-prop">focusPolicy</a>()).</p>
<p>See also <a href="qwidget.html#focusInEvent">focusInEvent</a>(), <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>(), <a href="qwidget.html#keyPressEvent">keyPressEvent</a>(), <a href="qwidget.html#keyReleaseEvent">keyReleaseEvent</a>(), <a href="qwidget.html#event">event</a>(), and <a href="qfocusevent.html">QFocusEvent</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/focusPreviousChild"></a>
<h3 class="fn"><a name="focusPreviousChild"></a>bool QWidget::focusPreviousChild ()&nbsp;&nbsp;<tt> [protected]</tt></h3>
<p>Finds a new widget to give the keyboard focus to, as appropriate for <b>Shift+Tab</b>, and returns true if it can find a new widget, or false if it can't.</p>
<p>See also <a href="qwidget.html#focusNextChild">focusNextChild</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/focusProxy"></a>
<h3 class="fn"><a name="focusProxy"></a>QWidget * QWidget::focusProxy () const</h3>
<p>Returns the focus proxy, or 0 if there is no focus proxy.</p>
<p>See also <a href="qwidget.html#setFocusProxy">setFocusProxy</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/focusWidget"></a>
<h3 class="fn"><a name="focusWidget"></a>QWidget * QWidget::focusWidget () const</h3>
<p>Returns the last child of this widget that setFocus had been called on. For top level widgets this is the widget that will get focus in case this window gets activated</p>
<p>This is not the same as <a href="qapplication.html#focusWidget">QApplication::focusWidget</a>(), which returns the focus widget in the currently active window.</p>
<a name="//apple_ref/cpp/instm/QWidget/fontInfo"></a>
<h3 class="fn"><a name="fontInfo"></a><a href="qfontinfo.html">QFontInfo</a> QWidget::fontInfo () const</h3>
<p>Returns the font info for the widget's current font. Equivalent to QFontInto(widget-&gt;<a href="qwidget.html#font-prop">font</a>()).</p>
<p>See also <a href="qwidget.html#font-prop">font</a>(), <a href="qwidget.html#fontMetrics">fontMetrics</a>(), and <a href="qwidget.html#font-prop">setFont</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/fontMetrics"></a>
<h3 class="fn"><a name="fontMetrics"></a><a href="qfontmetrics.html">QFontMetrics</a> QWidget::fontMetrics () const</h3>
<p>Returns the font metrics for the widget's current font. Equivalent to <a href="qfontmetrics.html">QFontMetrics</a>(widget-&gt;<a href="qwidget.html#font-prop">font</a>()).</p>
<p>See also <a href="qwidget.html#font-prop">font</a>(), <a href="qwidget.html#fontInfo">fontInfo</a>(), and <a href="qwidget.html#font-prop">setFont</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/foregroundRole"></a>
<h3 class="fn"><a name="foregroundRole"></a><a href="qpalette.html#ColorRole-enum">QPalette::ColorRole</a> QWidget::foregroundRole () const</h3>
<p>Returns the foreground role.</p>
<p>The foreground role defines the color from the widget's <a href="qwidget.html#palette-prop">palette</a> that is used to draw the foreground.</p>
<p>If no explicit foreground role is set, the function returns a role that contrasts with the background role.</p>
<p>See also <a href="qwidget.html#setForegroundRole">setForegroundRole</a>() and <a href="qwidget.html#backgroundRole">backgroundRole</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/getContentsMargins"></a>
<h3 class="fn"><a name="getContentsMargins"></a>void QWidget::getContentsMargins ( int * <i>left</i>, int * <i>top</i>, int * <i>right</i>, int * <i>bottom</i> ) const</h3>
<p>Returns the widget's contents margins for <i>left</i>, <i>top</i>, <i>right</i>, and <i>bottom</i>.</p>
<p>See also <a href="qwidget.html#setContentsMargins">setContentsMargins</a>() and <a href="qwidget.html#contentsRect">contentsRect</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/getDC"></a>
<h3 class="fn"><a name="getDC"></a>HDC QWidget::getDC () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Returns the window system handle of the widget, for low-level access. Using this function is not portable.</p>
<p>An HDC acquired with getDC() has to be released with <a href="qwidget.html#releaseDC">releaseDC</a>().</p>
<p><b>Warning:</b> Using this function is not portable.</p>
<a name="//apple_ref/cpp/instm/QWidget/grabGesture"></a>
<h3 class="fn"><a name="grabGesture"></a>void QWidget::grabGesture ( <a href="qt.html#GestureType-enum">Qt::GestureType</a> <i>gesture</i>, <a href="qt.html#GestureFlag-enum">Qt::GestureFlags</a> <i>flags</i> = Qt::GestureFlags() )</h3>
<p>Subscribes the widget to a given <i>gesture</i> with specific <i>flags</i>.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qwidget.html#ungrabGesture">ungrabGesture</a>() and <a href="qgestureevent.html">QGestureEvent</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/grabKeyboard"></a>
<h3 class="fn"><a name="grabKeyboard"></a>void QWidget::grabKeyboard ()</h3>
<p>Grabs the keyboard input.</p>
<p>This widget receives all keyboard events until <a href="qwidget.html#releaseKeyboard">releaseKeyboard</a>() is called; other widgets get no keyboard events at all. Mouse events are not affected. Use <a href="qwidget.html#grabMouse">grabMouse</a>() if you want to grab that.</p>
<p>The focus widget is not affected, except that it doesn't receive any keyboard events. <a href="qwidget.html#setFocus">setFocus</a>() moves the focus as usual, but the new focus widget receives keyboard events only after <a href="qwidget.html#releaseKeyboard">releaseKeyboard</a>() is called.</p>
<p>If a different widget is currently grabbing keyboard input, that widget's grab is released first.</p>
<p>See also <a href="qwidget.html#releaseKeyboard">releaseKeyboard</a>(), <a href="qwidget.html#grabMouse">grabMouse</a>(), <a href="qwidget.html#releaseMouse">releaseMouse</a>(), and <a href="qwidget.html#focusWidget">focusWidget</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/grabMouse"></a>
<h3 class="fn"><a name="grabMouse"></a>void QWidget::grabMouse ()</h3>
<p>Grabs the mouse input.</p>
<p>This widget receives all mouse events until <a href="qwidget.html#releaseMouse">releaseMouse</a>() is called; other widgets get no mouse events at all. Keyboard events are not affected. Use <a href="qwidget.html#grabKeyboard">grabKeyboard</a>() if you want to grab that.</p>
<p><b>Warning:</b> Bugs in mouse-grabbing applications very often lock the terminal. Use this function with extreme caution, and consider using the <tt>-nograb</tt> command line option while debugging.</p>
<p>It is almost never necessary to grab the mouse when using Qt, as Qt grabs and releases it sensibly. In particular, Qt grabs the mouse when a mouse button is pressed and keeps it until the last button is released.</p>
<p><b>Note:</b> Only visible widgets can grab mouse input. If <a href="qwidget.html#visible-prop">isVisible</a>() returns false for a widget, that widget cannot call grabMouse().</p>
<p><b>Note:</b> <b>(Mac OS X developers)</b> For <i>Cocoa</i>, calling grabMouse() on a widget only works when the mouse is inside the frame of that widget. For <i>Carbon</i>, it works outside the widget's frame as well, like for Windows and X11.</p>
<p>See also <a href="qwidget.html#releaseMouse">releaseMouse</a>(), <a href="qwidget.html#grabKeyboard">grabKeyboard</a>(), and <a href="qwidget.html#releaseKeyboard">releaseKeyboard</a>().</p>
<h3 class="fn"><a name="grabMouse-2"></a>void QWidget::grabMouse ( const <a href="qcursor.html">QCursor</a> &amp; <i>cursor</i> )</h3>
<p>This function overloads <a href="qwidget.html#grabMouse">grabMouse</a>().</p>
<p>Grabs the mouse input and changes the cursor shape.</p>
<p>The cursor will assume shape <i>cursor</i> (for as long as the mouse focus is grabbed) and this widget will be the only one to receive mouse events until <a href="qwidget.html#releaseMouse">releaseMouse</a>() is called().</p>
<p><b>Warning:</b> Grabbing the mouse might lock the terminal.</p>
<p><b>Note:</b> <b>(Mac OS X developers)</b> See the note in <a href="qwidget.html#grabMouse">QWidget::grabMouse</a>().</p>
<p>See also <a href="qwidget.html#releaseMouse">releaseMouse</a>(), <a href="qwidget.html#grabKeyboard">grabKeyboard</a>(), <a href="qwidget.html#releaseKeyboard">releaseKeyboard</a>(), and <a href="qwidget.html#cursor-prop">setCursor</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/grabShortcut"></a>
<h3 class="fn"><a name="grabShortcut"></a>int QWidget::grabShortcut ( const <a href="qkeysequence.html">QKeySequence</a> &amp; <i>key</i>, <a href="qt.html#ShortcutContext-enum">Qt::ShortcutContext</a> <i>context</i> = Qt::WindowShortcut )</h3>
<p>Adds a shortcut to Qt's shortcut system that watches for the given <i>key</i> sequence in the given <i>context</i>. If the <i>context</i> is <a href="qt.html#ShortcutContext-enum">Qt::ApplicationShortcut</a>, the shortcut applies to the application as a whole. Otherwise, it is either local to this widget, <a href="qt.html#ShortcutContext-enum">Qt::WidgetShortcut</a>, or to the window itself, <a href="qt.html#ShortcutContext-enum">Qt::WindowShortcut</a>.</p>
<p>If the same <i>key</i> sequence has been grabbed by several widgets, when the <i>key</i> sequence occurs a <a href="qevent.html#Type-enum">QEvent::Shortcut</a> event is sent to all the widgets to which it applies in a non-deterministic order, but with the ``ambiguous'' flag set to true.</p>
<p><b>Warning:</b> You should not normally need to use this function; instead create <a href="qaction.html">QAction</a>s with the shortcut key sequences you require (if you also want equivalent menu options and toolbar buttons), or create <a href="qshortcut.html">QShortcut</a>s if you just need key sequences. Both <a href="qaction.html">QAction</a> and <a href="qshortcut.html">QShortcut</a> handle all the event filtering for you, and provide signals which are triggered when the user triggers the key sequence, so are much easier to use than this low-level function.</p>
<p>See also <a href="qwidget.html#releaseShortcut">releaseShortcut</a>() and <a href="qwidget.html#setShortcutEnabled">setShortcutEnabled</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/graphicsEffect"></a>
<h3 class="fn"><a name="graphicsEffect"></a><a href="qgraphicseffect.html">QGraphicsEffect</a> * QWidget::graphicsEffect () const</h3>
<p>The graphicsEffect function returns a pointer to the widget's graphics effect.</p>
<p>If the widget has no graphics effect, 0 is returned.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qwidget.html#setGraphicsEffect">setGraphicsEffect</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/graphicsProxyWidget"></a>
<h3 class="fn"><a name="graphicsProxyWidget"></a><a href="qgraphicsproxywidget.html">QGraphicsProxyWidget</a> * QWidget::graphicsProxyWidget () const</h3>
<p>Returns the proxy widget for the corresponding embedded widget in a graphics view; otherwise returns 0.</p>
<p>This function was introduced in Qt 4.5.</p>
<p>See also <a href="qgraphicsproxywidget.html#createProxyForChildWidget">QGraphicsProxyWidget::createProxyForChildWidget</a>() and <a href="qgraphicsscene.html#addWidget">QGraphicsScene::addWidget</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/hasEditFocus"></a>
<h3 class="fn"><a name="hasEditFocus"></a>bool QWidget::hasEditFocus () const</h3>
<p>Returns true if this widget currently has edit focus; otherwise false.</p>
<p>This feature is only available in Qt for Embedded Linux.</p>
<p>See also <a href="qwidget.html#setEditFocus">setEditFocus</a>() and <a href="qapplication.html#keypadNavigationEnabled">QApplication::keypadNavigationEnabled</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/heightForWidth"></a>
<h3 class="fn"><a name="heightForWidth"></a>int QWidget::heightForWidth ( int <i>w</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Returns the preferred height for this widget, given the width <i>w</i>.</p>
<p>If this widget has a layout, the default implementation returns the layout's preferred height. if there is no layout, the default implementation returns -1 indicating that the preferred height does not depend on the width.</p>
<a name="//apple_ref/cpp/instm/QWidget/hide"></a>
<h3 class="fn"><a name="hide"></a>void QWidget::hide ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Hides the widget. This function is equivalent to setVisible(false).</p>
<p><b>Note:</b> If you are working with <a href="qdialog.html">QDialog</a> or its subclasses and you invoke the <a href="qwidget.html#show">show</a>() function after this function, the dialog will be displayed in its original position.</p>
<p>See also <a href="qwidget.html#hideEvent">hideEvent</a>(), <a href="qwidget.html#isHidden">isHidden</a>(), <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#visible-prop">setVisible</a>(), <a href="qwidget.html#visible-prop">isVisible</a>(), and <a href="qwidget.html#close">close</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/hideEvent"></a>
<h3 class="fn"><a name="hideEvent"></a>void QWidget::hideEvent ( <a href="qhideevent.html">QHideEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler can be reimplemented in a subclass to receive widget hide events. The event is passed in the <i>event</i> parameter.</p>
<p>Hide events are sent to widgets immediately after they have been hidden.</p>
<p>Note: A widget receives spontaneous show and hide events when its mapping status is changed by the window system, e.g&#x2e; a spontaneous hide event when the user minimizes the window, and a spontaneous show event when the window is restored again. After receiving a spontaneous hide event, a widget is still considered visible in the sense of <a href="qwidget.html#visible-prop">isVisible</a>().</p>
<p>See also <a href="qwidget.html#visible-prop">visible</a>, <a href="qwidget.html#event">event</a>(), and <a href="qhideevent.html">QHideEvent</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/inputContext"></a>
<h3 class="fn"><a name="inputContext"></a><a href="qinputcontext.html">QInputContext</a> * QWidget::inputContext ()</h3>
<p>This function returns the <a href="qinputcontext.html">QInputContext</a> for this widget. By default the input context is inherited from the widgets parent. For toplevels it is inherited from <a href="qapplication.html">QApplication</a>.</p>
<p>You can override this and set a special input context for this widget by using the <a href="qwidget.html#setInputContext">setInputContext</a>() method.</p>
<p>See also <a href="qwidget.html#setInputContext">setInputContext</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/inputMethodEvent"></a>
<h3 class="fn"><a name="inputMethodEvent"></a>void QWidget::inputMethodEvent ( <a href="qinputmethodevent.html">QInputMethodEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented in a subclass to receive Input Method composition events. This handler is called when the state of the input method changes.</p>
<p>Note that when creating custom text editing widgets, the <a href="qt.html#WidgetAttribute-enum">Qt::WA_InputMethodEnabled</a> window attribute must be set explicitly (using the <a href="qwidget.html#setAttribute">setAttribute</a>() function) in order to receive input method events.</p>
<p>The default implementation calls event-&gt;ignore(), which rejects the Input Method event. See the <a href="qinputmethodevent.html">QInputMethodEvent</a> documentation for more details.</p>
<p>See also <a href="qwidget.html#event">event</a>() and <a href="qinputmethodevent.html">QInputMethodEvent</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/inputMethodQuery"></a>
<h3 class="fn"><a name="inputMethodQuery"></a><a href="qvariant.html">QVariant</a> QWidget::inputMethodQuery ( <a href="qt.html#InputMethodQuery-enum">Qt::InputMethodQuery</a> <i>query</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>This method is only relevant for input widgets. It is used by the input method to query a set of properties of the widget to be able to support complex input method operations as support for surrounding text and reconversions.</p>
<p><i>query</i> specifies which property is queried.</p>
<p>See also <a href="qwidget.html#inputMethodEvent">inputMethodEvent</a>(), <a href="qinputmethodevent.html">QInputMethodEvent</a>, <a href="qinputcontext.html">QInputContext</a>, and <a href="qwidget.html#inputMethodHints-prop">inputMethodHints</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/insertAction"></a>
<h3 class="fn"><a name="insertAction"></a>void QWidget::insertAction ( <a href="qaction.html">QAction</a> * <i>before</i>, <a href="qaction.html">QAction</a> * <i>action</i> )</h3>
<p>Inserts the action <i>action</i> to this widget's list of actions, before the action <i>before</i>. It appends the action if <i>before</i> is 0 or <i>before</i> is not a valid action for this widget.</p>
<p>A <a href="qwidget.html">QWidget</a> should only have one of each action.</p>
<p>See also <a href="qwidget.html#removeAction">removeAction</a>(), <a href="qwidget.html#addAction">addAction</a>(), <a href="qmenu.html">QMenu</a>, <a href="qwidget.html#contextMenuPolicy-prop">contextMenuPolicy</a>, and <a href="qwidget.html#actions">actions</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/insertActions"></a>
<h3 class="fn"><a name="insertActions"></a>void QWidget::insertActions ( <a href="qaction.html">QAction</a> * <i>before</i>, <a href="qlist.html">QList</a>&lt;<a href="qaction.html">QAction</a> *&gt; <i>actions</i> )</h3>
<p>Inserts the actions <i>actions</i> to this widget's list of actions, before the action <i>before</i>. It appends the action if <i>before</i> is 0 or <i>before</i> is not a valid action for this widget.</p>
<p>A <a href="qwidget.html">QWidget</a> can have at most one of each action.</p>
<p>See also <a href="qwidget.html#removeAction">removeAction</a>(), <a href="qmenu.html">QMenu</a>, <a href="qwidget.html#insertAction">insertAction</a>(), and <a href="qwidget.html#contextMenuPolicy-prop">contextMenuPolicy</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/isAncestorOf"></a>
<h3 class="fn"><a name="isAncestorOf"></a>bool QWidget::isAncestorOf ( const QWidget * <i>child</i> ) const</h3>
<p>Returns true if this widget is a parent, (or grandparent and so on to any level), of the given <i>child</i>, and both widgets are within the same window; otherwise returns false.</p>
<a name="//apple_ref/cpp/instm/QWidget/isEnabledTo"></a>
<h3 class="fn"><a name="isEnabledTo"></a>bool QWidget::isEnabledTo ( QWidget * <i>ancestor</i> ) const</h3>
<p>Returns true if this widget would become enabled if <i>ancestor</i> is enabled; otherwise returns false.</p>
<p>This is the case if neither the widget itself nor every parent up to but excluding <i>ancestor</i> has been explicitly disabled.</p>
<p>isEnabledTo(0) is equivalent to <a href="qwidget.html#enabled-prop">isEnabled</a>().</p>
<p>See also <a href="qwidget.html#enabled-prop">setEnabled</a>() and <a href="qwidget.html#enabled-prop">enabled</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/isHidden"></a>
<h3 class="fn"><a name="isHidden"></a>bool QWidget::isHidden () const</h3>
<p>Returns true if the widget is hidden, otherwise returns false.</p>
<p>A hidden widget will only become visible when <a href="qwidget.html#show">show</a>() is called on it. It will not be automatically shown when the parent is shown.</p>
<p>To check visiblity, use !<a href="qwidget.html#visible-prop">isVisible</a>() instead (notice the exclamation mark).</p>
<p>isHidden() implies !<a href="qwidget.html#visible-prop">isVisible</a>(), but a widget can be not visible and not hidden at the same time. This is the case for widgets that are children of widgets that are not visible.</p>
<p>Widgets are hidden if:</p>
<ul>
<li>they were created as independent windows,</li>
<li>they were created as children of visible widgets,</li>
<li><a href="qwidget.html#hide">hide</a>() or setVisible(false) was called.</li>
</ul>
<a name="//apple_ref/cpp/instm/QWidget/isVisibleTo"></a>
<h3 class="fn"><a name="isVisibleTo"></a>bool QWidget::isVisibleTo ( QWidget * <i>ancestor</i> ) const</h3>
<p>Returns true if this widget would become visible if <i>ancestor</i> is shown; otherwise returns false.</p>
<p>The true case occurs if neither the widget itself nor any parent up to but excluding <i>ancestor</i> has been explicitly hidden.</p>
<p>This function will still return true if the widget is obscured by other windows on the screen, but could be physically visible if it or they were to be moved.</p>
<p>isVisibleTo(0) is identical to <a href="qwidget.html#visible-prop">isVisible</a>().</p>
<p>See also <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), and <a href="qwidget.html#visible-prop">isVisible</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/isWindow"></a>
<h3 class="fn"><a name="isWindow"></a>bool QWidget::isWindow () const</h3>
<p>Returns true if the widget is an independent window, otherwise returns false.</p>
<p>A window is a widget that isn't visually the child of any other widget and that usually has a frame and a <a href="qwidget.html#windowTitle-prop">window title</a>.</p>
<p>A window can have a <a href="qwidget.html#parentWidget">parent widget</a>. It will then be grouped with its parent and deleted when the parent is deleted, minimized when the parent is minimized etc. If supported by the window manager, it will also have a common taskbar entry with its parent.</p>
<p><a href="qdialog.html">QDialog</a> and <a href="qmainwindow.html">QMainWindow</a> widgets are by default windows, even if a parent widget is specified in the constructor. This behavior is specified by the <a href="qt.html#WindowType-enum">Qt::Window</a> flag.</p>
<p>See also <a href="qwidget.html#window">window</a>(), <a href="qwidget.html#modal-prop">isModal</a>(), and <a href="qwidget.html#parentWidget">parentWidget</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/keyPressEvent"></a>
<h3 class="fn"><a name="keyPressEvent"></a>void QWidget::keyPressEvent ( <a href="qkeyevent.html">QKeyEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented in a subclass to receive key press events for the widget.</p>
<p>A widget must call <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>() to accept focus initially and have focus in order to receive a key press event.</p>
<p>If you reimplement this handler, it is very important that you call the base class implementation if you do not act upon the key.</p>
<p>The default implementation closes popup widgets if the user presses Esc. Otherwise the event is ignored, so that the widget's parent can interpret it.</p>
<p>Note that <a href="qkeyevent.html">QKeyEvent</a> starts with isAccepted() == true, so you do not need to call <a href="qevent.html#accept">QKeyEvent::accept</a>() - just do not call the base class implementation if you act upon the key.</p>
<p>See also <a href="qwidget.html#keyReleaseEvent">keyReleaseEvent</a>(), <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>(), <a href="qwidget.html#focusInEvent">focusInEvent</a>(), <a href="qwidget.html#focusOutEvent">focusOutEvent</a>(), <a href="qwidget.html#event">event</a>(), <a href="qkeyevent.html">QKeyEvent</a>, and <a href="widgets-tetrix.html">Tetrix Example</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/keyReleaseEvent"></a>
<h3 class="fn"><a name="keyReleaseEvent"></a>void QWidget::keyReleaseEvent ( <a href="qkeyevent.html">QKeyEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented in a subclass to receive key release events for the widget.</p>
<p>A widget must <a href="qwidget.html#focusPolicy-prop">accept focus</a> initially and <a href="qwidget.html#focus-prop">have focus</a> in order to receive a key release event.</p>
<p>If you reimplement this handler, it is very important that you call the base class implementation if you do not act upon the key.</p>
<p>The default implementation ignores the event, so that the widget's parent can interpret it.</p>
<p>Note that <a href="qkeyevent.html">QKeyEvent</a> starts with isAccepted() == true, so you do not need to call <a href="qevent.html#accept">QKeyEvent::accept</a>() - just do not call the base class implementation if you act upon the key.</p>
<p>See also <a href="qwidget.html#keyPressEvent">keyPressEvent</a>(), <a href="qevent.html#ignore">QKeyEvent::ignore</a>(), <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>(), <a href="qwidget.html#focusInEvent">focusInEvent</a>(), <a href="qwidget.html#focusOutEvent">focusOutEvent</a>(), <a href="qwidget.html#event">event</a>(), and <a href="qkeyevent.html">QKeyEvent</a>.</p>
<a name="//apple_ref/cpp/clm/QWidget/keyboardGrabber"></a>
<h3 class="fn"><a name="keyboardGrabber"></a>QWidget * QWidget::keyboardGrabber ()&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Returns the widget that is currently grabbing the keyboard input.</p>
<p>If no widget in this application is currently grabbing the keyboard, 0 is returned.</p>
<p>See also <a href="qwidget.html#grabMouse">grabMouse</a>() and <a href="qwidget.html#mouseGrabber">mouseGrabber</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/layout"></a>
<h3 class="fn"><a name="layout"></a><a href="qlayout.html">QLayout</a> * QWidget::layout () const</h3>
<p>Returns the layout manager that is installed on this widget, or 0 if no layout manager is installed.</p>
<p>The layout manager sets the geometry of the widget's children that have been added to the layout.</p>
<p>See also <a href="qwidget.html#setLayout">setLayout</a>(), <a href="qwidget.html#sizePolicy-prop">sizePolicy</a>(), and <a href="layout.html">Layout Management</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/leaveEvent"></a>
<h3 class="fn"><a name="leaveEvent"></a>void QWidget::leaveEvent ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler can be reimplemented in a subclass to receive widget leave events which are passed in the <i>event</i> parameter.</p>
<p>A leave event is sent to the widget when the mouse cursor leaves the widget.</p>
<p>See also <a href="qwidget.html#enterEvent">enterEvent</a>(), <a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>(), and <a href="qwidget.html#event">event</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/lower"></a>
<h3 class="fn"><a name="lower"></a>void QWidget::lower ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Lowers the widget to the bottom of the parent widget's stack.</p>
<p>After this call the widget will be visually behind (and therefore obscured by) any overlapping sibling widgets.</p>
<p>See also <a href="qwidget.html#raise">raise</a>() and <a href="qwidget.html#stackUnder">stackUnder</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/macCGHandle"></a>
<h3 class="fn"><a name="macCGHandle"></a><a href="qt.html#HANDLE-typedef">Qt::HANDLE</a> QWidget::macCGHandle () const</h3>
<p>Returns the CoreGraphics handle of the widget. Use of this function is not portable. This function will return 0 if no painter context can be established, or if the handle could not be created.</p>
<p><b>Warning:</b> This function is only available on Mac OS X.</p>
<a name="//apple_ref/cpp/instm/QWidget/macEvent"></a>
<h3 class="fn"><a name="macEvent"></a>bool QWidget::macEvent ( EventHandlerCallRef <i>caller</i>, EventRef <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This special event handler can be reimplemented in a subclass to receive native Macintosh events.</p>
<p>The parameters are a bit different depending if Qt is build against Carbon or Cocoa. In Carbon, <i>caller</i> and <i>event</i> are the corresponding EventHandlerCallRef and EventRef that correspond to the Carbon event handlers that are installed. In Cocoa, <i>caller</i> is always 0 and the EventRef is the EventRef generated from the NSEvent.</p>
<p>In your reimplementation of this function, if you want to stop the event being handled by Qt, return true. If you return false, this native event is passed back to Qt, which translates the event into a Qt event and sends it to the widget.</p>
<p><b>Warning:</b> This function is not portable.</p>
<p><b>Warning:</b> This function was not called inside of Qt until Qt 4.4&#x2e; If you need compatibility with earlier versions of Qt, consider <a href="qapplication.html#macEventFilter">QApplication::macEventFilter</a>() instead.</p>
<p>See also <a href="qapplication.html#macEventFilter">QApplication::macEventFilter</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/macQDHandle"></a>
<h3 class="fn"><a name="macQDHandle"></a><a href="qt.html#HANDLE-typedef">Qt::HANDLE</a> QWidget::macQDHandle () const</h3>
<p>Returns the QuickDraw handle of the widget. Use of this function is not portable. This function will return 0 if QuickDraw is not supported, or if the handle could not be created.</p>
<p><b>Warning:</b> This function is only available on Mac OS X.</p>
<a name="//apple_ref/cpp/instm/QWidget/mapFrom"></a>
<h3 class="fn"><a name="mapFrom"></a><a href="qpoint.html">QPoint</a> QWidget::mapFrom ( QWidget * <i>parent</i>, const <a href="qpoint.html">QPoint</a> &amp; <i>pos</i> ) const</h3>
<p>Translates the widget coordinate <i>pos</i> from the coordinate system of <i>parent</i> to this widget's coordinate system. The <i>parent</i> must not be 0 and must be a parent of the calling widget.</p>
<p>See also <a href="qwidget.html#mapTo">mapTo</a>(), <a href="qwidget.html#mapFromParent">mapFromParent</a>(), <a href="qwidget.html#mapFromGlobal">mapFromGlobal</a>(), and <a href="qwidget.html#underMouse">underMouse</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/mapFromGlobal"></a>
<h3 class="fn"><a name="mapFromGlobal"></a><a href="qpoint.html">QPoint</a> QWidget::mapFromGlobal ( const <a href="qpoint.html">QPoint</a> &amp; <i>pos</i> ) const</h3>
<p>Translates the global screen coordinate <i>pos</i> to widget coordinates.</p>
<p>See also <a href="qwidget.html#mapToGlobal">mapToGlobal</a>(), <a href="qwidget.html#mapFrom">mapFrom</a>(), and <a href="qwidget.html#mapFromParent">mapFromParent</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/mapFromParent"></a>
<h3 class="fn"><a name="mapFromParent"></a><a href="qpoint.html">QPoint</a> QWidget::mapFromParent ( const <a href="qpoint.html">QPoint</a> &amp; <i>pos</i> ) const</h3>
<p>Translates the parent widget coordinate <i>pos</i> to widget coordinates.</p>
<p>Same as <a href="qwidget.html#mapFromGlobal">mapFromGlobal</a>() if the widget has no parent.</p>
<p>See also <a href="qwidget.html#mapToParent">mapToParent</a>(), <a href="qwidget.html#mapFrom">mapFrom</a>(), <a href="qwidget.html#mapFromGlobal">mapFromGlobal</a>(), and <a href="qwidget.html#underMouse">underMouse</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/mapTo"></a>
<h3 class="fn"><a name="mapTo"></a><a href="qpoint.html">QPoint</a> QWidget::mapTo ( QWidget * <i>parent</i>, const <a href="qpoint.html">QPoint</a> &amp; <i>pos</i> ) const</h3>
<p>Translates the widget coordinate <i>pos</i> to the coordinate system of <i>parent</i>. The <i>parent</i> must not be 0 and must be a parent of the calling widget.</p>
<p>See also <a href="qwidget.html#mapFrom">mapFrom</a>(), <a href="qwidget.html#mapToParent">mapToParent</a>(), <a href="qwidget.html#mapToGlobal">mapToGlobal</a>(), and <a href="qwidget.html#underMouse">underMouse</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/mapToGlobal"></a>
<h3 class="fn"><a name="mapToGlobal"></a><a href="qpoint.html">QPoint</a> QWidget::mapToGlobal ( const <a href="qpoint.html">QPoint</a> &amp; <i>pos</i> ) const</h3>
<p>Translates the widget coordinate <i>pos</i> to global screen coordinates. For example, <tt>mapToGlobal(QPoint(0,0))</tt> would give the global coordinates of the top-left pixel of the widget.</p>
<p>See also <a href="qwidget.html#mapFromGlobal">mapFromGlobal</a>(), <a href="qwidget.html#mapTo">mapTo</a>(), and <a href="qwidget.html#mapToParent">mapToParent</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/mapToParent"></a>
<h3 class="fn"><a name="mapToParent"></a><a href="qpoint.html">QPoint</a> QWidget::mapToParent ( const <a href="qpoint.html">QPoint</a> &amp; <i>pos</i> ) const</h3>
<p>Translates the widget coordinate <i>pos</i> to a coordinate in the parent widget.</p>
<p>Same as <a href="qwidget.html#mapToGlobal">mapToGlobal</a>() if the widget has no parent.</p>
<p>See also <a href="qwidget.html#mapFromParent">mapFromParent</a>(), <a href="qwidget.html#mapTo">mapTo</a>(), <a href="qwidget.html#mapToGlobal">mapToGlobal</a>(), and <a href="qwidget.html#underMouse">underMouse</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/mask"></a>
<h3 class="fn"><a name="mask"></a><a href="qregion.html">QRegion</a> QWidget::mask () const</h3>
<p>Returns the mask currently set on a widget. If no mask is set the return value will be an empty region.</p>
<p>See also <a href="qwidget.html#setMask">setMask</a>(), <a href="qwidget.html#clearMask">clearMask</a>(), <a href="qregion.html#isEmpty">QRegion::isEmpty</a>(), and <a href="widgets-shapedclock.html">Shaped Clock Example</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/metric"></a>
<h3 class="fn"><a name="metric"></a>int QWidget::metric ( <a href="qpaintdevice.html#PaintDeviceMetric-enum">PaintDeviceMetric</a> <i>m</i> ) const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qpaintdevice.html#metric">QPaintDevice::metric</a>().</p>
<p>Internal implementation of the virtual <a href="qpaintdevice.html#metric">QPaintDevice::metric</a>() function.</p>
<p><i>m</i> is the metric to get.</p>
<a name="//apple_ref/cpp/instm/QWidget/mouseDoubleClickEvent"></a>
<h3 class="fn"><a name="mouseDoubleClickEvent"></a>void QWidget::mouseDoubleClickEvent ( <a href="qmouseevent.html">QMouseEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented in a subclass to receive mouse double click events for the widget.</p>
<p>The default implementation generates a normal mouse press event.</p>
<p><b>Note:</b> The widget will also receive mouse press and mouse release events in addition to the double click event. It is up to the developer to ensure that the application interprets these events correctly.</p>
<p>See also <a href="qwidget.html#mousePressEvent">mousePressEvent</a>(), <a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>(), <a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>(), <a href="qwidget.html#event">event</a>(), and <a href="qmouseevent.html">QMouseEvent</a>.</p>
<a name="//apple_ref/cpp/clm/QWidget/mouseGrabber"></a>
<h3 class="fn"><a name="mouseGrabber"></a>QWidget * QWidget::mouseGrabber ()&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Returns the widget that is currently grabbing the mouse input.</p>
<p>If no widget in this application is currently grabbing the mouse, 0 is returned.</p>
<p>See also <a href="qwidget.html#grabMouse">grabMouse</a>() and <a href="qwidget.html#keyboardGrabber">keyboardGrabber</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/mouseMoveEvent"></a>
<h3 class="fn"><a name="mouseMoveEvent"></a>void QWidget::mouseMoveEvent ( <a href="qmouseevent.html">QMouseEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented in a subclass to receive mouse move events for the widget.</p>
<p>If mouse tracking is switched off, mouse move events only occur if a mouse button is pressed while the mouse is being moved. If mouse tracking is switched on, mouse move events occur even if no mouse button is pressed.</p>
<p><a href="qmouseevent.html#pos">QMouseEvent::pos</a>() reports the position of the mouse cursor, relative to this widget. For press and release events, the position is usually the same as the position of the last mouse move event, but it might be different if the user's hand shakes. This is a feature of the underlying window system, not Qt.</p>
<p>If you want to show a tooltip immediately, while the mouse is moving (e.g&#x2e;, to get the mouse coordinates with <a href="qmouseevent.html#pos">QMouseEvent::pos</a>() and show them as a tooltip), you must first enable mouse tracking as described above. Then, to ensure that the tooltip is updated immediately, you must call <a href="qtooltip.html#showText">QToolTip::showText</a>() instead of <a href="qwidget.html#toolTip-prop">setToolTip</a>() in your implementation of mouseMoveEvent().</p>
<p>See also <a href="qwidget.html#mouseTracking-prop">setMouseTracking</a>(), <a href="qwidget.html#mousePressEvent">mousePressEvent</a>(), <a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>(), <a href="qwidget.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a>(), <a href="qwidget.html#event">event</a>(), <a href="qmouseevent.html">QMouseEvent</a>, and <a href="widgets-scribble.html">Scribble Example</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/mousePressEvent"></a>
<h3 class="fn"><a name="mousePressEvent"></a>void QWidget::mousePressEvent ( <a href="qmouseevent.html">QMouseEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented in a subclass to receive mouse press events for the widget.</p>
<p>If you create new widgets in the mousePressEvent() the <a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>() may not end up where you expect, depending on the underlying window system (or X11 window manager), the widgets' location and maybe more.</p>
<p>The default implementation implements the closing of popup widgets when you click outside the window. For other widget types it does nothing.</p>
<p>See also <a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>(), <a href="qwidget.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a>(), <a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>(), <a href="qwidget.html#event">event</a>(), <a href="qmouseevent.html">QMouseEvent</a>, and <a href="widgets-scribble.html">Scribble Example</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/mouseReleaseEvent"></a>
<h3 class="fn"><a name="mouseReleaseEvent"></a>void QWidget::mouseReleaseEvent ( <a href="qmouseevent.html">QMouseEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented in a subclass to receive mouse release events for the widget.</p>
<p>See also <a href="qwidget.html#mousePressEvent">mousePressEvent</a>(), <a href="qwidget.html#mouseDoubleClickEvent">mouseDoubleClickEvent</a>(), <a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>(), <a href="qwidget.html#event">event</a>(), <a href="qmouseevent.html">QMouseEvent</a>, and <a href="widgets-scribble.html">Scribble Example</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/moveEvent"></a>
<h3 class="fn"><a name="moveEvent"></a>void QWidget::moveEvent ( <a href="qmoveevent.html">QMoveEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler can be reimplemented in a subclass to receive widget move events which are passed in the <i>event</i> parameter. When the widget receives this event, it is already at the new position.</p>
<p>The old position is accessible through <a href="qmoveevent.html#oldPos">QMoveEvent::oldPos</a>().</p>
<p>See also <a href="qwidget.html#resizeEvent">resizeEvent</a>(), <a href="qwidget.html#event">event</a>(), <a href="qwidget.html#pos-prop">move</a>(), and <a href="qmoveevent.html">QMoveEvent</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/nativeParentWidget"></a>
<h3 class="fn"><a name="nativeParentWidget"></a>QWidget * QWidget::nativeParentWidget () const</h3>
<p>Returns the native parent for this widget, i.e&#x2e; the next ancestor widget that has a system identifier, or 0 if it does not have any native parent.</p>
<p>This function was introduced in Qt 4.4.</p>
<p>See also <a href="qwidget.html#effectiveWinId">effectiveWinId</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/nextInFocusChain"></a>
<h3 class="fn"><a name="nextInFocusChain"></a>QWidget * QWidget::nextInFocusChain () const</h3>
<p>Returns the next widget in this widget's focus chain.</p>
<p>See also <a href="qwidget.html#previousInFocusChain">previousInFocusChain</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/overrideWindowFlags"></a>
<h3 class="fn"><a name="overrideWindowFlags"></a>void QWidget::overrideWindowFlags ( <a href="qt.html#WindowType-enum">Qt::WindowFlags</a> <i>flags</i> )</h3>
<p>Sets the window flags for the widget to <i>flags</i>, <i>without</i> telling the window system.</p>
<p><b>Warning:</b> Do not call this function unless you really know what you're doing.</p>
<p>See also <a href="qwidget.html#windowFlags-prop">setWindowFlags</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/paintEngine"></a>
<h3 class="fn"><a name="paintEngine"></a><a href="qpaintengine.html">QPaintEngine</a> * QWidget::paintEngine () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qpaintdevice.html#paintEngine">QPaintDevice::paintEngine</a>().</p>
<p>Returns the widget's paint engine.</p>
<p>Note that this function should not be called explicitly by the user, since it's meant for reimplementation purposes only. The function is called by Qt internally, and the default implementation may not always return a valid pointer.</p>
<a name="//apple_ref/cpp/instm/QWidget/paintEvent"></a>
<h3 class="fn"><a name="paintEvent"></a>void QWidget::paintEvent ( <a href="qpaintevent.html">QPaintEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler can be reimplemented in a subclass to receive paint events passed in <i>event</i>.</p>
<p>A paint event is a request to repaint all or part of a widget. It can happen for one of the following reasons:</p>
<ul>
<li><a href="qwidget.html#repaint">repaint</a>() or <a href="qwidget.html#update">update</a>() was invoked,</li>
<li>the widget was obscured and has now been uncovered, or</li>
<li>many other reasons.</li>
</ul>
<p>Many widgets can simply repaint their entire surface when asked to, but some slow widgets need to optimize by painting only the requested region: <a href="qpaintevent.html#region">QPaintEvent::region</a>(). This speed optimization does not change the result, as painting is clipped to that region during event processing. <a href="qlistview.html">QListView</a> and <a href="qtableview.html">QTableView</a> do this, for example.</p>
<p>Qt also tries to speed up painting by merging multiple paint events into one. When <a href="qwidget.html#update">update</a>() is called several times or the window system sends several paint events, Qt merges these events into one event with a larger region (see <a href="qregion.html#united">QRegion::united</a>()). The <a href="qwidget.html#repaint">repaint</a>() function does not permit this optimization, so we suggest using <a href="qwidget.html#update">update</a>() whenever possible.</p>
<p>When the paint event occurs, the update region has normally been erased, so you are painting on the widget's background.</p>
<p>The background can be set using <a href="qwidget.html#setBackgroundRole">setBackgroundRole</a>() and <a href="qwidget.html#palette-prop">setPalette</a>().</p>
<p>Since Qt 4.0, <a href="qwidget.html">QWidget</a> automatically double-buffers its painting, so there is no need to write double-buffering code in paintEvent() to avoid flicker.</p>
<p><b>Note for the X11 platform</b>: It is possible to toggle global double buffering by calling <tt>qt_x11_set_global_double_buffer()</tt>. For example,</p>
<pre> ...
 extern void qt_x11_set_global_double_buffer(bool);
 qt_x11_set_global_double_buffer(false);
 ...</pre>
<p><b>Note:</b> Generally, you should refrain from calling <a href="qwidget.html#update">update</a>() or <a href="qwidget.html#repaint">repaint</a>() <b>inside</b> a paintEvent(). For example, calling <a href="qwidget.html#update">update</a>() or <a href="qwidget.html#repaint">repaint</a>() on children inside a paintevent() results in undefined behavior; the child may or may not get a paint event.</p>
<p><b>Warning:</b> If you are using a custom paint engine without Qt's backingstore, <a href="qt.html#WidgetAttribute-enum">Qt::WA_PaintOnScreen</a> must be set. Otherwise, <a href="qwidget.html#paintEngine">QWidget::paintEngine</a>() will never be called; the backingstore will be used instead.</p>
<p>See also <a href="qwidget.html#event">event</a>(), <a href="qwidget.html#repaint">repaint</a>(), <a href="qwidget.html#update">update</a>(), <a href="qpainter.html">QPainter</a>, <a href="qpixmap.html">QPixmap</a>, <a href="qpaintevent.html">QPaintEvent</a>, and <a href="widgets-analogclock.html">Analog Clock Example</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/parentWidget"></a>
<h3 class="fn"><a name="parentWidget"></a>QWidget * QWidget::parentWidget () const</h3>
<p>Returns the parent of this widget, or 0 if it does not have any parent widget.</p>
<a name="//apple_ref/cpp/instm/QWidget/previousInFocusChain"></a>
<h3 class="fn"><a name="previousInFocusChain"></a>QWidget * QWidget::previousInFocusChain () const</h3>
<p>The previousInFocusChain function returns the previous widget in this widget's focus chain.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qwidget.html#nextInFocusChain">nextInFocusChain</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/qwsEvent"></a>
<h3 class="fn"><a name="qwsEvent"></a>bool QWidget::qwsEvent ( <a href="qwsevent.html">QWSEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This special event handler can be reimplemented in a subclass to receive native Qt for Embedded Linux events which are passed in the <i>event</i> parameter.</p>
<p>In your reimplementation of this function, if you want to stop the event being handled by Qt, return true. If you return false, this native event is passed back to Qt, which translates the event into a Qt event and sends it to the widget.</p>
<p><b>Warning:</b> This function is not portable.</p>
<p>See also <a href="qapplication.html#qwsEventFilter">QApplication::qwsEventFilter</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/raise"></a>
<h3 class="fn"><a name="raise"></a>void QWidget::raise ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Raises this widget to the top of the parent widget's stack.</p>
<p>After this call the widget will be visually in front of any overlapping sibling widgets.</p>
<p><b>Note:</b> When using <a href="qwidget.html#activateWindow">activateWindow</a>(), you can call this function to ensure that the window is stacked on top.</p>
<p>See also <a href="qwidget.html#lower">lower</a>() and <a href="qwidget.html#stackUnder">stackUnder</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/releaseDC"></a>
<h3 class="fn"><a name="releaseDC"></a>void QWidget::releaseDC ( HDC <i>hdc</i> ) const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Releases the HDC <i>hdc</i> acquired by a previous call to <a href="qwidget.html#getDC">getDC</a>().</p>
<p><b>Warning:</b> Using this function is not portable.</p>
<a name="//apple_ref/cpp/instm/QWidget/releaseKeyboard"></a>
<h3 class="fn"><a name="releaseKeyboard"></a>void QWidget::releaseKeyboard ()</h3>
<p>Releases the keyboard grab.</p>
<p>See also <a href="qwidget.html#grabKeyboard">grabKeyboard</a>(), <a href="qwidget.html#grabMouse">grabMouse</a>(), and <a href="qwidget.html#releaseMouse">releaseMouse</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/releaseMouse"></a>
<h3 class="fn"><a name="releaseMouse"></a>void QWidget::releaseMouse ()</h3>
<p>Releases the mouse grab.</p>
<p>See also <a href="qwidget.html#grabMouse">grabMouse</a>(), <a href="qwidget.html#grabKeyboard">grabKeyboard</a>(), and <a href="qwidget.html#releaseKeyboard">releaseKeyboard</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/releaseShortcut"></a>
<h3 class="fn"><a name="releaseShortcut"></a>void QWidget::releaseShortcut ( int <i>id</i> )</h3>
<p>Removes the shortcut with the given <i>id</i> from Qt's shortcut system. The widget will no longer receive <a href="qevent.html#Type-enum">QEvent::Shortcut</a> events for the shortcut's key sequence (unless it has other shortcuts with the same key sequence).</p>
<p><b>Warning:</b> You should not normally need to use this function since Qt's shortcut system removes shortcuts automatically when their parent widget is destroyed. It is best to use <a href="qaction.html">QAction</a> or <a href="qshortcut.html">QShortcut</a> to handle shortcuts, since they are easier to use than this low-level function. Note also that this is an expensive operation.</p>
<p>See also <a href="qwidget.html#grabShortcut">grabShortcut</a>() and <a href="qwidget.html#setShortcutEnabled">setShortcutEnabled</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/removeAction"></a>
<h3 class="fn"><a name="removeAction"></a>void QWidget::removeAction ( <a href="qaction.html">QAction</a> * <i>action</i> )</h3>
<p>Removes the action <i>action</i> from this widget's list of actions.</p>
<p>See also <a href="qwidget.html#insertAction">insertAction</a>(), <a href="qwidget.html#actions">actions</a>(), and <a href="qwidget.html#insertAction">insertAction</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/render"></a>
<h3 class="fn"><a name="render"></a>void QWidget::render ( <a href="qpaintdevice.html">QPaintDevice</a> * <i>target</i>, const <a href="qpoint.html">QPoint</a> &amp; <i>targetOffset</i> = QPoint(), const <a href="qregion.html">QRegion</a> &amp; <i>sourceRegion</i> = QRegion(), <a href="qwidget.html#RenderFlag-enum">RenderFlags</a> <i>renderFlags</i> = RenderFlags( DrawWindowBackground | DrawChildren ) )</h3>
<p>Renders the <i>sourceRegion</i> of this widget into the <i>target</i> using <i>renderFlags</i> to determine how to render. Rendering starts at <i>targetOffset</i> in the <i>target</i>. For example:</p>
<pre> QPixmap pixmap(widget-&gt;size());
 widget-&gt;render(&amp;pixmap);</pre>
<p>If <i>sourceRegion</i> is a null region, this function will use <a href="qwidget.html#rect-prop">QWidget::rect</a>() as the region, i.e&#x2e; the entire widget.</p>
<p>Ensure that you call <a href="qpainter.html#end">QPainter::end</a>() for the <i>target</i> device's active painter (if any) before rendering. For example:</p>
<pre> QPainter painter(this);
 ...
 painter.end();
 myWidget-&gt;render(this);</pre>
<p><b>Note:</b> To obtain the contents of an OpenGL widget, use <a href="qglwidget.html#grabFrameBuffer">QGLWidget::grabFrameBuffer</a>() or <a href="qglwidget.html#renderPixmap">QGLWidget::renderPixmap</a>() instead.</p>
<p>This function was introduced in Qt 4.3.</p>
<h3 class="fn"><a name="render-2"></a>void QWidget::render ( <a href="qpainter.html">QPainter</a> * <i>painter</i>, const <a href="qpoint.html">QPoint</a> &amp; <i>targetOffset</i> = QPoint(), const <a href="qregion.html">QRegion</a> &amp; <i>sourceRegion</i> = QRegion(), <a href="qwidget.html#RenderFlag-enum">RenderFlags</a> <i>renderFlags</i> = RenderFlags( DrawWindowBackground | DrawChildren ) )</h3>
<p>This is an overloaded function.</p>
<p>Renders the widget into the <i>painter</i>'s <a href="qpainter.html#device">QPainter::device</a>().</p>
<p>Transformations and settings applied to the <i>painter</i> will be used when rendering.</p>
<p><b>Note:</b> The <i>painter</i> must be active. On Mac OS X the widget will be rendered into a <a href="qpixmap.html">QPixmap</a> and then drawn by the <i>painter</i>.</p>
<p>See also <a href="qpainter.html#device">QPainter::device</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/repaint"></a>
<h3 class="fn"><a name="repaint"></a>void QWidget::repaint ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Repaints the widget directly by calling <a href="qwidget.html#paintEvent">paintEvent</a>() immediately, unless updates are disabled or the widget is hidden.</p>
<p>We suggest only using repaint() if you need an immediate repaint, for example during animation. In almost all circumstances <a href="qwidget.html#update">update</a>() is better, as it permits Qt to optimize for speed and minimize flicker.</p>
<p><b>Warning:</b> If you call repaint() in a function which may itself be called from <a href="qwidget.html#paintEvent">paintEvent</a>(), you may get infinite recursion. The <a href="qwidget.html#update">update</a>() function never causes recursion.</p>
<p>See also <a href="qwidget.html#update">update</a>(), <a href="qwidget.html#paintEvent">paintEvent</a>(), and <a href="qwidget.html#updatesEnabled-prop">setUpdatesEnabled</a>().</p>
<h3 class="fn"><a name="repaint-6"></a>void QWidget::repaint ( int <i>x</i>, int <i>y</i>, int <i>w</i>, int <i>h</i> )</h3>
<p>This is an overloaded function.</p>
<p>This version repaints a rectangle (<i>x</i>, <i>y</i>, <i>w</i>, <i>h</i>) inside the widget.</p>
<p>If <i>w</i> is negative, it is replaced with <tt>width() - x</tt>, and if <i>h</i> is negative, it is replaced width <tt>height() - y</tt>.</p>
<h3 class="fn"><a name="repaint-7"></a>void QWidget::repaint ( const <a href="qrect.html">QRect</a> &amp; <i>rect</i> )</h3>
<p>This is an overloaded function.</p>
<p>This version repaints a rectangle <i>rect</i> inside the widget.</p>
<h3 class="fn"><a name="repaint-8"></a>void QWidget::repaint ( const <a href="qregion.html">QRegion</a> &amp; <i>rgn</i> )</h3>
<p>This is an overloaded function.</p>
<p>This version repaints a region <i>rgn</i> inside the widget.</p>
<a name="//apple_ref/cpp/instm/QWidget/resizeEvent"></a>
<h3 class="fn"><a name="resizeEvent"></a>void QWidget::resizeEvent ( <a href="qresizeevent.html">QResizeEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler can be reimplemented in a subclass to receive widget resize events which are passed in the <i>event</i> parameter. When resizeEvent() is called, the widget already has its new geometry. The old size is accessible through <a href="qresizeevent.html#oldSize">QResizeEvent::oldSize</a>().</p>
<p>The widget will be erased and receive a paint event immediately after processing the resize event. No drawing need be (or should be) done inside this handler.</p>
<p>See also <a href="qwidget.html#moveEvent">moveEvent</a>(), <a href="qwidget.html#event">event</a>(), <a href="qwidget.html#size-prop">resize</a>(), <a href="qresizeevent.html">QResizeEvent</a>, <a href="qwidget.html#paintEvent">paintEvent</a>(), and <a href="widgets-scribble.html">Scribble Example</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/restoreGeometry"></a>
<h3 class="fn"><a name="restoreGeometry"></a>bool QWidget::restoreGeometry ( const <a href="qbytearray.html">QByteArray</a> &amp; <i>geometry</i> )</h3>
<p>Restores the geometry and state top-level widgets stored in the byte array <i>geometry</i>. Returns true on success; otherwise returns false.</p>
<p>If the restored geometry is off-screen, it will be modified to be inside the available screen geometry.</p>
<p>To restore geometry saved using <a href="qsettings.html">QSettings</a>, you can use code like this:</p>
<pre> QSettings settings(&quot;MyCompany&quot;, &quot;MyApp&quot;);
 myWidget-&gt;restoreGeometry(settings.value(&quot;myWidget/geometry&quot;).toByteArray());</pre>
<p>See the <a href="application-windows.html#window-geometry">Window Geometry</a> documentation for an overview of geometry issues with windows.</p>
<p>Use <a href="qmainwindow.html#restoreState">QMainWindow::restoreState</a>() to restore the geometry and the state of toolbars and dock widgets.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qwidget.html#saveGeometry">saveGeometry</a>(), <a href="qsettings.html">QSettings</a>, <a href="qmainwindow.html#saveState">QMainWindow::saveState</a>(), and <a href="qmainwindow.html#restoreState">QMainWindow::restoreState</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/saveGeometry"></a>
<h3 class="fn"><a name="saveGeometry"></a><a href="qbytearray.html">QByteArray</a> QWidget::saveGeometry () const</h3>
<p>Saves the current geometry and state for top-level widgets.</p>
<p>To save the geometry when the window closes, you can implement a close event like this:</p>
<pre> void MyWidget::closeEvent(QCloseEvent *event)
 {
     QSettings settings(&quot;MyCompany&quot;, &quot;MyApp&quot;);
     settings.setValue(&quot;geometry&quot;, saveGeometry());
     QWidget::closeEvent(event);
 }</pre>
<p>See the <a href="application-windows.html#window-geometry">Window Geometry</a> documentation for an overview of geometry issues with windows.</p>
<p>Use <a href="qmainwindow.html#saveState">QMainWindow::saveState</a>() to save the geometry and the state of toolbars and dock widgets.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qwidget.html#restoreGeometry">restoreGeometry</a>(), <a href="qmainwindow.html#saveState">QMainWindow::saveState</a>(), and <a href="qmainwindow.html#restoreState">QMainWindow::restoreState</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/scroll"></a>
<h3 class="fn"><a name="scroll"></a>void QWidget::scroll ( int <i>dx</i>, int <i>dy</i> )</h3>
<p>Scrolls the widget including its children <i>dx</i> pixels to the right and <i>dy</i> downward. Both <i>dx</i> and <i>dy</i> may be negative.</p>
<p>After scrolling, the widgets will receive paint events for the areas that need to be repainted. For widgets that Qt knows to be opaque, this is only the newly exposed parts. For example, if an opaque widget is scrolled 8 pixels to the left, only an 8-pixel wide stripe at the right edge needs updating.</p>
<p>Since widgets propagate the contents of their parents by default, you need to set the <a href="qwidget.html#autoFillBackground-prop">autoFillBackground</a> property, or use <a href="qwidget.html#setAttribute">setAttribute</a>() to set the <a href="qt.html#WidgetAttribute-enum">Qt::WA_OpaquePaintEvent</a> attribute, to make a widget opaque.</p>
<p>For widgets that use contents propagation, a scroll will cause an update of the entire scroll area.</p>
<p>See also <a href="qwidget.html#transparency-and-double-buffering">Transparency and Double Buffering</a>.</p>
<h3 class="fn"><a name="scroll-2"></a>void QWidget::scroll ( int <i>dx</i>, int <i>dy</i>, const <a href="qrect.html">QRect</a> &amp; <i>r</i> )</h3>
<p>This is an overloaded function.</p>
<p>This version only scrolls <i>r</i> and does not move the children of the widget.</p>
<p>If <i>r</i> is empty or invalid, the result is undefined.</p>
<p>See also <a href="qscrollarea.html">QScrollArea</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/setAttribute"></a>
<h3 class="fn"><a name="setAttribute"></a>void QWidget::setAttribute ( <a href="qt.html#WidgetAttribute-enum">Qt::WidgetAttribute</a> <i>attribute</i>, bool <i>on</i> = true )</h3>
<p>Sets the attribute <i>attribute</i> on this widget if <i>on</i> is true; otherwise clears the attribute.</p>
<p>See also <a href="qwidget.html#testAttribute">testAttribute</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/setBackgroundRole"></a>
<h3 class="fn"><a name="setBackgroundRole"></a>void QWidget::setBackgroundRole ( <a href="qpalette.html#ColorRole-enum">QPalette::ColorRole</a> <i>role</i> )</h3>
<p>Sets the background role of the widget to <i>role</i>.</p>
<p>The background role defines the brush from the widget's <a href="qwidget.html#palette-prop">palette</a> that is used to render the background.</p>
<p>If <i>role</i> is <a href="qpalette.html#ColorRole-enum">QPalette::NoRole</a>, then the widget inherits its parent's background role.</p>
<p>Note that styles are free to choose any color from the palette. You can modify the palette or set a style sheet if you don't achieve the result you want with setBackgroundRole().</p>
<p>See also <a href="qwidget.html#backgroundRole">backgroundRole</a>() and <a href="qwidget.html#foregroundRole">foregroundRole</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/setContentsMargins"></a>
<h3 class="fn"><a name="setContentsMargins"></a>void QWidget::setContentsMargins ( int <i>left</i>, int <i>top</i>, int <i>right</i>, int <i>bottom</i> )</h3>
<p>Sets the margins around the contents of the widget to have the sizes <i>left</i>, <i>top</i>, <i>right</i>, and <i>bottom</i>. The margins are used by the layout system, and may be used by subclasses to specify the area to draw in (e.g&#x2e; excluding the frame).</p>
<p>Changing the margins will trigger a <a href="qwidget.html#resizeEvent">resizeEvent</a>().</p>
<p>See also <a href="qwidget.html#contentsMargins">contentsMargins</a>(), <a href="qwidget.html#contentsRect">contentsRect</a>(), and <a href="qwidget.html#getContentsMargins">getContentsMargins</a>().</p>
<h3 class="fn"><a name="setContentsMargins-2"></a>void QWidget::setContentsMargins ( const <a href="qmargins.html">QMargins</a> &amp; <i>margins</i> )</h3>
<p>This is an overloaded function.</p>
<p>The setContentsMargins function sets the margins around the widget's contents.</p>
<p>Sets the margins around the contents of the widget to have the sizes determined by <i>margins</i>. The margins are used by the layout system, and may be used by subclasses to specify the area to draw in (e.g&#x2e; excluding the frame).</p>
<p>Changing the margins will trigger a <a href="qwidget.html#resizeEvent">resizeEvent</a>().</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qwidget.html#contentsRect">contentsRect</a>() and <a href="qwidget.html#getContentsMargins">getContentsMargins</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/setDisabled"></a>
<h3 class="fn"><a name="setDisabled"></a>void QWidget::setDisabled ( bool <i>disable</i> )&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Disables widget input events if <i>disable</i> is true; otherwise enables input events.</p>
<p>See the <a href="qwidget.html#enabled-prop">enabled</a> documentation for more information.</p>
<p>See also <a href="qwidget.html#isEnabledTo">isEnabledTo</a>(), <a href="qkeyevent.html">QKeyEvent</a>, <a href="qmouseevent.html">QMouseEvent</a>, and <a href="qwidget.html#changeEvent">changeEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/setEditFocus"></a>
<h3 class="fn"><a name="setEditFocus"></a>void QWidget::setEditFocus ( bool <i>enable</i> )</h3>
<p>If <i>enable</i> is true, make this widget have edit focus, in which case <a href="qt.html#Key-enum">Qt::Key_Up</a> and <a href="qt.html#Key-enum">Qt::Key_Down</a> will be delivered to the widget normally; otherwise, <a href="qt.html#Key-enum">Qt::Key_Up</a> and <a href="qt.html#Key-enum">Qt::Key_Down</a> are used to change focus.</p>
<p>This feature is only available in Qt for Embedded Linux and Qt for Symbian.</p>
<p>See also <a href="qwidget.html#hasEditFocus">hasEditFocus</a>() and <a href="qapplication.html#keypadNavigationEnabled">QApplication::keypadNavigationEnabled</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/setFixedHeight"></a>
<h3 class="fn"><a name="setFixedHeight"></a>void QWidget::setFixedHeight ( int <i>h</i> )</h3>
<p>Sets both the minimum and maximum heights of the widget to <i>h</i> without changing the widths. Provided for convenience.</p>
<p>See also <a href="qwidget.html#sizeHint-prop">sizeHint</a>(), <a href="qwidget.html#minimumSize-prop">minimumSize</a>(), <a href="qwidget.html#maximumSize-prop">maximumSize</a>(), and <a href="qwidget.html#setFixedSize">setFixedSize</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/setFixedSize"></a>
<h3 class="fn"><a name="setFixedSize"></a>void QWidget::setFixedSize ( const <a href="qsize.html">QSize</a> &amp; <i>s</i> )</h3>
<p>Sets both the minimum and maximum sizes of the widget to <i>s</i>, thereby preventing it from ever growing or shrinking.</p>
<p>This will override the default size constraints set by <a href="qlayout.html">QLayout</a>.</p>
<p>To remove constraints, set the size to <a href="qwidget.html#QWIDGETSIZE_MAX">QWIDGETSIZE_MAX</a>.</p>
<p>Alternatively, if you want the widget to have a fixed size based on its contents, you can call QLayout::setSizeConstraint(<a href="qlayout.html#SizeConstraint-enum">QLayout::SetFixedSize</a>);</p>
<p>See also <a href="qwidget.html#maximumSize-prop">maximumSize</a> and <a href="qwidget.html#minimumSize-prop">minimumSize</a>.</p>
<h3 class="fn"><a name="setFixedSize-2"></a>void QWidget::setFixedSize ( int <i>w</i>, int <i>h</i> )</h3>
<p>This is an overloaded function.</p>
<p>Sets the width of the widget to <i>w</i> and the height to <i>h</i>.</p>
<a name="//apple_ref/cpp/instm/QWidget/setFixedWidth"></a>
<h3 class="fn"><a name="setFixedWidth"></a>void QWidget::setFixedWidth ( int <i>w</i> )</h3>
<p>Sets both the minimum and maximum width of the widget to <i>w</i> without changing the heights. Provided for convenience.</p>
<p>See also <a href="qwidget.html#sizeHint-prop">sizeHint</a>(), <a href="qwidget.html#minimumSize-prop">minimumSize</a>(), <a href="qwidget.html#maximumSize-prop">maximumSize</a>(), and <a href="qwidget.html#setFixedSize">setFixedSize</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/setFocus"></a>
<h3 class="fn"><a name="setFocus"></a>void QWidget::setFocus ( <a href="qt.html#FocusReason-enum">Qt::FocusReason</a> <i>reason</i> )</h3>
<p>Gives the keyboard input focus to this widget (or its focus proxy) if this widget or one of its parents is the <a href="qwidget.html#isActiveWindow-prop">active window</a>. The <i>reason</i> argument will be passed into any focus event sent from this function, it is used to give an explanation of what caused the widget to get focus. If the window is not active, the widget will be given the focus when the window becomes active.</p>
<p>First, a focus out event is sent to the focus widget (if any) to tell it that it is about to lose the focus. Then a focus in event is sent to this widget to tell it that it just received the focus. (Nothing happens if the focus in and focus out widgets are the same.)</p>
<p><b>Note:</b> On embedded platforms, setFocus() will not cause an input panel to be opened by the input method. If you want this to happen, you have to send a <a href="qevent.html#Type-enum">QEvent::RequestSoftwareInputPanel</a> event to the widget yourself.</p>
<p>setFocus() gives focus to a widget regardless of its focus policy, but does not clear any keyboard grab (see <a href="qwidget.html#grabKeyboard">grabKeyboard</a>()).</p>
<p>Be aware that if the widget is hidden, it will not accept focus until it is shown.</p>
<p><b>Warning:</b> If you call setFocus() in a function which may itself be called from <a href="qwidget.html#focusOutEvent">focusOutEvent</a>() or <a href="qwidget.html#focusInEvent">focusInEvent</a>(), you may get an infinite recursion.</p>
<p>See also <a href="qwidget.html#focus-prop">hasFocus</a>(), <a href="qwidget.html#clearFocus">clearFocus</a>(), <a href="qwidget.html#focusInEvent">focusInEvent</a>(), <a href="qwidget.html#focusOutEvent">focusOutEvent</a>(), <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>(), <a href="qwidget.html#focusWidget">focusWidget</a>(), <a href="qapplication.html#focusWidget">QApplication::focusWidget</a>(), <a href="qwidget.html#grabKeyboard">grabKeyboard</a>(), <a href="qwidget.html#grabMouse">grabMouse</a>(), <a href="focus.html">Keyboard Focus</a>, and <a href="qevent.html#Type-enum">QEvent::RequestSoftwareInputPanel</a>.</p>
<h3 class="fn"><a name="setFocus-2"></a>void QWidget::setFocus ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>This is an overloaded function.</p>
<p>Gives the keyboard input focus to this widget (or its focus proxy) if this widget or one of its parents is the <a href="qwidget.html#isActiveWindow-prop">active window</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/setFocusProxy"></a>
<h3 class="fn"><a name="setFocusProxy"></a>void QWidget::setFocusProxy ( QWidget * <i>w</i> )</h3>
<p>Sets the widget's focus proxy to widget <i>w</i>. If <i>w</i> is 0, the function resets this widget to have no focus proxy.</p>
<p>Some widgets can &quot;have focus&quot;, but create a child widget, such as <a href="qlineedit.html">QLineEdit</a>, to actually handle the focus. In this case, the widget can set the line edit to be its focus proxy.</p>
<p>setFocusProxy() sets the widget which will actually get focus when &quot;this widget&quot; gets it. If there is a focus proxy, <a href="qwidget.html#setFocus">setFocus</a>() and <a href="qwidget.html#focus-prop">hasFocus</a>() operate on the focus proxy.</p>
<p>See also <a href="qwidget.html#focusProxy">focusProxy</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/setForegroundRole"></a>
<h3 class="fn"><a name="setForegroundRole"></a>void QWidget::setForegroundRole ( <a href="qpalette.html#ColorRole-enum">QPalette::ColorRole</a> <i>role</i> )</h3>
<p>Sets the foreground role of the widget to <i>role</i>.</p>
<p>The foreground role defines the color from the widget's <a href="qwidget.html#palette-prop">palette</a> that is used to draw the foreground.</p>
<p>If <i>role</i> is <a href="qpalette.html#ColorRole-enum">QPalette::NoRole</a>, the widget uses a foreground role that contrasts with the background role.</p>
<p>Note that styles are free to choose any color from the palette. You can modify the palette or set a style sheet if you don't achieve the result you want with setForegroundRole().</p>
<p>See also <a href="qwidget.html#foregroundRole">foregroundRole</a>() and <a href="qwidget.html#backgroundRole">backgroundRole</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/setGraphicsEffect"></a>
<h3 class="fn"><a name="setGraphicsEffect"></a>void QWidget::setGraphicsEffect ( <a href="qgraphicseffect.html">QGraphicsEffect</a> * <i>effect</i> )</h3>
<p>The setGraphicsEffect function is for setting the widget's graphics effect.</p>
<p>Sets <i>effect</i> as the widget's effect. If there already is an effect installed on this widget, <a href="qwidget.html">QWidget</a> will delete the existing effect before installing the new <i>effect</i>.</p>
<p>If <i>effect</i> is the installed on a different widget, setGraphicsEffect() will remove the effect from the widget and install it on this widget.</p>
<p><a href="qwidget.html">QWidget</a> takes ownership of <i>effect</i>.</p>
<p><b>Note:</b> This function will apply the effect on itself and all its children.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qwidget.html#graphicsEffect">graphicsEffect</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/setHidden"></a>
<h3 class="fn"><a name="setHidden"></a>void QWidget::setHidden ( bool <i>hidden</i> )&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Convenience function, equivalent to setVisible(!<i>hidden</i>).</p>
<p>See also <a href="qwidget.html#isHidden">isHidden</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/setInputContext"></a>
<h3 class="fn"><a name="setInputContext"></a>void QWidget::setInputContext ( <a href="qinputcontext.html">QInputContext</a> * <i>context</i> )</h3>
<p>This function sets the input context <i>context</i> on this widget.</p>
<p>See also <a href="qwidget.html#inputContext">inputContext</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/setLayout"></a>
<h3 class="fn"><a name="setLayout"></a>void QWidget::setLayout ( <a href="qlayout.html">QLayout</a> * <i>layout</i> )</h3>
<p>Sets the layout manager for this widget to <i>layout</i>.</p>
<p>If there already is a layout manager installed on this widget, <a href="qwidget.html">QWidget</a> won't let you install another. You must first delete the existing layout manager (returned by <a href="qwidget.html#layout">layout</a>()) before you can call setLayout() with the new layout.</p>
<p>If <i>layout</i> is the layout manger on a different widget, setLayout() will reparent the layout and make it the layout manager for this widget.</p>
<p>Example:</p>
<pre>     QVBoxLayout *layout = new QVBoxLayout;
     layout-&gt;addWidget(formWidget);
     setLayout(layout);</pre>
<p>An alternative to calling this function is to pass this widget to the layout's constructor.</p>
<p>The <a href="qwidget.html">QWidget</a> will take ownership of <i>layout</i>.</p>
<p>See also <a href="qwidget.html#layout">layout</a>() and <a href="layout.html">Layout Management</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/setMask"></a>
<h3 class="fn"><a name="setMask"></a>void QWidget::setMask ( const <a href="qbitmap.html">QBitmap</a> &amp; <i>bitmap</i> )</h3>
<p>Causes only the pixels of the widget for which <i>bitmap</i> has a corresponding 1 bit to be visible. If the region includes pixels outside the <a href="qwidget.html#rect-prop">rect</a>() of the widget, window system controls in that area may or may not be visible, depending on the platform.</p>
<p>Note that this effect can be slow if the region is particularly complex.</p>
<p>The following code shows how an image with an alpha channel can be used to generate a mask for a widget:</p>
<pre>     QLabel topLevelLabel;
     QPixmap pixmap(&quot;:/images/tux.png&quot;);
     topLevelLabel.setPixmap(pixmap);
     topLevelLabel.setMask(pixmap.mask());</pre>
<p>The label shown by this code is masked using the image it contains, giving the appearance that an irregularly-shaped image is being drawn directly onto the screen.</p>
<p>Masked widgets receive mouse events only on their visible portions.</p>
<p>See also <a href="qwidget.html#mask">mask</a>(), <a href="qwidget.html#clearMask">clearMask</a>(), <a href="qwidget.html#windowOpacity-prop">windowOpacity</a>(), and <a href="widgets-shapedclock.html">Shaped Clock Example</a>.</p>
<h3 class="fn"><a name="setMask-2"></a>void QWidget::setMask ( const <a href="qregion.html">QRegion</a> &amp; <i>region</i> )</h3>
<p>This is an overloaded function.</p>
<p>Causes only the parts of the widget which overlap <i>region</i> to be visible. If the region includes pixels outside the <a href="qwidget.html#rect-prop">rect</a>() of the widget, window system controls in that area may or may not be visible, depending on the platform.</p>
<p>Note that this effect can be slow if the region is particularly complex.</p>
<p>See also <a href="qwidget.html#windowOpacity-prop">windowOpacity</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/setParent"></a>
<h3 class="fn"><a name="setParent"></a>void QWidget::setParent ( QWidget * <i>parent</i> )</h3>
<p>Sets the parent of the widget to <i>parent</i>, and resets the window flags. The widget is moved to position (0, 0) in its new parent.</p>
<p>If the new parent widget is in a different window, the reparented widget and its children are appended to the end of the <a href="qwidget.html#focusPolicy-prop">tab chain</a> of the new parent widget, in the same internal order as before. If one of the moved widgets had keyboard focus, setParent() calls <a href="qwidget.html#clearFocus">clearFocus</a>() for that widget.</p>
<p>If the new parent widget is in the same window as the old parent, setting the parent doesn't change the tab order or keyboard focus.</p>
<p>If the &quot;new&quot; parent widget is the old parent widget, this function does nothing.</p>
<p><b>Note:</b> The widget becomes invisible as part of changing its parent, even if it was previously visible. You must call <a href="qwidget.html#show">show</a>() to make the widget visible again.</p>
<p><b>Warning:</b> It is very unlikely that you will ever need this function. If you have a widget that changes its content dynamically, it is far easier to use <a href="qstackedwidget.html">QStackedWidget</a>.</p>
<p>See also <a href="qwidget.html#windowFlags-prop">setWindowFlags</a>().</p>
<h3 class="fn"><a name="setParent-2"></a>void QWidget::setParent ( QWidget * <i>parent</i>, <a href="qt.html#WindowType-enum">Qt::WindowFlags</a> <i>f</i> )</h3>
<p>This is an overloaded function.</p>
<p>This function also takes widget flags, <i>f</i> as an argument.</p>
<a name="//apple_ref/cpp/instm/QWidget/setShortcutAutoRepeat"></a>
<h3 class="fn"><a name="setShortcutAutoRepeat"></a>void QWidget::setShortcutAutoRepeat ( int <i>id</i>, bool <i>enable</i> = true )</h3>
<p>If <i>enable</i> is true, auto repeat of the shortcut with the given <i>id</i> is enabled; otherwise it is disabled.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qwidget.html#grabShortcut">grabShortcut</a>() and <a href="qwidget.html#releaseShortcut">releaseShortcut</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/setShortcutEnabled"></a>
<h3 class="fn"><a name="setShortcutEnabled"></a>void QWidget::setShortcutEnabled ( int <i>id</i>, bool <i>enable</i> = true )</h3>
<p>If <i>enable</i> is true, the shortcut with the given <i>id</i> is enabled; otherwise the shortcut is disabled.</p>
<p><b>Warning:</b> You should not normally need to use this function since Qt's shortcut system enables/disables shortcuts automatically as widgets become hidden/visible and gain or lose focus. It is best to use <a href="qaction.html">QAction</a> or <a href="qshortcut.html">QShortcut</a> to handle shortcuts, since they are easier to use than this low-level function.</p>
<p>See also <a href="qwidget.html#grabShortcut">grabShortcut</a>() and <a href="qwidget.html#releaseShortcut">releaseShortcut</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/setStyle"></a>
<h3 class="fn"><a name="setStyle"></a>void QWidget::setStyle ( <a href="qstyle.html">QStyle</a> * <i>style</i> )</h3>
<p>Sets the widget's GUI style to <i>style</i>. The ownership of the style object is not transferred.</p>
<p>If no style is set, the widget uses the application's style, <a href="qapplication.html#style">QApplication::style</a>() instead.</p>
<p>Setting a widget's style has no effect on existing or future child widgets.</p>
<p><b>Warning:</b> This function is particularly useful for demonstration purposes, where you want to show Qt's styling capabilities. Real applications should avoid it and use one consistent GUI style instead.</p>
<p><b>Warning:</b> Qt style sheets are currently not supported for custom <a href="qstyle.html">QStyle</a> subclasses. We plan to address this in some future release.</p>
<p>See also <a href="qwidget.html#style">style</a>(), <a href="qstyle.html">QStyle</a>, <a href="qapplication.html#style">QApplication::style</a>(), and <a href="qapplication.html#setStyle">QApplication::setStyle</a>().</p>
<a name="//apple_ref/cpp/clm/QWidget/setTabOrder"></a>
<h3 class="fn"><a name="setTabOrder"></a>void QWidget::setTabOrder ( QWidget * <i>first</i>, QWidget * <i>second</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Puts the <i>second</i> widget after the <i>first</i> widget in the focus order.</p>
<p>Note that since the tab order of the <i>second</i> widget is changed, you should order a chain like this:</p>
<pre> setTabOrder(a, b); <span class="comment">// a to b</span>
 setTabOrder(b, c); <span class="comment">// a to b to c</span>
 setTabOrder(c, d); <span class="comment">// a to b to c to d</span></pre>
<p><i>not</i> like this:</p>
<pre><span class="comment"> // WRONG</span>
 setTabOrder(c, d); <span class="comment">// c to d</span>
 setTabOrder(a, b); <span class="comment">// a to b AND c to d</span>
 setTabOrder(b, c); <span class="comment">// a to b to c, but not c to d</span></pre>
<p>If <i>first</i> or <i>second</i> has a focus proxy, setTabOrder() correctly substitutes the proxy.</p>
<p>See also <a href="qwidget.html#focusPolicy-prop">setFocusPolicy</a>(), <a href="qwidget.html#setFocusProxy">setFocusProxy</a>(), and <a href="focus.html">Keyboard Focus</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/setWindowRole"></a>
<h3 class="fn"><a name="setWindowRole"></a>void QWidget::setWindowRole ( const <a href="qstring.html">QString</a> &amp; <i>role</i> )</h3>
<p>Sets the window's role to <i>role</i>. This only makes sense for windows on X11.</p>
<p>See also <a href="qwidget.html#windowRole">windowRole</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/setWindowState"></a>
<h3 class="fn"><a name="setWindowState"></a>void QWidget::setWindowState ( <a href="qt.html#WindowState-enum">Qt::WindowStates</a> <i>windowState</i> )</h3>
<p>Sets the window state to <i>windowState</i>. The window state is a OR'ed combination of <a href="qt.html#WindowState-enum">Qt::WindowState</a>: <a href="qt.html#WindowState-enum">Qt::WindowMinimized</a>, <a href="qt.html#WindowState-enum">Qt::WindowMaximized</a>, <a href="qt.html#WindowState-enum">Qt::WindowFullScreen</a>, and <a href="qt.html#WindowState-enum">Qt::WindowActive</a>.</p>
<p>If the window is not visible (i.e&#x2e; <a href="qwidget.html#visible-prop">isVisible</a>() returns false), the window state will take effect when <a href="qwidget.html#show">show</a>() is called. For visible windows, the change is immediate. For example, to toggle between full-screen and normal mode, use the following code:</p>
<pre> w-&gt;setWindowState(w-&gt;windowState() ^ Qt::WindowFullScreen);</pre>
<p>In order to restore and activate a minimized window (while preserving its maximized and/or full-screen state), use the following:</p>
<pre> w-&gt;setWindowState(w-&gt;windowState() &amp; ~Qt::WindowMinimized | Qt::WindowActive);</pre>
<p>Calling this function will hide the widget. You must call <a href="qwidget.html#show">show</a>() to make the widget visible again.</p>
<p><b>Note:</b> On some window systems <a href="qt.html#WindowState-enum">Qt::WindowActive</a> is not immediate, and may be ignored in certain cases.</p>
<p>When the window state changes, the widget receives a <a href="qwidget.html#changeEvent">changeEvent</a>() of type <a href="qevent.html#Type-enum">QEvent::WindowStateChange</a>.</p>
<p>See also <a href="qt.html#WindowState-enum">Qt::WindowState</a> and <a href="qwidget.html#windowState">windowState</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/setWindowSurface"></a>
<h3 class="fn"><a name="setWindowSurface"></a>void QWidget::setWindowSurface ( QWindowSurface * <i>surface</i> )</h3>
<p><b>This function is under development and is subject to change.</b></p>
<p>Sets the window surface to be the <i>surface</i> specified. The <a href="qwidget.html">QWidget</a> takes will ownership of the <i>surface</i>. widget itself is deleted.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qwidget.html#windowSurface">windowSurface</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/setupUi"></a>
<h3 class="fn"><a name="setupUi"></a>void QWidget::setupUi ( QWidget * <i>widget</i> )</h3>
<p>Sets up the user interface for the specified <i>widget</i>.</p>
<p><b>Note:</b> This function is available with widgets that derive from user interface descriptions created using <a href="uic.html#uic">uic</a>.</p>
<p>See also <a href="designer-using-a-ui-file.html">Using a Designer UI File in Your Application</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/show"></a>
<h3 class="fn"><a name="show"></a>void QWidget::show ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Shows the widget and its child widgets. This function is equivalent to setVisible(true).</p>
<p>See also <a href="qwidget.html#raise">raise</a>(), <a href="qwidget.html#showEvent">showEvent</a>(), <a href="qwidget.html#hide">hide</a>(), <a href="qwidget.html#visible-prop">setVisible</a>(), <a href="qwidget.html#showMinimized">showMinimized</a>(), <a href="qwidget.html#showMaximized">showMaximized</a>(), <a href="qwidget.html#showNormal">showNormal</a>(), and <a href="qwidget.html#visible-prop">isVisible</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/showEvent"></a>
<h3 class="fn"><a name="showEvent"></a>void QWidget::showEvent ( <a href="qshowevent.html">QShowEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler can be reimplemented in a subclass to receive widget show events which are passed in the <i>event</i> parameter.</p>
<p>Non-spontaneous show events are sent to widgets immediately before they are shown. The spontaneous show events of windows are delivered afterwards.</p>
<p>Note: A widget receives spontaneous show and hide events when its mapping status is changed by the window system, e.g&#x2e; a spontaneous hide event when the user minimizes the window, and a spontaneous show event when the window is restored again. After receiving a spontaneous hide event, a widget is still considered visible in the sense of <a href="qwidget.html#visible-prop">isVisible</a>().</p>
<p>See also <a href="qwidget.html#visible-prop">visible</a>, <a href="qwidget.html#event">event</a>(), and <a href="qshowevent.html">QShowEvent</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/showFullScreen"></a>
<h3 class="fn"><a name="showFullScreen"></a>void QWidget::showFullScreen ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Shows the widget in full-screen mode.</p>
<p>Calling this function only affects <a href="qwidget.html#isWindow">windows</a>.</p>
<p>To return from full-screen mode, call <a href="qwidget.html#showNormal">showNormal</a>().</p>
<p>Full-screen mode works fine under Windows, but has certain problems under X. These problems are due to limitations of the ICCCM protocol that specifies the communication between X11 clients and the window manager. ICCCM simply does not understand the concept of non-decorated full-screen windows. Therefore, the best we can do is to request a borderless window and place and resize it to fill the entire screen. Depending on the window manager, this may or may not work. The borderless window is requested using MOTIF hints, which are at least partially supported by virtually all modern window managers.</p>
<p>An alternative would be to bypass the window manager entirely and create a window with the <a href="qt.html#WindowType-enum">Qt::X11BypassWindowManagerHint</a> flag. This has other severe problems though, like totally broken keyboard focus and very strange effects on desktop changes or when the user raises other windows.</p>
<p>X11 window managers that follow modern post-ICCCM specifications support full-screen mode properly.</p>
<p>See also <a href="qwidget.html#showNormal">showNormal</a>(), <a href="qwidget.html#showMaximized">showMaximized</a>(), <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), and <a href="qwidget.html#visible-prop">isVisible</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/showMaximized"></a>
<h3 class="fn"><a name="showMaximized"></a>void QWidget::showMaximized ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Shows the widget maximized.</p>
<p>Calling this function only affects <a href="qwidget.html#isWindow">windows</a>.</p>
<p>On X11, this function may not work properly with certain window managers. See the <a href="application-windows.html#window-geometry">Window Geometry</a> documentation for an explanation.</p>
<p>See also <a href="qwidget.html#setWindowState">setWindowState</a>(), <a href="qwidget.html#showNormal">showNormal</a>(), <a href="qwidget.html#showMinimized">showMinimized</a>(), <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), and <a href="qwidget.html#visible-prop">isVisible</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/showMinimized"></a>
<h3 class="fn"><a name="showMinimized"></a>void QWidget::showMinimized ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Shows the widget minimized, as an icon.</p>
<p>Calling this function only affects <a href="qwidget.html#isWindow">windows</a>.</p>
<p>See also <a href="qwidget.html#showNormal">showNormal</a>(), <a href="qwidget.html#showMaximized">showMaximized</a>(), <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), <a href="qwidget.html#visible-prop">isVisible</a>(), and <a href="qwidget.html#minimized-prop">isMinimized</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/showNormal"></a>
<h3 class="fn"><a name="showNormal"></a>void QWidget::showNormal ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Restores the widget after it has been maximized or minimized.</p>
<p>Calling this function only affects <a href="qwidget.html#isWindow">windows</a>.</p>
<p>See also <a href="qwidget.html#setWindowState">setWindowState</a>(), <a href="qwidget.html#showMinimized">showMinimized</a>(), <a href="qwidget.html#showMaximized">showMaximized</a>(), <a href="qwidget.html#show">show</a>(), <a href="qwidget.html#hide">hide</a>(), and <a href="qwidget.html#visible-prop">isVisible</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/stackUnder"></a>
<h3 class="fn"><a name="stackUnder"></a>void QWidget::stackUnder ( QWidget * <i>w</i> )</h3>
<p>Places the widget under <i>w</i> in the parent widget's stack.</p>
<p>To make this work, the widget itself and <i>w</i> must be siblings.</p>
<p>See also <a href="qwidget.html#raise">raise</a>() and <a href="qwidget.html#lower">lower</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/style"></a>
<h3 class="fn"><a name="style"></a><a href="qstyle.html">QStyle</a> * QWidget::style () const</h3>
<p>See also <a href="qwidget.html#setStyle">QWidget::setStyle</a>(), <a href="qapplication.html#setStyle">QApplication::setStyle</a>(), and <a href="qapplication.html#style">QApplication::style</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/tabletEvent"></a>
<h3 class="fn"><a name="tabletEvent"></a>void QWidget::tabletEvent ( <a href="qtabletevent.html">QTabletEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented in a subclass to receive tablet events for the widget.</p>
<p>If you reimplement this handler, it is very important that you <a href="qtabletevent.html">ignore()</a> the event if you do not handle it, so that the widget's parent can interpret it.</p>
<p>The default implementation ignores the event.</p>
<p>See also <a href="qevent.html#ignore">QTabletEvent::ignore</a>(), <a href="qevent.html#accept">QTabletEvent::accept</a>(), <a href="qwidget.html#event">event</a>(), and <a href="qtabletevent.html">QTabletEvent</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/testAttribute"></a>
<h3 class="fn"><a name="testAttribute"></a>bool QWidget::testAttribute ( <a href="qt.html#WidgetAttribute-enum">Qt::WidgetAttribute</a> <i>attribute</i> ) const</h3>
<p>Returns true if attribute <i>attribute</i> is set on this widget; otherwise returns false.</p>
<p>See also <a href="qwidget.html#setAttribute">setAttribute</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/underMouse"></a>
<h3 class="fn"><a name="underMouse"></a>bool QWidget::underMouse () const</h3>
<p>Returns true if the widget is under the mouse cursor; otherwise returns false.</p>
<p>This value is not updated properly during drag and drop operations.</p>
<p>See also <a href="qwidget.html#enterEvent">enterEvent</a>() and <a href="qwidget.html#leaveEvent">leaveEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/ungrabGesture"></a>
<h3 class="fn"><a name="ungrabGesture"></a>void QWidget::ungrabGesture ( <a href="qt.html#GestureType-enum">Qt::GestureType</a> <i>gesture</i> )</h3>
<p>Unsubscribes the widget from a given <i>gesture</i> type</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qwidget.html#grabGesture">grabGesture</a>() and <a href="qgestureevent.html">QGestureEvent</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/update"></a>
<h3 class="fn"><a name="update"></a>void QWidget::update ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Updates the widget unless updates are disabled or the widget is hidden.</p>
<p>This function does not cause an immediate repaint; instead it schedules a paint event for processing when Qt returns to the main event loop. This permits Qt to optimize for more speed and less flicker than a call to <a href="qwidget.html#repaint">repaint</a>() does.</p>
<p>Calling update() several times normally results in just one <a href="qwidget.html#paintEvent">paintEvent</a>() call.</p>
<p>Qt normally erases the widget's area before the <a href="qwidget.html#paintEvent">paintEvent</a>() call. If the <a href="qt.html#WidgetAttribute-enum">Qt::WA_OpaquePaintEvent</a> widget attribute is set, the widget is responsible for painting all its pixels with an opaque color.</p>
<p>See also <a href="qwidget.html#repaint">repaint</a>(), <a href="qwidget.html#paintEvent">paintEvent</a>(), <a href="qwidget.html#updatesEnabled-prop">setUpdatesEnabled</a>(), and <a href="widgets-analogclock.html">Analog Clock Example</a>.</p>
<h3 class="fn"><a name="update-2"></a>void QWidget::update ( int <i>x</i>, int <i>y</i>, int <i>w</i>, int <i>h</i> )</h3>
<p>This is an overloaded function.</p>
<p>This version updates a rectangle (<i>x</i>, <i>y</i>, <i>w</i>, <i>h</i>) inside the widget.</p>
<h3 class="fn"><a name="update-3"></a>void QWidget::update ( const <a href="qrect.html">QRect</a> &amp; <i>rect</i> )</h3>
<p>This is an overloaded function.</p>
<p>This version updates a rectangle <i>rect</i> inside the widget.</p>
<h3 class="fn"><a name="update-4"></a>void QWidget::update ( const <a href="qregion.html">QRegion</a> &amp; <i>rgn</i> )</h3>
<p>This is an overloaded function.</p>
<p>This version repaints a region <i>rgn</i> inside the widget.</p>
<a name="//apple_ref/cpp/instm/QWidget/updateGeometry"></a>
<h3 class="fn"><a name="updateGeometry"></a>void QWidget::updateGeometry ()</h3>
<p>Notifies the layout system that this widget has changed and may need to change geometry.</p>
<p>Call this function if the <a href="qwidget.html#sizeHint-prop">sizeHint</a>() or <a href="qwidget.html#sizePolicy-prop">sizePolicy</a>() have changed.</p>
<p>For explicitly hidden widgets, updateGeometry() is a no-op. The layout system will be notified as soon as the widget is shown.</p>
<a name="//apple_ref/cpp/instm/QWidget/updateMicroFocus"></a>
<h3 class="fn"><a name="updateMicroFocus"></a>void QWidget::updateMicroFocus ()&nbsp;&nbsp;<tt> [protected slot]</tt></h3>
<p>Updates the widget's micro focus.</p>
<p>See also <a href="qinputcontext.html">QInputContext</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/visibleRegion"></a>
<h3 class="fn"><a name="visibleRegion"></a><a href="qregion.html">QRegion</a> QWidget::visibleRegion () const</h3>
<p>Returns the unobscured region where paint events can occur.</p>
<p>For visible widgets, this is an approximation of the area not covered by other widgets; otherwise, this is an empty region.</p>
<p>The <a href="qwidget.html#repaint">repaint</a>() function calls this function if necessary, so in general you do not need to call it.</p>
<a name="//apple_ref/cpp/instm/QWidget/wheelEvent"></a>
<h3 class="fn"><a name="wheelEvent"></a>void QWidget::wheelEvent ( <a href="qwheelevent.html">QWheelEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This event handler, for event <i>event</i>, can be reimplemented in a subclass to receive wheel events for the widget.</p>
<p>If you reimplement this handler, it is very important that you <a href="qwheelevent.html">ignore()</a> the event if you do not handle it, so that the widget's parent can interpret it.</p>
<p>The default implementation ignores the event.</p>
<p>See also <a href="qevent.html#ignore">QWheelEvent::ignore</a>(), <a href="qevent.html#accept">QWheelEvent::accept</a>(), <a href="qwidget.html#event">event</a>(), and <a href="qwheelevent.html">QWheelEvent</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/winEvent"></a>
<h3 class="fn"><a name="winEvent"></a>bool QWidget::winEvent ( MSG * <i>message</i>, long * <i>result</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This special event handler can be reimplemented in a subclass to receive native Windows events which are passed in the <i>message</i> parameter.</p>
<p>In your reimplementation of this function, if you want to stop the event being handled by Qt, return true and set <i>result</i> to the value that the window procedure should return. If you return false, this native event is passed back to Qt, which translates the event into a Qt event and sends it to the widget.</p>
<p><b>Warning:</b> This function is not portable.</p>
<p>See also <a href="qcoreapplication.html#winEventFilter">QApplication::winEventFilter</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/winId"></a>
<h3 class="fn"><a name="winId"></a><a href="qwidget.html#WId-typedef">WId</a> QWidget::winId () const</h3>
<p>Returns the window system identifier of the widget.</p>
<p>Portable in principle, but if you use it you are probably about to do something non-portable. Be careful.</p>
<p>If a widget is non-native (alien) and winId() is invoked on it, that widget will be provided a native handle.</p>
<p>On Mac OS X, the type returned depends on which framework Qt was linked against. If Qt is using Carbon, the {WId} is actually an HIViewRef. If Qt is using Cocoa, {WId} is a pointer to an NSView.</p>
<p>This value may change at run-time. An event with type <a href="qevent.html#Type-enum">QEvent::WinIdChange</a> will be sent to the widget following a change in window system identifier.</p>
<p>See also <a href="qwidget.html#find">find</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/window"></a>
<h3 class="fn"><a name="window"></a>QWidget * QWidget::window () const</h3>
<p>Returns the window for this widget, i.e&#x2e; the next ancestor widget that has (or could have) a window-system frame.</p>
<p>If the widget is a window, the widget itself is returned.</p>
<p>Typical usage is changing the window title:</p>
<pre> aWidget-&gt;window()-&gt;setWindowTitle(&quot;New Window Title&quot;);</pre>
<p>See also <a href="qwidget.html#isWindow">isWindow</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/windowRole"></a>
<h3 class="fn"><a name="windowRole"></a><a href="qstring.html">QString</a> QWidget::windowRole () const</h3>
<p>Returns the window's role, or an empty string.</p>
<p>See also <a href="qwidget.html#setWindowRole">setWindowRole</a>(), <a href="qwidget.html#windowIcon-prop">windowIcon</a>, and <a href="qwidget.html#windowTitle-prop">windowTitle</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/windowState"></a>
<h3 class="fn"><a name="windowState"></a><a href="qt.html#WindowState-enum">Qt::WindowStates</a> QWidget::windowState () const</h3>
<p>Returns the current window state. The window state is a OR'ed combination of <a href="qt.html#WindowState-enum">Qt::WindowState</a>: <a href="qt.html#WindowState-enum">Qt::WindowMinimized</a>, <a href="qt.html#WindowState-enum">Qt::WindowMaximized</a>, <a href="qt.html#WindowState-enum">Qt::WindowFullScreen</a>, and <a href="qt.html#WindowState-enum">Qt::WindowActive</a>.</p>
<p>See also <a href="qt.html#WindowState-enum">Qt::WindowState</a> and <a href="qwidget.html#setWindowState">setWindowState</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/windowSurface"></a>
<h3 class="fn"><a name="windowSurface"></a>QWindowSurface * QWidget::windowSurface () const</h3>
<p><b>This function is under development and is subject to change.</b></p>
<p>Returns the QWindowSurface this widget will be drawn into.</p>
<p>This function was introduced in Qt 4.2.</p>
<p>See also <a href="qwidget.html#setWindowSurface">setWindowSurface</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/windowType"></a>
<h3 class="fn"><a name="windowType"></a><a href="qt.html#WindowType-enum">Qt::WindowType</a> QWidget::windowType () const</h3>
<p>Returns the window type of this widget. This is identical to <a href="qwidget.html#windowFlags-prop">windowFlags</a>() &amp; <a href="qt.html#WindowType-enum">Qt::WindowType_Mask</a>.</p>
<p>See also <a href="qwidget.html#windowFlags-prop">windowFlags</a>.</p>
<a name="//apple_ref/cpp/instm/QWidget/x11Event"></a>
<h3 class="fn"><a name="x11Event"></a>bool QWidget::x11Event ( XEvent * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>This special event handler can be reimplemented in a subclass to receive native X11 events passed in the <i>event</i> parameter.</p>
<p>In your reimplementation of this function, if you want to stop Qt from handling the event, return true. If you return false, this native event is passed back to Qt, which translates it into a Qt event and sends it to the widget.</p>
<p><b>Note:</b> Events are only delivered to this event handler if the widget is native.</p>
<p><b>Warning:</b> This function is not portable.</p>
<p>See also <a href="qapplication.html#x11EventFilter">QApplication::x11EventFilter</a>() and <a href="qwidget.html#winId">QWidget::winId</a>().</p>
<a name="//apple_ref/cpp/instm/QWidget/x11Info"></a>
<h3 class="fn"><a name="x11Info"></a>const <a href="qx11info.html">QX11Info</a> &amp; QWidget::x11Info () const</h3>
<p>Returns information about the configuration of the X display used to display the widget.</p>
<p><b>Warning:</b> This function is only available on X11.</p>
<a name="//apple_ref/cpp/instm/QWidget/x11PictureHandle"></a>
<h3 class="fn"><a name="x11PictureHandle"></a><a href="qt.html#HANDLE-typedef">Qt::HANDLE</a> QWidget::x11PictureHandle () const</h3>
<p>Returns the X11 Picture handle of the widget for XRender support. Use of this function is not portable. This function will return 0 if XRender support is not compiled into Qt, if the XRender extension is not supported on the X11 display, or if the handle could not be created.</p>
<hr />
<h2>Related Non-Members</h2>
<a name="//apple_ref/cpp/tdef//QWidgetList"></a>
<h3 class="fn"><a name="QWidgetList-typedef"></a>typedef QWidgetList</h3>
<p>Synonym for <a href="qlist.html">QList</a>&lt;<a href="qwidget.html">QWidget</a> *&gt;.</p>
<a name="//apple_ref/cpp/tdef//WId"></a>
<h3 class="fn"><a name="WId-typedef"></a>typedef WId</h3>
<p>Platform dependent window identifier.</p>
<hr />
<h2>Macro Documentation</h2>
<a name="//apple_ref/cpp/macro//QWIDGETSIZE_MAX"></a>
<h3 class="fn"><a name="QWIDGETSIZE_MAX"></a>QWIDGETSIZE_MAX</h3>
<p>Defines the maximum size for a <a href="qwidget.html">QWidget</a> object.</p>
<p>The largest allowed size for a widget is <a href="qsize.html">QSize</a>(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX), i.e&#x2e; <a href="qsize.html">QSize</a> (16777215,16777215).</p>
<p>See also <a href="qwidget.html#maximumSize-prop">QWidget::setMaximumSize</a>().</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="40%" align="left">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="40%" align="right"><div align="right">Qt 4.6.3</div></td>
</tr></table></div></address></body>
</html>