<tdalign="right"valign="center"><imgsrc="logo32.png"align="right"width="64"height="32"border="0"></td></tr></table><h1align=center>QWidget Class Reference</h1>
<p>The QWidget class is the base class of all user interface objects.
<liclass=fn>bool <ahref="#acceptDrops-prop"><b>acceptDrops</b></a> - whether drop events are enabled for this widget</li>
<liclass=fn>bool <ahref="#autoMask-prop"><b>autoMask</b></a> - whether the auto mask feature is enabled for the widget</li>
<liclass=fn>QBrush <ahref="#backgroundBrush-prop"><b>backgroundBrush</b></a> - the widget's background brush <em>(read only)</em></li>
<liclass=fn>BackgroundMode <ahref="#backgroundMode-prop"><b>backgroundMode</b></a> - the color role used for painting the background of the widget</li>
<liclass=fn>BackgroundOrigin <ahref="#backgroundOrigin-prop"><b>backgroundOrigin</b></a> - the origin of the widget's background</li>
<liclass=fn>QSize <ahref="#baseSize-prop"><b>baseSize</b></a> - the base size of the widget</li>
<liclass=fn>QString <ahref="#caption-prop"><b>caption</b></a> - the window caption (title)</li>
<liclass=fn>QRect <ahref="#childrenRect-prop"><b>childrenRect</b></a> - the bounding rectangle of the widget's children <em>(read only)</em></li>
<liclass=fn>QRegion <ahref="#childrenRegion-prop"><b>childrenRegion</b></a> - the combined region occupied by the widget's children <em>(read only)</em></li>
<liclass=fn>QColorGroup <ahref="#colorGroup-prop"><b>colorGroup</b></a> - the current color group of the widget palette <em>(read only)</em></li>
<liclass=fn>QCursor <ahref="#cursor-prop"><b>cursor</b></a> - the cursor shape for this widget</li>
<liclass=fn>bool <ahref="#customWhatsThis-prop"><b>customWhatsThis</b></a> - whether the widget wants to handle What's This help manually <em>(read only)</em></li>
<liclass=fn>bool <ahref="#enabled-prop"><b>enabled</b></a> - whether the widget is enabled</li>
<liclass=fn>bool <ahref="#focus-prop"><b>focus</b></a> - whether this widget (or its focus proxy) has the keyboard input focus <em>(read only)</em></li>
<liclass=fn>bool <ahref="#focusEnabled-prop"><b>focusEnabled</b></a> - whether the widget accepts keyboard focus <em>(read only)</em></li>
<liclass=fn>FocusPolicy <ahref="#focusPolicy-prop"><b>focusPolicy</b></a> - the way the widget accepts keyboard focus</li>
<liclass=fn>QFont <ahref="#font-prop"><b>font</b></a> - the font currently set for the widget</li>
<liclass=fn>QRect <ahref="#frameGeometry-prop"><b>frameGeometry</b></a> - geometry of the widget relative to its parent including any window frame <em>(read only)</em></li>
<liclass=fn>QSize <ahref="#frameSize-prop"><b>frameSize</b></a> - the size of the widget including any window frame <em>(read only)</em></li>
<liclass=fn>bool <ahref="#fullScreen-prop"><b>fullScreen</b></a> - whether the widget is full screen <em>(read only)</em></li>
<liclass=fn>QRect <ahref="#geometry-prop"><b>geometry</b></a> - the geometry of the widget relative to its parent and excluding the window frame</li>
<liclass=fn>int <ahref="#height-prop"><b>height</b></a> - the height of the widget excluding any window frame <em>(read only)</em></li>
<liclass=fn>bool <ahref="#hidden-prop"><b>hidden</b></a> - whether the widget is explicitly hidden</li>
<liclass=fn>QPixmap <ahref="#icon-prop"><b>icon</b></a> - the widget's icon</li>
<liclass=fn>QString <ahref="#iconText-prop"><b>iconText</b></a> - the widget's icon text</li>
<liclass=fn>bool <ahref="#inputMethodEnabled-prop"><b>inputMethodEnabled</b></a> - enables or disables the use of input methods for this widget</li>
<liclass=fn>bool <ahref="#isActiveWindow-prop"><b>isActiveWindow</b></a> - whether this widget is the active window <em>(read only)</em></li>
<liclass=fn>bool <ahref="#isDesktop-prop"><b>isDesktop</b></a> - whether the widget is a desktop widget, i.e. represents the desktop <em>(read only)</em></li>
<liclass=fn>bool <ahref="#isDialog-prop"><b>isDialog</b></a> - whether the widget is a dialog widget <em>(read only)</em></li>
<liclass=fn>bool <ahref="#isModal-prop"><b>isModal</b></a> - whether the widget is a modal widget <em>(read only)</em></li>
<liclass=fn>bool <ahref="#isPopup-prop"><b>isPopup</b></a> - whether the widget is a popup widget <em>(read only)</em></li>
<liclass=fn>bool <ahref="#isTopLevel-prop"><b>isTopLevel</b></a> - whether the widget is a top-level widget <em>(read only)</em></li>
<liclass=fn>bool <ahref="#maximized-prop"><b>maximized</b></a> - whether this widget is maximized <em>(read only)</em></li>
<liclass=fn>int <ahref="#maximumHeight-prop"><b>maximumHeight</b></a> - the widget's maximum height</li>
<liclass=fn>QSize <ahref="#maximumSize-prop"><b>maximumSize</b></a> - the widget's maximum size</li>
<liclass=fn>int <ahref="#maximumWidth-prop"><b>maximumWidth</b></a> - the widget's maximum width</li>
<liclass=fn>QRect <ahref="#microFocusHint-prop"><b>microFocusHint</b></a> - the currently set micro focus hint for this widget <em>(read only)</em></li>
<liclass=fn>bool <ahref="#minimized-prop"><b>minimized</b></a> - whether this widget is minimized (iconified) <em>(read only)</em></li>
<liclass=fn>int <ahref="#minimumHeight-prop"><b>minimumHeight</b></a> - the widget's minimum height</li>
<liclass=fn>QSize <ahref="#minimumSize-prop"><b>minimumSize</b></a> - the widget's minimum size</li>
<liclass=fn>QSize <ahref="#minimumSizeHint-prop"><b>minimumSizeHint</b></a> - the recommended minimum size for the widget <em>(read only)</em></li>
<liclass=fn>int <ahref="#minimumWidth-prop"><b>minimumWidth</b></a> - the widget's minimum width</li>
<liclass=fn>bool <ahref="#mouseTracking-prop"><b>mouseTracking</b></a> - whether mouse tracking is enabled for the widget</li>
<liclass=fn>bool <ahref="#ownCursor-prop"><b>ownCursor</b></a> - whether the widget uses its own cursor <em>(read only)</em></li>
<liclass=fn>bool <ahref="#ownFont-prop"><b>ownFont</b></a> - whether the widget uses its own font <em>(read only)</em></li>
<liclass=fn>bool <ahref="#ownPalette-prop"><b>ownPalette</b></a> - whether the widget uses its own palette <em>(read only)</em></li>
<liclass=fn>QPalette <ahref="#palette-prop"><b>palette</b></a> - the widget's palette</li>
<liclass=fn>QColor <ahref="#paletteBackgroundColor-prop"><b>paletteBackgroundColor</b></a> - the background color of the widget</li>
<liclass=fn>QPixmap <ahref="#paletteBackgroundPixmap-prop"><b>paletteBackgroundPixmap</b></a> - the background pixmap of the widget</li>
<liclass=fn>QColor <ahref="#paletteForegroundColor-prop"><b>paletteForegroundColor</b></a> - the foreground color of the widget</li>
<liclass=fn>QPoint <ahref="#pos-prop"><b>pos</b></a> - the position of the widget within its parent widget</li>
<liclass=fn>QRect <ahref="#rect-prop"><b>rect</b></a> - the internal geometry of the widget excluding any window frame <em>(read only)</em></li>
<liclass=fn>bool <ahref="#shown-prop"><b>shown</b></a> - whether the widget is shown</li>
<liclass=fn>QSize <ahref="#size-prop"><b>size</b></a> - the size of the widget excluding any window frame</li>
<liclass=fn>QSize <ahref="#sizeHint-prop"><b>sizeHint</b></a> - the recommended size for the widget <em>(read only)</em></li>
<liclass=fn>QSize <ahref="#sizeIncrement-prop"><b>sizeIncrement</b></a> - the size increment of the widget</li>
<liclass=fn>QSizePolicy <ahref="#sizePolicy-prop"><b>sizePolicy</b></a> - the default layout behavior of the widget</li>
<liclass=fn>bool <ahref="#underMouse-prop"><b>underMouse</b></a> - whether the widget is under the mouse cursor <em>(read only)</em></li>
<liclass=fn>bool <ahref="#updatesEnabled-prop"><b>updatesEnabled</b></a> - whether updates are enabled</li>
<liclass=fn>bool <ahref="#visible-prop"><b>visible</b></a> - whether the widget is visible <em>(read only)</em></li>
<liclass=fn>QRect visibleRect - the visible rectangle <em>(read only)</em> <em>(obsolete)</em></li>
<liclass=fn>int <ahref="#width-prop"><b>width</b></a> - the width of the widget excluding any window frame <em>(read only)</em></li>
<liclass=fn>double <ahref="#windowOpacity-prop"><b>windowOpacity</b></a> - the level of opacity for the window</li>
<liclass=fn>int <ahref="#x-prop"><b>x</b></a> - the x coordinate of the widget relative to its parent including any window frame <em>(read only)</em></li>
<liclass=fn>int <ahref="#y-prop"><b>y</b></a> - the y coordinate of the widget relative to its parent and including any window frame <em>(read only)</em></li>
<p> Every widget's constructor accepts two or three standard arguments:
<oltype=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 top-level window.
If not, it will be a child of <em>parent</em>, and be constrained by <em>parent</em>'s geometry (unless you specify <ahref="qt.html#WidgetFlags-enum">WType_TopLevel</a> as
<ahref="qt.html#WidgetFlags">widget flag</a>).
<li><tt>const char *name = 0</tt> is the widget name of the new
widget. You can access it using <ahref="qobject.html#name">name</a>(). The widget name is little
used by programmers but is quite useful with GUI builders such as
<em>Qt Designer</em> (you can name a widget in <em>Qt Designer</em>, and
<ahref="qobject.html#connect">connect</a>() to it using the name in your code). The <ahref="qobject.html#dumpObjectTree">dumpObjectTree</a>()
debugging function also uses it.
<li><tt>WFlags f = 0</tt> (where available) sets the widget flags; the
default is suitable for almost all widgets, but to get, for
example, a top-level widget without a window system frame, you
must use special flags.
</ol>
<p> The tictac/tictac.cpp example program is good example of a simple
widget. It contains a few event handlers (as all widgets must), a
few custom routines that are specific to it (as all useful widgets
do), and has a few children and connections. Everything it does
is done in response to an event: this is by far the most common way
to design GUI applications.
<p> You will need to supply the content for your widgets yourself, but
here is a brief run-down of the events, starting with the most common
ones:
<p><ul>
<p><li><ahref="#paintEvent">paintEvent</a>() - called whenever the widget needs to be
repainted. Every widget which displays output must implement it,
and it is wise <em>not</em> to paint on the screen outside
paintEvent().
<p><li><ahref="#resizeEvent">resizeEvent</a>() - called when the widget has been resized.
<p><li><ahref="#mousePressEvent">mousePressEvent</a>() - called when a mouse button is pressed.
There are six mouse-related events, but the mouse press and mouse
release events are by far the most important. A widget receives
mouse press events when the mouse is inside it, or when it has
grabbed the mouse using <ahref="#grabMouse">grabMouse</a>().
<p><li><ahref="#mouseReleaseEvent">mouseReleaseEvent</a>() - called when a mouse button is released.
A widget receives mouse release events when it has received the
corresponding mouse press event. This means that if the user
presses the mouse inside <em>your</em> widget, then drags the mouse to
somewhere else, then releases, <em>your</em> 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.
<p><li><ahref="#mouseDoubleClickEvent">mouseDoubleClickEvent</a>() - not quite as obvious as it might seem.
If the user double-clicks, the widget receives a mouse press event
(perhaps a mouse move event or two if they don't hold the mouse
quite steady), a mouse release event and finally this event. It is
<em>not possible</em> to distinguish a click from a double click until you've
seen whether the second click arrives. (This is one reason why most GUI
books recommend that double clicks be an extension of single clicks,
rather than trigger a different action.)
<p></ul>
<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 <ahref="#hasMouse">hasMouse</a>() function inside the
<p> Widgets that accept keyboard input need to reimplement a few more
event handlers:
<p><ul>
<p><li><ahref="#keyPressEvent">keyPressEvent</a>() - called whenever a key is pressed, and again
when a key has been held down long enough for it to auto-repeat.
Note that the Tab and Shift+Tab keys are only passed to the widget
if they are not used by the focus-change mechanisms. To force those
keys to be processed by your widget, you must reimplement
<ahref="#event">QWidget::event</a>().
<p><li><ahref="#focusInEvent">focusInEvent</a>() - called when the widget gains keyboard focus
(assuming you have called <ahref="#setFocusPolicy">setFocusPolicy</a>()). Well written widgets
indicate that they own the keyboard focus in a clear but discreet
way.
<p><li><ahref="#focusOutEvent">focusOutEvent</a>() - called when the widget loses keyboard focus.
<p></ul>
<p> Some widgets will also need to reimplement some of the less common
event handlers:
<p><ul>
<p><li><ahref="#mouseMoveEvent">mouseMoveEvent</a>() - called whenever the mouse moves while a
button is held down. This is useful for, for example, dragging. If
you call <ahref="#setMouseTracking">setMouseTracking</a>(TRUE), you get mouse move events even
when no buttons are held down. (Note that applications which make
use of mouse tracking are often not very useful on low-bandwidth X
connections.) (See also the <ahref="dnd.html">drag and drop</a>
information.)
<p><li><ahref="#keyReleaseEvent">keyReleaseEvent</a>() - called whenever a key is released, and also
while it is held down if the key is auto-repeating. In that case
the widget receives a key release event and immediately a key press
event for every repeat. Note that the Tab and Shift+Tab keys are
only passed to the widget if they are not used by the focus-change
mechanisms. To force those keys to be processed by your widget, you
must reimplement <ahref="#event">QWidget::event</a>().
<p><li><ahref="#wheelEvent">wheelEvent</a>() -- called whenever the user turns the mouse wheel
while the widget has the focus.
<p><li><ahref="#enterEvent">enterEvent</a>() - called when the mouse enters the widget's screen
space. (This excludes screen space owned by any children of the
widget.)
<p><li><ahref="#leaveEvent">leaveEvent</a>() - called when the mouse leaves the widget's screen
space.
<p><li><ahref="#moveEvent">moveEvent</a>() - called when the widget has been moved relative to its
parent.
<p><li><ahref="#closeEvent">closeEvent</a>() - called when the user closes the widget (or when
<ahref="#close">close</a>() is called).
<p></ul>
<p> There are also some rather obscure events. They are listed in
<ahref="qevent-h.html">qevent.h</a> and you need to reimplement <ahref="#event">event</a>() to handle them.
The default implementation of event() handles Tab and Shift+Tab
(to move the keyboard focus), and passes on most other events to
one of the more specialized handlers above.
<p> When implementing a widget, there are a few more things to
consider.
<p><ul>
<p><li> In the constructor, be sure to set up your member variables
early on, before there's any chance that you might receive an event.
<p><li> It is almost always useful to reimplement <ahref="#sizeHint">sizeHint</a>() and to set
the correct size policy with <ahref="#setSizePolicy">setSizePolicy</a>(), so users of your class
can set up layout management more easily. A size policy lets you
supply good defaults for the layout management handling, so that
other widgets can contain and manage yours easily. sizeHint()
indicates a "good" size for the widget.
<p><li> If your widget is a top-level window, <ahref="#setCaption">setCaption</a>() and <ahref="#setIcon">setIcon</a>() set
the title bar and icon respectively.
<p></ul>
<p><p>See also <ahref="qevent.html">QEvent</a>, <ahref="qpainter.html">QPainter</a>, <ahref="qgridlayout.html">QGridLayout</a>, <ahref="qboxlayout.html">QBoxLayout</a>, and <ahref="abstractwidgets.html">Abstract Widget Classes</a>.
Constructs a widget which is a child of <em>parent</em>, with the name
<em>name</em> and widget flags set to <em>f</em>.
<p> If <em>parent</em> is 0, the new widget becomes a top-level window. If
<em>parent</em> is another widget, this widget becomes a child window
inside <em>parent</em>. The new widget is deleted when its <em>parent</em> is
deleted.
<p> The <em>name</em> is sent to the <ahref="qobject.html">QObject</a> constructor.
<p> The widget flags argument, <em>f</em>, is normally 0, but it can be set
to customize the window frame of a top-level widget (i.e. <em>parent</em> must be 0). To customize the frame, set the <ahref="qt.html#WidgetFlags-enum">WStyle_Customize</a> flag OR'ed with any of the <ahref="qt.html#WidgetFlags-enum">Qt::WidgetFlags</a>.
<p> If you add a child widget to an already visible widget you must
explicitly show the child to make it visible.
<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> Example:
<pre>
<ahref="qlabel.html">QLabel</a> *splashScreen = new <ahref="qlabel.html">QLabel</a>( 0, "mySplashScreen",
<p> If the widget has active focus, a <ahref="#focusOutEvent">focus out
event</a> is sent to this widget to tell it that it is about
to lose the focus.
<p> This widget must enable focus setting in order to get the keyboard
input focus, i.e. it must call <ahref="#setFocusPolicy">setFocusPolicy</a>().
<p><p>See also <ahref="#focus-prop">focus</a>, <ahref="#setFocus">setFocus</a>(), <ahref="#focusInEvent">focusInEvent</a>(), <ahref="#focusOutEvent">focusOutEvent</a>(), <ahref="#focusPolicy-prop">focusPolicy</a>, and <ahref="qapplication.html#focusWidget">QApplication::focusWidget</a>().
<p> Closes this widget. Returns TRUE if the widget was closed;
otherwise returns FALSE.
<p> First it sends the widget a <ahref="qcloseevent.html">QCloseEvent</a>. The widget is <ahref="#hide">hidden</a> if it <ahref="qcloseevent.html#accept">accepts</a> the close event. The default implementation of
<ahref="#closeEvent">QWidget::closeEvent</a>() accepts the close event.
<p> The <ahref="qapplication.html#lastWindowClosed">QApplication::lastWindowClosed</a>() signal is emitted when the
last visible top level widget is closed.
<p>
<p>Examples: <ahref="motif-dialog-example.html#x2708">dialog/mainwindow.cpp</a>, <ahref="mdi-example.html#x2076">mdi/application.cpp</a>, <ahref="popup-example.html#x1616">popup/popup.cpp</a>, and <ahref="toplevel-example.html#x2535">toplevel/options.ui.h</a>.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Closes this widget. Returns TRUE if the widget was closed;
otherwise returns FALSE.
<p> If <em>alsoDelete</em> is TRUE or the widget has the <ahref="qt.html#WidgetFlags-enum">WDestructiveClose</a> widget flag, the widget is also deleted. The
widget can prevent itself from being closed by rejecting the
<ahref="qcloseevent.html">QCloseEvent</a> it gets. A close events is delivered to the widget
no matter if the widget is visible or not.
<p> The <ahref="qapplication.html#lastWindowClosed">QApplication::lastWindowClosed</a>() signal is emitted when the
last visible top level widget is closed.
<p> Note that closing the <ahref="qapplication.html#mainWidget">QApplication::mainWidget</a>() terminates the
application.
<p><p>See also <ahref="#closeEvent">closeEvent</a>(), <ahref="qcloseevent.html">QCloseEvent</a>, <ahref="#hide">hide</a>(), <ahref="qapplication.html#quit">QApplication::quit</a>(), <ahref="qapplication.html#setMainWidget">QApplication::setMainWidget</a>(), and <ahref="qapplication.html#lastWindowClosed">QApplication::lastWindowClosed</a>().
Draws the string <em>str</em> at position <em>(x, y)</em>.
<p> The <em>y</em> position is the base line position of the text. The text
is drawn using the default font and the default foreground color.
<p> This function is provided for convenience. You will generally get
more flexible results and often higher speed by using a a <ahref="qpainter.html">painter</a> instead.
<p><p>See also <ahref="#font-prop">font</a>, <ahref="#foregroundColor">foregroundColor</a>(), and <ahref="qpainter.html#drawText">QPainter::drawText</a>().
<p> This virtual function is called from <ahref="#setEnabled">setEnabled</a>(). <em>oldEnabled</em>
is the previous setting; you can get the new setting from
<ahref="#isEnabled">isEnabled</a>().
<p> Reimplement this function if your widget needs to know when it
becomes enabled or disabled. You will almost certainly need to
update the widget using <ahref="#update">update</a>().
<p> The default implementation repaints the visible part of the
widget.
<p><p>See also <ahref="#enabled-prop">enabled</a>, <ahref="#enabled-prop">enabled</a>, <ahref="#repaint">repaint</a>(), <ahref="#update">update</a>(), and <ahref="#clipRegion">clipRegion</a>().
<p><p>See also <ahref="#setEraseColor">setEraseColor</a>(), <ahref="#setErasePixmap">setErasePixmap</a>(), and <ahref="#backgroundColor">backgroundColor</a>().
This event handler can be reimplemented in a subclass to receive
<ahref="focus.html#keyboard-focus">keyboard focus</a> events (focus received) for the widget.
<p> A widget normally must <ahref="#setFocusPolicy">setFocusPolicy</a>() to something other than
<ahref="#FocusPolicy-enum">NoFocus</a> in order to receive focus events. (Note that the
application programmer can call <ahref="#setFocus">setFocus</a>() on any widget, even
those that do not normally accept focus.)
<p> The default implementation updates the widget (except for toplevel
widgets that do not specify a <ahref="#focusPolicy">focusPolicy</a>() ). It also calls
<ahref="#setMicroFocusHint">setMicroFocusHint</a>(), hinting any system-specific input tools about
the focus of the user's attention.
<p><p>See also <ahref="#focusOutEvent">focusOutEvent</a>(), <ahref="#focusPolicy-prop">focusPolicy</a>, <ahref="#keyPressEvent">keyPressEvent</a>(), <ahref="#keyReleaseEvent">keyReleaseEvent</a>(), <ahref="#event">event</a>(), and <ahref="qfocusevent.html">QFocusEvent</a>.
This event handler can be reimplemented in a subclass to receive
<ahref="focus.html#keyboard-focus">keyboard focus</a> events (focus lost) for the widget.
<p> A widget normally must <ahref="#setFocusPolicy">setFocusPolicy</a>() to something other than
<ahref="#FocusPolicy-enum">NoFocus</a> in order to receive focus events. (Note that the
application programmer can call <ahref="#setFocus">setFocus</a>() on any widget, even
those that do not normally accept focus.)
<p> The default implementation updates the widget (except for toplevel
widgets that do not specify a <ahref="#focusPolicy">focusPolicy</a>() ). It also calls
<ahref="#setMicroFocusHint">setMicroFocusHint</a>(), hinting any system-specific input tools about
the focus of the user's attention.
<p><p>See also <ahref="#focusInEvent">focusInEvent</a>(), <ahref="#focusPolicy-prop">focusPolicy</a>, <ahref="#keyPressEvent">keyPressEvent</a>(), <ahref="#keyReleaseEvent">keyReleaseEvent</a>(), <ahref="#event">event</a>(), and <ahref="qfocusevent.html">QFocusEvent</a>.
<p> This virtual function is called from <ahref="#setFont">setFont</a>(). <em>oldFont</em> is the
previous font; you can get the new font from <ahref="#font">font</a>().
<p> Reimplement this function if your widget needs to know when its
font changes. You will almost certainly need to update the widget
using <ahref="#update">update</a>().
<p> The default implementation updates the widget including its
geometry.
<p><p>See also <ahref="#font-prop">font</a>, <ahref="#font-prop">font</a>, <ahref="#update">update</a>(), and <ahref="#updateGeometry">updateGeometry</a>().
is called; other widgets get no keyboard events at all. Mouse
events are not affected. Use <ahref="#grabMouse">grabMouse</a>() if you want to grab that.
<p> The focus widget is not affected, except that it doesn't receive
any keyboard events. <ahref="#setFocus">setFocus</a>() moves the focus as usual, but the
new focus widget receives keyboard events only after
releaseKeyboard() is called.
<p> If a different widget is currently grabbing keyboard input, that
widget's grab is released first.
<p><p>See also <ahref="#releaseKeyboard">releaseKeyboard</a>(), <ahref="#grabMouse">grabMouse</a>(), <ahref="#releaseMouse">releaseMouse</a>(), and <ahref="#focusWidget">focusWidget</a>().
<p> This widget receives all mouse events until <ahref="#releaseMouse">releaseMouse</a>() is
called; other widgets get no mouse events at all. Keyboard
events are not affected. Use <ahref="#grabKeyboard">grabKeyboard</a>() if you want to grab
that.
<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> 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> Note that only visible widgets can grab mouse input. If
<ahref="#isVisible">isVisible</a>() returns FALSE for a widget, that widget cannot call
<ahref="#grabMouse">grabMouse</a>().
<p><p>See also <ahref="#releaseMouse">releaseMouse</a>(), <ahref="#grabKeyboard">grabKeyboard</a>(), <ahref="#releaseKeyboard">releaseKeyboard</a>(), <ahref="#grabKeyboard">grabKeyboard</a>(), and <ahref="#focusWidget">focusWidget</a>().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Grabs the mouse input and changes the cursor shape.
<p> The cursor will assume shape <em>cursor</em> (for as long as the mouse
focus is grabbed) and this widget will be the only one to receive
mouse events until <ahref="#releaseMouse">releaseMouse</a>() is called().
<p><b>Warning:</b> Grabbing the mouse might lock the terminal.
<p><p>See also <ahref="#releaseMouse">releaseMouse</a>(), <ahref="#grabKeyboard">grabKeyboard</a>(), <ahref="#releaseKeyboard">releaseKeyboard</a>(), and <ahref="#cursor-prop">cursor</a>.
<p> You almost never have to reimplement this function. If you need to
do something after a widget is hidden, use <ahref="#hideEvent">hideEvent</a>() instead.
<p><p>See also <ahref="#hideEvent">hideEvent</a>(), <ahref="#hidden-prop">hidden</a>, <ahref="#show">show</a>(), <ahref="#showMinimized">showMinimized</a>(), <ahref="#visible-prop">visible</a>, and <ahref="#close">close</a>().
<p>Examples: <ahref="mdi-example.html#x2079">mdi/application.cpp</a>, <ahref="popup-example.html#x1619">popup/popup.cpp</a>, <ahref="progress-example.html#x89">progress/progress.cpp</a>, <ahref="scrollview-example.html#x658">scrollview/scrollview.cpp</a>, <ahref="qaxcontainer-example-webbrowser.html#x2516">webbrowser/mainwindow.ui.h</a>, and <ahref="xform-example.html#x1267">xform/xform.cpp</a>.
<p>Reimplemented in <ahref="qmenubar.html#hide">QMenuBar</a>.
This event handler, for event <em>e</em>, can be reimplemented in a
subclass to receive key press events for the widget.
<p> A widget must call <ahref="#setFocusPolicy">setFocusPolicy</a>() to accept focus initially and
have focus in order to receive a key press event.
<p> If you reimplement this handler, it is very important that you
explicitly <ahref="qkeyevent.html#ignore">ignore</a> the event
if you do not understand it, so that the widget's parent can
interpret it; otherwise, the event will be implicitly accepted.
Although top-level widgets are able to choose whether to accept
or ignore unknown events because they have no parent widgets that
could otherwise handle them, it is good practice to explicitly
ignore events to make widgets as reusable as possible.
<p> The default implementation closes popup widgets if the user
presses <b>Esc</b>. Otherwise the event is ignored.
<p><p>See also <ahref="#keyReleaseEvent">keyReleaseEvent</a>(), <ahref="qkeyevent.html#ignore">QKeyEvent::ignore</a>(), <ahref="#focusPolicy-prop">focusPolicy</a>, <ahref="#focusInEvent">focusInEvent</a>(), <ahref="#focusOutEvent">focusOutEvent</a>(), <ahref="#event">event</a>(), and <ahref="qkeyevent.html">QKeyEvent</a>.
This event handler, for event <em>e</em>, can be reimplemented in a
subclass to receive key release events for the widget.
<p> A widget must <ahref="#setFocusPolicy">accept focus</a>
initially and <ahref="#hasFocus">have focus</a> in order to
receive a key release event.
<p> If you reimplement this handler, it is very important that you
<ahref="qkeyevent.html">ignore()</a> the release if you do not
understand it, so that the widget's parent can interpret it.
<p> The default implementation ignores the event.
<p><p>See also <ahref="#keyPressEvent">keyPressEvent</a>(), <ahref="qkeyevent.html#ignore">QKeyEvent::ignore</a>(), <ahref="#focusPolicy-prop">focusPolicy</a>, <ahref="#focusInEvent">focusInEvent</a>(), <ahref="#focusOutEvent">focusOutEvent</a>(), <ahref="#event">event</a>(), and <ahref="qkeyevent.html">QKeyEvent</a>.
<p> Returns the layout engine that manages the geometry of this
widget's children.
<p> If the widget does not have a layout, <ahref="#layout">layout</a>() returns 0.
<p><p>See also <ahref="#sizePolicy-prop">sizePolicy</a>.
<p>Examples: <ahref="tutorial2-09.html#x2647">chart/optionsform.cpp</a> and <ahref="simple-font-demo-example.html#x2858">fonts/simple-qfont-demo/viewer.cpp</a>.
Translates the widget coordinate <em>pos</em> from the coordinate system
of <em>parent</em> to this widget's coordinate system. The <em>parent</em>
must not be 0 and must be a parent of the calling widget.
<p><p>See also <ahref="#mapTo">mapTo</a>(), <ahref="#mapFromParent">mapFromParent</a>(), <ahref="#mapFromGlobal">mapFromGlobal</a>(), and <ahref="#underMouse-prop">underMouse</a>.
Translates the parent widget coordinate <em>pos</em> to widget
coordinates.
<p> Same as <ahref="#mapFromGlobal">mapFromGlobal</a>() if the widget has no parent.
<p><p>See also <ahref="#mapToParent">mapToParent</a>(), <ahref="#mapFrom">mapFrom</a>(), <ahref="#mapFromGlobal">mapFromGlobal</a>(), and <ahref="#underMouse-prop">underMouse</a>.
Translates the widget coordinate <em>pos</em> to the coordinate system
of <em>parent</em>. The <em>parent</em> must not be 0 and must be a parent
of the calling widget.
<p><p>See also <ahref="#mapFrom">mapFrom</a>(), <ahref="#mapToParent">mapToParent</a>(), <ahref="#mapToGlobal">mapToGlobal</a>(), and <ahref="#underMouse-prop">underMouse</a>.
Translates the widget coordinate <em>pos</em> to a coordinate in the
parent widget.
<p> Same as <ahref="#mapToGlobal">mapToGlobal</a>() if the widget has no parent.
<p><p>See also <ahref="#mapFromParent">mapFromParent</a>(), <ahref="#mapTo">mapTo</a>(), <ahref="#mapToGlobal">mapToGlobal</a>(), and <ahref="#underMouse-prop">underMouse</a>.
This event handler, for event <em>e</em>, can be reimplemented in a
subclass to receive mouse double click events for the widget.
<p> The default implementation generates a normal mouse press event.
<p> Note that the widgets gets a <ahref="#mousePressEvent">mousePressEvent</a>() and a
<ahref="#mouseReleaseEvent">mouseReleaseEvent</a>() before the <ahref="#mouseDoubleClickEvent">mouseDoubleClickEvent</a>().
<p><p>See also <ahref="#mousePressEvent">mousePressEvent</a>(), <ahref="#mouseReleaseEvent">mouseReleaseEvent</a>(), <ahref="#mouseMoveEvent">mouseMoveEvent</a>(), <ahref="#event">event</a>(), and <ahref="qmouseevent.html">QMouseEvent</a>.
This event handler, for event <em>e</em>, can be reimplemented in a
subclass to receive mouse move events for the widget.
<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><ahref="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>See also <ahref="#mouseTracking-prop">mouseTracking</a>, <ahref="#mousePressEvent">mousePressEvent</a>(), <ahref="#mouseReleaseEvent">mouseReleaseEvent</a>(), <ahref="#mouseDoubleClickEvent">mouseDoubleClickEvent</a>(), <ahref="#event">event</a>(), and <ahref="qmouseevent.html">QMouseEvent</a>.
<p>Examples: <ahref="aclock-example.html#x1206">aclock/aclock.cpp</a>, <ahref="drawlines-example.html#x1658">drawlines/connect.cpp</a>, <ahref="simple_dd-example.html#x2831">iconview/simple_dd/main.cpp</a>, <ahref="life-example.html#x1896">life/life.cpp</a>, <ahref="popup-example.html#x1620">popup/popup.cpp</a>, <ahref="qmag-example.html#x1800">qmag/qmag.cpp</a>, and <ahref="scribble-example.html#x948">scribble/scribble.cpp</a>.
<p>Reimplemented in <ahref="qsizegrip.html#mouseMoveEvent">QSizeGrip</a>.
This event handler, for event <em>e</em>, can be reimplemented in a
subclass to receive mouse press events for the widget.
<p> If you create new widgets in the <ahref="#mousePressEvent">mousePressEvent</a>() the
<ahref="#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> 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 <ahref="#mouseReleaseEvent">mouseReleaseEvent</a>(), <ahref="#mouseDoubleClickEvent">mouseDoubleClickEvent</a>(), <ahref="#mouseMoveEvent">mouseMoveEvent</a>(), <ahref="#event">event</a>(), and <ahref="qmouseevent.html">QMouseEvent</a>.
<p>Examples: <ahref="biff-example.html#x1960">biff/biff.cpp</a>, <ahref="drawlines-example.html#x1659">drawlines/connect.cpp</a>, <ahref="simple_dd-example.html#x2832">iconview/simple_dd/main.cpp</a>, <ahref="life-example.html#x1897">life/life.cpp</a>, <ahref="qmag-example.html#x1801">qmag/qmag.cpp</a>, <ahref="scribble-example.html#x949">scribble/scribble.cpp</a>, and <ahref="tooltip-example.html#x452">tooltip/tooltip.cpp</a>.
<p>Reimplemented in <ahref="qsizegrip.html#mousePressEvent">QSizeGrip</a>.
This event handler, for event <em>e</em>, can be reimplemented in a
subclass to receive mouse release events for the widget.
<p><p>See also <ahref="#mouseDoubleClickEvent">mouseDoubleClickEvent</a>(), <ahref="#mouseMoveEvent">mouseMoveEvent</a>(), <ahref="#event">event</a>(), and <ahref="qmouseevent.html">QMouseEvent</a>.
<p>Examples: <ahref="drawlines-example.html#x1660">drawlines/connect.cpp</a>, <ahref="hello-example.html#x1641">hello/hello.cpp</a>, <ahref="popup-example.html#x1621">popup/popup.cpp</a>, <ahref="qmag-example.html#x1802">qmag/qmag.cpp</a>, <ahref="scribble-example.html#x950">scribble/scribble.cpp</a>, <ahref="showimg-example.html#x1350">showimg/showimg.cpp</a>, and <ahref="tutorial1-14.html#x2432">t14/cannon.cpp</a>.
This event handler can be reimplemented in a subclass to receive
widget move events. When the widget receives this event, it is
already at the new position.
<p> The old position is accessible through <ahref="qmoveevent.html#oldPos">QMoveEvent::oldPos</a>().
<p><p>See also <ahref="#resizeEvent">resizeEvent</a>(), <ahref="#event">event</a>(), <ahref="#pos-prop">pos</a>, and <ahref="qmoveevent.html">QMoveEvent</a>.
This event handler can be reimplemented in a subclass to receive
paint events.
<p> A paint event is a request to repaint all or part of the widget.
It can happen as a result of <ahref="#repaint">repaint</a>() or <ahref="#update">update</a>(), or because the
widget was obscured and has now been uncovered, or for many other
reasons.
<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: <ahref="qpaintevent.html#region">QPaintEvent::region</a>(). This speed optimization
does not change the result, as painting is clipped to that region
during event processing. <ahref="qlistview.html">QListView</a> and <ahref="qcanvas.html">QCanvas</a> do this, for
example.
<p> Qt also tries to speed up painting by merging multiple paint
events into one. When update() is called several times or the
window system sends several paint events, Qt merges these events
into one event with a larger region (see <ahref="qregion.html#unite">QRegion::unite</a>()).
repaint() does not permit this optimization, so we suggest using
update() when possible.
<p> When the paint event occurs, the update region has normally been
erased, so that you're painting on the widget's background. There
are a couple of exceptions and <ahref="qpaintevent.html#erased">QPaintEvent::erased</a>() tells you
whether the widget has been erased or not.
<p> The background can be set using <ahref="#setBackgroundMode">setBackgroundMode</a>(),
<ahref="#setPaletteBackgroundColor">setPaletteBackgroundColor</a>() or <ahref="#setBackgroundPixmap">setBackgroundPixmap</a>(). The
documentation for setBackgroundMode() elaborates on the
background; we recommend reading it.
<p><p>See also <ahref="#event">event</a>(), <ahref="#repaint">repaint</a>(), <ahref="#update">update</a>(), <ahref="qpainter.html">QPainter</a>, <ahref="qpixmap.html">QPixmap</a>, and <ahref="qpaintevent.html">QPaintEvent</a>.
<p>Examples: <ahref="drawlines-example.html#x1661">drawlines/connect.cpp</a>, <ahref="forever-example.html#x1055">forever/forever.cpp</a>, <ahref="qmag-example.html#x1803">qmag/qmag.cpp</a>, <ahref="scribble-example.html#x951">scribble/scribble.cpp</a>, <ahref="splitter-example.html#x1302">splitter/splitter.cpp</a>, <ahref="tutorial1-08.html#x2336">t8/cannon.cpp</a>, and <ahref="tutorial1-09.html#x2346">t9/cannon.cpp</a>.
<p>Reimplemented in <ahref="qbutton.html#paintEvent">QButton</a>, <ahref="qframe.html#paintEvent">QFrame</a>, <ahref="qglwidget.html#paintEvent">QGLWidget</a>, <ahref="qsizegrip.html#paintEvent">QSizeGrip</a>, <ahref="qstatusbar.html#paintEvent">QStatusBar</a>, and <ahref="qtabbar.html#paintEvent">QTabBar</a>.
Repaints the widget directly by calling <ahref="#paintEvent">paintEvent</a>() immediately,
unless updates are disabled or the widget is hidden.
<p> If <em>erase</em> is TRUE, Qt erases the area <em>(x, y, w, h)</em> before the
paintEvent() call.
<p> If <em>w</em> is negative, it is replaced with <tt>width() - x</tt>, and if
<em>h</em> is negative, it is replaced width <tt>height() - y</tt>.
<p> We suggest only using <ahref="#repaint">repaint</a>() if you need an immediate repaint,
for example during animation. In almost all circumstances <ahref="#update">update</a>()
is better, as it permits Qt to optimize for speed and minimize
flicker.
<p><b>Warning:</b> If you call repaint() in a function which may itself be
called from paintEvent(), you may get infinite recursion. The
update() function never causes recursion.
<p><p>See also <ahref="#update">update</a>(), <ahref="#paintEvent">paintEvent</a>(), <ahref="#updatesEnabled-prop">updatesEnabled</a>, and <ahref="#erase">erase</a>().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Repaints the widget directly by calling <ahref="#paintEvent">paintEvent</a>() directly,
unless updates are disabled or the widget is hidden.
<p> Erases the widget region <em>reg</em> if <em>erase</em> is TRUE.
<p> Only use repaint if your widget needs to be repainted immediately,
for example when doing some animation. In all other cases, use
<ahref="#update">update</a>(). Calling update() many times in a row will generate a
single paint event.
<p><b>Warning:</b> If you call <ahref="#repaint">repaint</a>() in a function which may itself be
called from paintEvent(), you may get infinite recursion. The
update() function never causes recursion.
<p><p>See also <ahref="#update">update</a>(), <ahref="#paintEvent">paintEvent</a>(), <ahref="#updatesEnabled-prop">updatesEnabled</a>, and <ahref="#erase">erase</a>().
Reparents the widget. The widget gets a new <em>parent</em>, new widget
flags (<em>f</em>, but as usual, use 0) at a new position in its new
parent (<em>p</em>).
<p> If <em>showIt</em> is TRUE, <ahref="#show">show</a>() is called once the widget has been
reparented.
<p> If the new parent widget is in a different top-level widget, the
reparented widget and its children are appended to the end of the
<ahref="#setFocusPolicy">tab chain</a> of the new parent
widget, in the same internal order as before. If one of the moved
widgets had <ahref="focus.html#keyboard-focus">keyboard focus</a>, <ahref="#reparent">reparent</a>() calls <ahref="#clearFocus">clearFocus</a>() for that
widget.
<p> If the new parent widget is in the same top-level widget as the
old parent, reparent doesn't change the tab order or keyboard
focus.
<p><b>Warning:</b> It is extremely unlikely that you will ever need this
function. If you have a widget that changes its content
dynamically, it is far easier to use <ahref="qwidgetstack.html">QWidgetStack</a> or <ahref="qwizard.html">QWizard</a>.
<p><p>See also <ahref="#getWFlags">getWFlags</a>().
<p><p>See also <ahref="#moveEvent">moveEvent</a>(), <ahref="#event">event</a>(), <ahref="#size-prop">size</a>, <ahref="qresizeevent.html">QResizeEvent</a>, and <ahref="#paintEvent">paintEvent</a>().
<p>Examples: <ahref="drawdemo-example.html#x1089">drawdemo/drawdemo.cpp</a>, <ahref="menu-example.html#x1884">menu/menu.cpp</a>, <ahref="qmag-example.html#x1806">qmag/qmag.cpp</a>, <ahref="scribble-example.html#x952">scribble/scribble.cpp</a>, <ahref="showimg-example.html#x1353">showimg/showimg.cpp</a>, <ahref="tooltip-example.html#x454">tooltip/tooltip.cpp</a>, and <ahref="xform-example.html#x1269">xform/xform.cpp</a>.
<p>Reimplemented in <ahref="qframe.html#resizeEvent">QFrame</a> and <ahref="qglwidget.html#resizeEvent">QGLWidget</a>.
Disables widget input events if <em>disable</em> is TRUE; otherwise
enables input events.
<p> See the <ahref="#enabled-prop">enabled</a> documentation for more information.
<p><p>See also <ahref="#isEnabledTo">isEnabledTo</a>(), <ahref="qkeyevent.html">QKeyEvent</a>, <ahref="qmouseevent.html">QMouseEvent</a>, and <ahref="#enabledChange">enabledChange</a>().
Sets the erase color of the widget to <em>color</em>.
<p> The erase color is the color the widget is to be cleared to before
<ahref="#paintEvent">paintEvent</a>() is called. If there is an erase pixmap (set using
<ahref="#setErasePixmap">setErasePixmap</a>()), then this property has an indeterminate value.
<p><p>See also <ahref="#erasePixmap">erasePixmap</a>(), <ahref="#backgroundColor">backgroundColor</a>(), <ahref="#backgroundMode-prop">backgroundMode</a>, and <ahref="#palette-prop">palette</a>.
Sets both the minimum and maximum heights of the widget to <em>h</em>
without changing the widths. Provided for convenience.
<p><p>See also <ahref="#sizeHint-prop">sizeHint</a>, <ahref="#minimumSize-prop">minimumSize</a>, <ahref="#maximumSize-prop">maximumSize</a>, and <ahref="#setFixedSize">setFixedSize</a>().
<p>Examples: <ahref="simple-font-demo-example.html#x2859">fonts/simple-qfont-demo/viewer.cpp</a>, <ahref="layout-example.html#x545">layout/layout.cpp</a>, <ahref="qdir-example.html#x1852">qdir/qdir.cpp</a>, and <ahref="showimg-example.html#x1354">showimg/showimg.cpp</a>.
Sets both the minimum and maximum width of the widget to <em>w</em>
without changing the heights. Provided for convenience.
<p><p>See also <ahref="#sizeHint-prop">sizeHint</a>, <ahref="#minimumSize-prop">minimumSize</a>, <ahref="#maximumSize-prop">maximumSize</a>, and <ahref="#setFixedSize">setFixedSize</a>().
<p>Examples: <ahref="progressbar-example.html#x974">progressbar/progressbar.cpp</a> and <ahref="qdir-example.html#x1853">qdir/qdir.cpp</a>.
</h3><p>Sets the font currently set for the widget.
See the <ahref="qwidget.html#font-prop">"font"</a> property for details.
<p>Reimplemented in <ahref="qcombobox.html#setFont">QComboBox</a>, <ahref="qlabel.html#setFont">QLabel</a>, and <ahref="qtabdialog.html#setFont">QTabDialog</a>.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> This function corresponds to <ahref="#setMaximumSize">setMaximumSize</a>( <ahref="qsize.html">QSize</a>(<em>maxw</em>, <em>maxh</em>) ). Sets the maximum width to <em>maxw</em> and the maximum height
When a widget gets focus, it should call <ahref="#setMicroFocusHint">setMicroFocusHint</a>() with
some appropriate position and size, <em>x</em>, <em>y</em>, <em>width</em> and <em>height</em>. This has no <em>visual</em> effect, it just provides hints to
any system-specific input handling tools.
<p> The <em>text</em> argument should be TRUE if this is a position for text
input.
<p> In the Windows version of Qt, this method sets the system caret,
which is used for user Accessibility focus handling. If <em>text</em>
is TRUE, it also sets the IME composition window in Far East Asian
language input systems.
<p> In the X11 version of Qt, if <em>text</em> is TRUE, this method sets the
XIM "spot" point for complex language input handling.
<p> The font <em>f</em> is a rendering hint to the currently active input method.
If <em>f</em> is 0 the widget's font is used.
<p><p>See also <ahref="#microFocusHint-prop">microFocusHint</a>.
See the <ahref="qwidget.html#palette-prop">"palette"</a> property for details.
<p>Reimplemented in <ahref="qcombobox.html#setPalette">QComboBox</a>, <ahref="qscrollbar.html#setPalette">QScrollBar</a>, and <ahref="qslider.html#setPalette">QSlider</a>.
<p> Setting a widget's style has no effect on existing or future child
widgets.
<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>See also <ahref="#style">style</a>(), <ahref="qstyle.html">QStyle</a>, <ahref="qapplication.html#style">QApplication::style</a>(), and <ahref="qapplication.html#setStyle">QApplication::setStyle</a>().
<p>Examples: <ahref="grapher-nsplugin-example.html#x2778">grapher/grapher.cpp</a> and <ahref="progressbar-example.html#x975">progressbar/progressbar.cpp</a>.
Moves the <em>second</em> widget around the ring of focus widgets so
that <ahref="focus.html#keyboard-focus">keyboard focus</a> moves from the <em>first</em> widget to the <em>second</em> widget when the Tab key is pressed.
<p> Note that since the tab order of the <em>second</em> widget is changed,
you should order a chain like this:
<p><pre>
<ahref="#setTabOrder">setTabOrder</a>( a, b ); // a to b
<ahref="#setTabOrder">setTabOrder</a>( b, c ); // a to b to c
<ahref="#setTabOrder">setTabOrder</a>( c, d ); // a to b to c to d
</pre>
<p><em>not</em> like this:
<p><pre>
<ahref="#setTabOrder">setTabOrder</a>( c, d ); // c to d WRONG
<ahref="#setTabOrder">setTabOrder</a>( a, b ); // a to b AND c to d
<ahref="#setTabOrder">setTabOrder</a>( b, c ); // a to b to c, but not c to d
</pre>
<p> If <em>first</em> or <em>second</em> has a focus proxy, <ahref="#setTabOrder">setTabOrder</a>()
correctly substitutes the proxy.
<p><p>See also <ahref="#focusPolicy-prop">focusPolicy</a> and <ahref="#setFocusProxy">setFocusProxy</a>().
<p> Sets the <ahref="qt.html#WindowState">window state</a> to <em>windowState</em>. The window state is a OR'ed
combination of Qt::WindowState: <ahref="qt.html#WindowState-enum">WindowMinimized</a>, <ahref="qt.html#WindowState-enum">WindowMaximized</a>, <ahref="qt.html#WindowState-enum">WindowFullScreen</a> and <ahref="qt.html#WindowState-enum">WindowActive</a>.
<p> If the window is not visible (i.e. <ahref="#isVisible">isVisible</a>() returns FALSE), the
window state will take effect when <ahref="#show">show</a>() is called. For visible
windows, the change is immediate. For example, to toggle between
full-screen and mormal mode, use the following code:
<p> If its size or position has changed, Qt guarantees that a widget
gets move and resize events just before it is shown.
<p> You almost never have to reimplement this function. If you need to
change some settings before a widget is shown, use <ahref="#showEvent">showEvent</a>()
instead. If you need to do some delayed initialization use
<ahref="#polish">polish</a>().
<p><p>See also <ahref="#showEvent">showEvent</a>(), <ahref="#hide">hide</a>(), <ahref="#showMinimized">showMinimized</a>(), <ahref="#showMaximized">showMaximized</a>(), <ahref="#showNormal">showNormal</a>(), <ahref="#visible-prop">visible</a>, and <ahref="#polish">polish</a>().
<p>Examples: <ahref="aclock-example.html#x1215">aclock/main.cpp</a>, <ahref="qdialog.html#x2135">life/main.cpp</a>, <ahref="popup-example.html#x1628">popup/popup.cpp</a>, <ahref="tutorial1-01.html#x2286">t1/main.cpp</a>, <ahref="tutorial1-03.html#x2302">t3/main.cpp</a>, <ahref="tutorial1-04.html#x2309">t4/main.cpp</a>, and <ahref="toplevel-example.html#x2542">toplevel/options.ui.h</a>.
<p>Reimplemented in <ahref="qdialog.html#show">QDialog</a> and <ahref="qmenubar.html#show">QMenuBar</a>.
<p> Calling this function only affects top-level widgets.
<p> To return from full-screen mode, call <ahref="#showNormal">showNormal</a>().
<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> An alternative would be to bypass the window manager entirely and
create a window with the WX11BypassWM flag. This has other severe
problems though, like totally broken <ahref="focus.html#keyboard-focus">keyboard focus</a> and very
strange effects on desktop changes or when the user raises other
windows.
<p> X11 window managers that follow modern post-ICCCM specifications
support full-screen mode properly.
<p><p>See also <ahref="#showNormal">showNormal</a>(), <ahref="#showMaximized">showMaximized</a>(), <ahref="#show">show</a>(), <ahref="#hide">hide</a>(), and <ahref="#visible-prop">visible</a>.
<p> Calling this function only affects <ahref="#isTopLevel">top-level
widgets</a>.
<p> On X11, this function may not work properly with certain window
managers. See the <ahref="geometry.html">Window Geometry
documentation</a> for an explanation.
<p><p>See also <ahref="#setWindowState">setWindowState</a>(), <ahref="#showNormal">showNormal</a>(), <ahref="#showMinimized">showMinimized</a>(), <ahref="#show">show</a>(), <ahref="#hide">hide</a>(), and <ahref="#visible-prop">visible</a>.
<p>Examples: <ahref="canvas-example.html#x2968">canvas/main.cpp</a>, <ahref="helpviewer-example.html#x1045">helpviewer/main.cpp</a>, <ahref="mdi-example.html#x2087">mdi/application.cpp</a>, <ahref="qwerty-example.html#x422">qwerty/main.cpp</a>, <ahref="qwerty-example.html#x413">qwerty/qwerty.cpp</a>, and <ahref="scribble-example.html#x960">scribble/main.cpp</a>.
<p> Calling this function only affects <ahref="#isTopLevel">top-level
widgets</a>.
<p><p>See also <ahref="#showNormal">showNormal</a>(), <ahref="#showMaximized">showMaximized</a>(), <ahref="#show">show</a>(), <ahref="#hide">hide</a>(), <ahref="#visible-prop">visible</a>, and <ahref="#minimized-prop">minimized</a>.
Restores the widget after it has been maximized or minimized.
<p> Calling this function only affects <ahref="#isTopLevel">top-level
widgets</a>.
<p><p>See also <ahref="#setWindowState">setWindowState</a>(), <ahref="#showMinimized">showMinimized</a>(), <ahref="#showMaximized">showMaximized</a>(), <ahref="#show">show</a>(), <ahref="#hide">hide</a>(), and <ahref="#visible-prop">visible</a>.
<p><p>See also <ahref="#setStyle">QWidget::setStyle</a>(), <ahref="qapplication.html#setStyle">QApplication::setStyle</a>(), and <ahref="qapplication.html#style">QApplication::style</a>().
This virtual function is called when the style of the widgets
changes. <em>oldStyle</em> is the previous GUI style; you can get the
new style from <ahref="#style">style</a>().
<p> Reimplement this function if your widget needs to know when its
GUI style changes. You will almost certainly need to update the
widget using <ahref="#update">update</a>().
<p> The default implementation updates the widget including its
geometry.
<p><p>See also <ahref="qapplication.html#setStyle">QApplication::setStyle</a>(), <ahref="#style">style</a>(), <ahref="#update">update</a>(), and <ahref="#updateGeometry">updateGeometry</a>().
This event handler, for event <em>e</em>, can be reimplemented in a
subclass to receive tablet events for the widget.
<p> If you reimplement this handler, it is very important that you
<ahref="qtabletevent.html">ignore()</a> the event if you do not handle
it, so that the widget's parent can interpret it.
<p> The default implementation ignores the event.
<p><p>See also <ahref="qtabletevent.html#ignore">QTabletEvent::ignore</a>(), <ahref="qtabletevent.html#accept">QTabletEvent::accept</a>(), <ahref="#event">event</a>(), and <ahref="qtabletevent.html">QTabletEvent</a>.
Updates the widget unless updates are disabled or the widget is
hidden.
<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 <ahref="#repaint">repaint</a>() does.
<p> Calling <ahref="#update">update</a>() several times normally results in just one
<ahref="#paintEvent">paintEvent</a>() call.
<p> Qt normally erases the widget's area before the paintEvent() call.
If the <ahref="qt.html#WidgetFlags-enum">WRepaintNoErase</a> widget flag is set, the widget is
responsible for painting all its pixels itself.
<p><p>See also <ahref="#repaint">repaint</a>(), <ahref="#paintEvent">paintEvent</a>(), <ahref="#updatesEnabled-prop">updatesEnabled</a>, <ahref="#erase">erase</a>(), and <ahref="#setWFlags">setWFlags</a>().
<p>Examples: <ahref="desktop-example.html#x1763">desktop/desktop.cpp</a> and <ahref="scrollview-example.html#x662">scrollview/scrollview.cpp</a>.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Updates a rectangle (<em>x</em>, <em>y</em>, <em>w</em>, <em>h</em>) inside the widget
unless updates are disabled or the widget is hidden.
<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 and a call to <ahref="#repaint">repaint</a>() does.
<p> Calling <ahref="#update">update</a>() several times normally results in just one
<ahref="#paintEvent">paintEvent</a>() call.
<p> If <em>w</em> is negative, it is replaced with <tt>width() - x</tt>. If <em>h</em>
is negative, it is replaced width <tt>height() - y</tt>.
<p> Qt normally erases the specified area before the paintEvent()
call. If the <ahref="qt.html#WidgetFlags-enum">WRepaintNoErase</a> widget flag is set, the widget is
responsible for painting all its pixels itself.
<p><p>See also <ahref="#repaint">repaint</a>(), <ahref="#paintEvent">paintEvent</a>(), <ahref="#updatesEnabled-prop">updatesEnabled</a>, and <ahref="#erase">erase</a>().
This event handler, for event <em>e</em>, can be reimplemented in a
subclass to receive wheel events for the widget.
<p> If you reimplement this handler, it is very important that you
<ahref="qwheelevent.html">ignore()</a> the event if you do not handle
it, so that the widget's parent can interpret it.
<p> The default implementation ignores the event.
<p><p>See also <ahref="qwheelevent.html#ignore">QWheelEvent::ignore</a>(), <ahref="qwheelevent.html#accept">QWheelEvent::accept</a>(), <ahref="#event">event</a>(), and <ahref="qwheelevent.html">QWheelEvent</a>.
<p> This virtual function is called for a widget when its window is
activated or deactivated by the window system. <em>oldActive</em> is the
previous state; you can get the new setting from <ahref="#isActiveWindow">isActiveWindow</a>().
<p> Reimplement this function if your widget needs to know when its
window becomes activated or deactivated.
<p> The default implementation updates the visible part of the widget
if the inactive and the active colorgroup are different for colors
other than the highlight and link colors.
<p><p>See also <ahref="#setActiveWindow">setActiveWindow</a>(), <ahref="#isActiveWindow-prop">isActiveWindow</a>, <ahref="#update">update</a>(), and <ahref="#palette-prop">palette</a>.
</h3> Returns the current <ahref="qt.html#WindowState">window state</a>. The window state is a OR'ed
combination of Qt::WindowState: <ahref="qt.html#WindowState-enum">WindowMinimized</a>, <ahref="qt.html#WindowState-enum">WindowMaximized</a>, <ahref="qt.html#WindowState-enum">WindowFullScreen</a> and <ahref="qt.html#WindowState-enum">WindowActive</a>.
<p><p>See also <ahref="qt.html#WindowState-enum">Qt::WindowState</a> and <ahref="#setWindowState">setWindowState</a>().
<p>This property holds whether drop events are enabled for this widget.
<p>Setting this property to TRUE announces to the system that this
widget <em>may</em> be able to accept drop events.
<p> If the widget is the desktop (<ahref="#isDesktop">QWidget::isDesktop</a>()), this may
fail if another application is using the desktop; you can call
<ahref="#acceptDrops">acceptDrops</a>() to test if this occurs.
<p><b>Warning:</b>
Do not modify this property in a Drag&Drop event handler.
<p>Set this property's value with <ahref="#setAcceptDrops">setAcceptDrops</a>() and get this property's value with <ahref="#acceptDrops">acceptDrops</a>().
<p>This property holds whether the auto mask feature is enabled for the widget.
<p>Transparent widgets use a mask to define their visible region.
QWidget has some built-in support to make the task of
recalculating the mask easier. When setting auto mask to TRUE,
<ahref="#updateMask">updateMask</a>() will be called whenever the widget is resized or
changes its focus state. Note that you must reimplement
updateMask() (which should include a call to <ahref="#setMask">setMask</a>()) or nothing
will happen.
<p> Note: when you re-implement <ahref="#resizeEvent">resizeEvent</a>(), <ahref="#focusInEvent">focusInEvent</a>() or
<ahref="#focusOutEvent">focusOutEvent</a>() in your custom widgets and still want to ensure
that the auto mask calculation works, you should add:
<p><pre>
if ( <ahref="#autoMask">autoMask</a>() )
<ahref="#updateMask">updateMask</a>();
</pre>
<p> at the end of your event handlers. This is true for all member
functions that change the appearance of the widget in a way that
requires a recalculation of the mask.
<p> While being a technically appealing concept, masks have a big
drawback: when using complex masks that cannot be expressed easily
with relatively simple regions, they can be very slow on some
window systems. The classic example is a transparent label. The
complex shape of its contents makes it necessary to represent its
mask by a bitmap, which consumes both memory and time. If all you
want is to blend the background of several neighboring widgets
together seamlessly, you will probably want to use
<ahref="#setBackgroundOrigin">setBackgroundOrigin</a>() rather than a mask.
<p><p>See also <ahref="#updateMask">updateMask</a>(), <ahref="#setMask">setMask</a>(), <ahref="#clearMask">clearMask</a>(), and <ahref="#backgroundOrigin-prop">backgroundOrigin</a>.
<p>Set this property's value with <ahref="#setAutoMask">setAutoMask</a>() and get this property's value with <ahref="#autoMask">autoMask</a>().
<p>This property holds the widget's background brush.
<p>The background brush depends on a widget's palette and its
background mode.
<p><p>See also <ahref="#backgroundColor">backgroundColor</a>(), <ahref="#backgroundPixmap">backgroundPixmap</a>(), <ahref="#eraseColor">eraseColor</a>(), <ahref="#palette-prop">palette</a>, and <ahref="qapplication.html#setPalette">QApplication::setPalette</a>().
<p>Get this property's value with <ahref="#backgroundBrush">backgroundBrush</a>().
<p> You will never need to set the background mode of a built-in
widget in Qt, but you might consider setting it in your custom
widgets, so that <ahref="#setPaletteBackgroundColor">setPaletteBackgroundColor</a>() works as expected.
<p> Note that two of the BackgroundMode values make no sense for
<ahref="#setBackgroundMode">setBackgroundMode</a>(), namely <ahref="qt.html#BackgroundMode-enum">FixedPixmap</a> and <ahref="qt.html#BackgroundMode-enum">FixedColor</a>. You
must call <ahref="#setBackgroundPixmap">setBackgroundPixmap</a>() and setPaletteBackgroundColor()
instead.
<p>Set this property's value with <ahref="#setBackgroundMode">setBackgroundMode</a>() and get this property's value with <ahref="#backgroundMode">backgroundMode</a>().
<p>This property holds the origin of the widget's background.
<p>The origin is either WidgetOrigin (the default), ParentOrigin,
WindowOrigin or AncestorOrigin.
<p> This only makes a difference if the widget has a background
pixmap, in which case positioning matters. Using <ahref="#BackgroundOrigin-enum">WindowOrigin</a>
for several neighboring widgets makes the background blend
together seamlessly. <ahref="#BackgroundOrigin-enum">AncestorOrigin</a> allows blending backgrounds
seamlessly when an ancestor of the widget has an origin other than
<ahref="#BackgroundOrigin-enum">WindowOrigin</a>.
<p><p>See also <ahref="#backgroundPixmap">backgroundPixmap</a>() and <ahref="#backgroundMode-prop">backgroundMode</a>.
<p>Set this property's value with <ahref="#setBackgroundOrigin">setBackgroundOrigin</a>() and get this property's value with <ahref="#backgroundOrigin">backgroundOrigin</a>().
<p> If no cursor has been set, or after a call to <ahref="#unsetCursor">unsetCursor</a>(), the
parent's cursor is used. The function unsetCursor() has no effect
on top-level widgets.
<p><p>See also <ahref="qapplication.html#setOverrideCursor">QApplication::setOverrideCursor</a>().
<p>Set this property's value with <ahref="#setCursor">setCursor</a>(), get this property's value with <ahref="#cursor">cursor</a>(), and reset this property's value with <ahref="#unsetCursor">unsetCursor</a>().
<p>This property holds whether the widget wants to handle What's This help manually.
<p>The default implementation of <ahref="#customWhatsThis">customWhatsThis</a>() returns FALSE,
which means the widget will not receive any events in Whats This
mode.
<p> The widget may leave What's This mode by calling
<ahref="qwhatsthis.html#leaveWhatsThisMode">QWhatsThis::leaveWhatsThisMode</a>(), with or without actually
displaying any help text.
<p> You can also reimplement customWhatsThis() if your widget is a
"passive interactor" supposed to work under all circumstances.
Simply don't call QWhatsThis::leaveWhatsThisMode() in that case.
<p><p>See also <ahref="qwhatsthis.html#inWhatsThisMode">QWhatsThis::inWhatsThisMode</a>() and <ahref="qwhatsthis.html#leaveWhatsThisMode">QWhatsThis::leaveWhatsThisMode</a>().
<p>Get this property's value with <ahref="#customWhatsThis">customWhatsThis</a>().
<p>This property holds whether the widget is enabled.
<p>An enabled widget receives keyboard and mouse events; a disabled
widget does not. In fact, an enabled widget only receives keyboard
events when it is in focus.
<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 reimplement the <ahref="#enabledChange">enabledChange</a>() function.
<p> Disabling a widget implicitly disables all its children. Enabling
respectively enables all child widgets unless they have been
explicitly disabled.
<p><p>See also <ahref="#enabled-prop">enabled</a>, <ahref="#isEnabledTo">isEnabledTo</a>(), <ahref="qkeyevent.html">QKeyEvent</a>, <ahref="qmouseevent.html">QMouseEvent</a>, and <ahref="#enabledChange">enabledChange</a>().
<p>Set this property's value with <ahref="#setEnabled">setEnabled</a>() and get this property's value with <ahref="#isEnabled">isEnabled</a>().
<p>This property holds whether this widget (or its focus proxy) has the keyboard input focus.
<p>Effectively equivalent to <tt>qApp->focusWidget() == this</tt>.
<p><p>See also <ahref="#setFocus">setFocus</a>(), <ahref="#clearFocus">clearFocus</a>(), <ahref="#focusPolicy-prop">focusPolicy</a>, and <ahref="qapplication.html#focusWidget">QApplication::focusWidget</a>().
<p>Get this property's value with <ahref="#hasFocus">hasFocus</a>().
<p><p>See also <ahref="#focusPolicy-prop">focusPolicy</a>, <ahref="#focusInEvent">focusInEvent</a>(), <ahref="#focusOutEvent">focusOutEvent</a>(), <ahref="#keyPressEvent">keyPressEvent</a>(), <ahref="#keyReleaseEvent">keyReleaseEvent</a>(), and <ahref="#enabled-prop">enabled</a>.
<p>Get this property's value with <ahref="#isFocusEnabled">isFocusEnabled</a>().
<p><p>See also <ahref="#focusEnabled-prop">focusEnabled</a>, <ahref="#focusInEvent">focusInEvent</a>(), <ahref="#focusOutEvent">focusOutEvent</a>(), <ahref="#keyPressEvent">keyPressEvent</a>(), <ahref="#keyReleaseEvent">keyReleaseEvent</a>(), and <ahref="#enabled-prop">enabled</a>.
<p>Set this property's value with <ahref="#setFocusPolicy">setFocusPolicy</a>() and get this property's value with <ahref="#focusPolicy">focusPolicy</a>().
<p> In addition to setting the font, <ahref="#setFont">setFont</a>() informs all children
about the change.
<p><p>See also <ahref="#fontChange">fontChange</a>(), <ahref="#fontInfo">fontInfo</a>(), <ahref="#fontMetrics">fontMetrics</a>(), and <ahref="#ownFont-prop">ownFont</a>.
<p>Set this property's value with <ahref="#setFont">setFont</a>(), get this property's value with <ahref="#font">font</a>(), and reset this property's value with <ahref="#unsetFont">unsetFont</a>().
<p>This property holds whether the widget is explicitly hidden.
<p>If FALSE, the widget is visible or would become visible if all its
ancestors became visible.
<p><p>See also <ahref="#hide">hide</a>(), <ahref="#show">show</a>(), <ahref="#visible-prop">visible</a>, <ahref="#isVisibleTo">isVisibleTo</a>(), and <ahref="#shown-prop">shown</a>.
<p>Set this property's value with <ahref="#setHidden">setHidden</a>() and get this property's value with <ahref="#isHidden">isHidden</a>().
<p>This property holds enables or disables the use of input methods for this widget.
<p>Most Widgets (as eg. buttons) that do not handle text input should have
the input method disabled if they have focus. This is the default.
<p> If a widget handles text input it should set this property to TRUE.
<p>Set this property's value with <ahref="#setInputMethodEnabled">setInputMethodEnabled</a>() and get this property's value with <ahref="#isInputMethodEnabled">isInputMethodEnabled</a>().
<p>This property holds whether the widget is a popup widget.
<p>A popup widget is created by specifying the <ahref="qt.html#WidgetFlags">widget flag</a><ahref="qt.html#WidgetFlags-enum">WType_Popup</a> to the widget constructor. A popup widget is also a
top-level widget.
<p><p>See also <ahref="#isTopLevel-prop">isTopLevel</a>.
<p>Get this property's value with <ahref="#isPopup">isPopup</a>().
<p>This property holds whether the widget is a top-level widget.
<p>A top-level widget is a widget which usually has a frame and a
<ahref="#caption-prop">caption (title)</a>. <ahref="#isPopup">Popup</a> and <ahref="#isDesktop">desktop</a> widgets are also top-level widgets.
<p> A top-level widget can have a <ahref="#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><ahref="qdialog.html">QDialog</a> and <ahref="qmainwindow.html">QMainWindow</a> widgets are by default top-level, even if
a parent widget is specified in the constructor. This behavior is
specified by the <ahref="qt.html#WidgetFlags-enum">WType_TopLevel</a> widget flag.
<p><p>See also <ahref="#topLevelWidget">topLevelWidget</a>(), <ahref="#isDialog-prop">isDialog</a>, <ahref="#isModal-prop">isModal</a>, <ahref="#isPopup-prop">isPopup</a>, <ahref="#isDesktop-prop">isDesktop</a>, and <ahref="#parentWidget">parentWidget</a>().
<p>Get this property's value with <ahref="#isTopLevel">isTopLevel</a>().
<p>This property holds whether this widget is maximized.
<p>This property is only relevant for top-level widgets.
<p> Note that due to limitations in some window-systems, this does not
always report the expected results (e.g. 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>See also <ahref="#windowState">windowState</a>(), <ahref="#showMaximized">showMaximized</a>(), <ahref="#visible-prop">visible</a>, <ahref="#show">show</a>(), <ahref="#hide">hide</a>(), <ahref="#showNormal">showNormal</a>(), and <ahref="#minimized-prop">minimized</a>.
<p>Get this property's value with <ahref="#isMaximized">isMaximized</a>().
<p>This property holds the widget's maximum height.
<p>This property corresponds to <ahref="#maximumSize">maximumSize</a>().<ahref="#height">height</a>().
<p><p>See also <ahref="#maximumSize-prop">maximumSize</a> and <ahref="#maximumWidth-prop">maximumWidth</a>.
<p>Set this property's value with <ahref="#setMaximumHeight">setMaximumHeight</a>() and get this property's value with <ahref="#maximumHeight">maximumHeight</a>().
<p>The widget cannot be resized to a larger size than the maximum
widget size.
<p><p>See also <ahref="#maximumWidth-prop">maximumWidth</a>, <ahref="#maximumHeight-prop">maximumHeight</a>, <ahref="#maximumSize-prop">maximumSize</a>, <ahref="#minimumSize-prop">minimumSize</a>, and <ahref="#sizeIncrement-prop">sizeIncrement</a>.
<p>Set this property's value with <ahref="#setMaximumSize">setMaximumSize</a>() and get this property's value with <ahref="#maximumSize">maximumSize</a>().
<p>This property holds the widget's maximum width.
<p>This property corresponds to <ahref="#maximumSize">maximumSize</a>().<ahref="#width">width</a>().
<p><p>See also <ahref="#maximumSize-prop">maximumSize</a> and <ahref="#maximumHeight-prop">maximumHeight</a>.
<p>Set this property's value with <ahref="#setMaximumWidth">setMaximumWidth</a>() and get this property's value with <ahref="#maximumWidth">maximumWidth</a>().
<p>This property holds whether this widget is minimized (iconified).
<p>This property is only relevant for top-level widgets.
<p><p>See also <ahref="#showMinimized">showMinimized</a>(), <ahref="#visible-prop">visible</a>, <ahref="#show">show</a>(), <ahref="#hide">hide</a>(), <ahref="#showNormal">showNormal</a>(), and <ahref="#maximized-prop">maximized</a>.
<p>Get this property's value with <ahref="#isMinimized">isMinimized</a>().
<p>This property holds the widget's minimum height.
<p>This property corresponds to <ahref="#minimumSize">minimumSize</a>().<ahref="#height">height</a>().
<p><p>See also <ahref="#minimumSize-prop">minimumSize</a> and <ahref="#minimumWidth-prop">minimumWidth</a>.
<p>Set this property's value with <ahref="#setMinimumHeight">setMinimumHeight</a>() and get this property's value with <ahref="#minimumHeight">minimumHeight</a>().
<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> If you use a layout inside the widget, the minimum size will be
set by the layout and not by <ahref="#setMinimumSize">setMinimumSize</a>(), unless you set the
layout's resize mode to QLayout::FreeResize.
<p><p>See also <ahref="#minimumWidth-prop">minimumWidth</a>, <ahref="#minimumHeight-prop">minimumHeight</a>, <ahref="#maximumSize-prop">maximumSize</a>, <ahref="#sizeIncrement-prop">sizeIncrement</a>, and <ahref="qlayout.html#resizeMode-prop">QLayout::resizeMode</a>.
<p>Set this property's value with <ahref="#setMinimumSize">setMinimumSize</a>() and get this property's value with <ahref="#minimumSize">minimumSize</a>().
<p>This property holds the recommended minimum size for the widget.
<p>If the value of this property is an invalid size, no minimum size
is recommended.
<p> The default implementation of <ahref="#minimumSizeHint">minimumSizeHint</a>() 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><ahref="qlayout.html">QLayout</a> will never resize a widget to a size smaller than
minimumSizeHint.
<p><p>See also <ahref="qsize.html#isValid">QSize::isValid</a>(), <ahref="#size-prop">size</a>, <ahref="#minimumSize-prop">minimumSize</a>, and <ahref="#sizePolicy-prop">sizePolicy</a>.
<p>Get this property's value with <ahref="#minimumSizeHint">minimumSizeHint</a>().
<p>This property holds the widget's minimum width.
<p>This property corresponds to <ahref="#minimumSize">minimumSize</a>().<ahref="#width">width</a>().
<p><p>See also <ahref="#minimumSize-prop">minimumSize</a> and <ahref="#minimumHeight-prop">minimumHeight</a>.
<p>Set this property's value with <ahref="#setMinimumWidth">setMinimumWidth</a>() and get this property's value with <ahref="#minimumWidth">minimumWidth</a>().
<p>This property holds whether mouse tracking is enabled for the widget.
<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> If mouse tracking is enabled, the widget receives mouse move
events even if no buttons are pressed.
<p><p>See also <ahref="#mouseMoveEvent">mouseMoveEvent</a>() and <ahref="qapplication.html#setGlobalMouseTracking">QApplication::setGlobalMouseTracking</a>().
<p>Set this property's value with <ahref="#setMouseTracking">setMouseTracking</a>() and get this property's value with <ahref="#hasMouseTracking">hasMouseTracking</a>().
<p><p>See also <ahref="#ownPalette-prop">ownPalette</a>, <ahref="#colorGroup-prop">colorGroup</a>, and <ahref="qapplication.html#palette">QApplication::palette</a>().
<p>Set this property's value with <ahref="#setPalette">setPalette</a>(), get this property's value with <ahref="#palette">palette</a>(), and reset this property's value with <ahref="#unsetPalette">unsetPalette</a>().
<p>This property holds the background color of the widget.
<p>The palette background color is usually set implicitly by
<ahref="#setBackgroundMode">setBackgroundMode</a>(), although it can also be set explicitly by
<ahref="#setPaletteBackgroundColor">setPaletteBackgroundColor</a>(). setPaletteBackgroundColor() is a
convenience function that creates and sets a modified <ahref="qpalette.html">QPalette</a>
with <ahref="#setPalette">setPalette</a>(). The palette is modified according to the
widget's background mode. For example, if the background mode is
<ahref="qt.html#BackgroundMode-enum">PaletteButton</a> the color used for the palette's <ahref="qcolorgroup.html#ColorRole-enum">QColorGroup::Button</a> color entry is set.
<p> If there is a background pixmap (set using
<ahref="#setPaletteBackgroundPixmap">setPaletteBackgroundPixmap</a>()), then the return value of this
function is indeterminate.
<p><p>See also <ahref="#paletteBackgroundPixmap-prop">paletteBackgroundPixmap</a>, <ahref="#paletteForegroundColor-prop">paletteForegroundColor</a>, <ahref="#palette-prop">palette</a>, and <ahref="#colorGroup-prop">colorGroup</a>.
<p>Set this property's value with <ahref="#setPaletteBackgroundColor">setPaletteBackgroundColor</a>(), get this property's value with <ahref="#paletteBackgroundColor">paletteBackgroundColor</a>(), and reset this property's value with <ahref="#unsetPalette">unsetPalette</a>().
<p>This property holds the background pixmap of the widget.
<p>The palette background pixmap is usually set implicitly by
<ahref="#setBackgroundMode">setBackgroundMode</a>(), although it can also be set explicitly by
<ahref="#setPaletteBackgroundPixmap">setPaletteBackgroundPixmap</a>(). setPaletteBackgroundPixmap() is a
convenience function that creates and sets a modified <ahref="qpalette.html">QPalette</a>
with <ahref="#setPalette">setPalette</a>(). The palette is modified according to the
widget's background mode. For example, if the background mode is
<ahref="qt.html#BackgroundMode-enum">PaletteButton</a> the pixmap used for the palette's
<ahref="qcolorgroup.html#ColorRole-enum">QColorGroup::Button</a> color entry is set.
<p> If there is a plain background color (set using
<ahref="#setPaletteBackgroundColor">setPaletteBackgroundColor</a>()), then this function returns 0.
<p><p>See also <ahref="#paletteBackgroundColor-prop">paletteBackgroundColor</a>, <ahref="#paletteForegroundColor-prop">paletteForegroundColor</a>, <ahref="#palette-prop">palette</a>, and <ahref="#colorGroup-prop">colorGroup</a>.
<p>Set this property's value with <ahref="#setPaletteBackgroundPixmap">setPaletteBackgroundPixmap</a>(), get this property's value with <ahref="#paletteBackgroundPixmap">paletteBackgroundPixmap</a>(), and reset this property's value with <ahref="#unsetPalette">unsetPalette</a>().
<p>This property holds the foreground color of the widget.
<p>setPaletteForegroundColor() is a convenience function that creates
and sets a modified <ahref="qpalette.html">QPalette</a> with <ahref="#setPalette">setPalette</a>(). The palette is
modified according to the widget's <em>background mode</em>. For
example, if the background mode is <ahref="qt.html#BackgroundMode-enum">PaletteButton</a> the palette entry
<ahref="qcolorgroup.html#ColorRole-enum">QColorGroup::ButtonText</a> is set to color.
<p><p>See also <ahref="#palette-prop">palette</a>, <ahref="qapplication.html#setPalette">QApplication::setPalette</a>(), <ahref="#backgroundMode-prop">backgroundMode</a>, <ahref="#foregroundColor">foregroundColor</a>(), <ahref="#backgroundMode-prop">backgroundMode</a>, and <ahref="#setEraseColor">setEraseColor</a>().
<p>Set this property's value with <ahref="#setPaletteForegroundColor">setPaletteForegroundColor</a>(), get this property's value with <ahref="#paletteForegroundColor">paletteForegroundColor</a>(), and reset this property's value with <ahref="#unsetPalette">unsetPalette</a>().
<p>This property holds whether the widget is shown.
<p>If TRUE, the widget is visible or would become visible if all its
ancestors became visible.
<p><p>See also <ahref="#hide">hide</a>(), <ahref="#show">show</a>(), <ahref="#visible-prop">visible</a>, <ahref="#isVisibleTo">isVisibleTo</a>(), and <ahref="#hidden-prop">hidden</a>.
<p>Set this property's value with <ahref="#setShown">setShown</a>() and get this property's value with <ahref="#isShown">isShown</a>().
<p>This property holds the size of the widget excluding any window frame.
<p>When resizing, the widget, if visible, receives a resize event
(<ahref="#resizeEvent">resizeEvent</a>()) immediately. If the widget is not currently
visible, it is guaranteed to receive an event before it is shown.
<p> The size is adjusted if it lies outside the range defined by
<ahref="#minimumSize">minimumSize</a>() and <ahref="#maximumSize">maximumSize</a>(). Furthermore, the size is always
at least <ahref="qsize.html">QSize</a>(1, 1). For toplevel widgets, the minimum size
might be larger, depending on the window manager.
<p> If you want a top-level window to have a fixed size, call
setResizeMode( QLayout::FreeResize ) on its layout.
<p><ahref="#resize">resize</a>() is virtual, and all other overloaded resize()
implementations in Qt call it.
<p><b>Warning:</b> Calling resize() or <ahref="#setGeometry">setGeometry</a>() inside resizeEvent() can
lead to infinite recursion.
<p><p>See also <ahref="#pos-prop">pos</a>, <ahref="#geometry-prop">geometry</a>, <ahref="#minimumSize-prop">minimumSize</a>, <ahref="#maximumSize-prop">maximumSize</a>, and <ahref="#resizeEvent">resizeEvent</a>().
<p>Set this property's value with <ahref="#resize">resize</a>() and get this property's value with <ahref="#size">size</a>().
<p>This property holds the recommended size for the widget.
<p>If the value of this property is an invalid size, no size is
recommended.
<p> The default implementation of <ahref="#sizeHint">sizeHint</a>() returns an invalid size
if there is no layout for this widget, and returns the layout's
preferred size otherwise.
<p><p>See also <ahref="qsize.html#isValid">QSize::isValid</a>(), <ahref="#minimumSizeHint-prop">minimumSizeHint</a>, <ahref="#sizePolicy-prop">sizePolicy</a>, <ahref="#minimumSize-prop">minimumSize</a>, and <ahref="#updateGeometry">updateGeometry</a>().
<p>Get this property's value with <ahref="#sizeHint">sizeHint</a>().
<p> Note that while you can set the size increment for all widgets, it
only affects top-level widgets.
<p><b>Warning:</b> The size increment has no effect under Windows, and may
be disregarded by the window manager on X.
<p><p>See also <ahref="#size-prop">size</a>, <ahref="#minimumSize-prop">minimumSize</a>, and <ahref="#maximumSize-prop">maximumSize</a>.
<p>Set this property's value with <ahref="#setSizeIncrement">setSizeIncrement</a>() and get this property's value with <ahref="#sizeIncrement">sizeIncrement</a>().
<p>This property holds the default layout behavior of the widget.
<p>If there is a <ahref="qlayout.html">QLayout</a> that manages this widget's children, the
size policy specified by that layout is used. If there is no such
QLayout, the result of this function is used.
<p> The default policy is Preferred/Preferred, which means that the
widget can be freely resized, but prefers to be the size
<ahref="#sizeHint">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
<ahref="qlineedit.html">QLineEdit</a>, <ahref="qspinbox.html">QSpinBox</a> or an editable <ahref="qcombobox.html">QComboBox</a>) and other
horizontally orientated widgets (such as <ahref="qprogressbar.html">QProgressBar</a>).
<ahref="qtoolbutton.html">QToolButton</a>'s are normally square, so they allow growth in both
directions. Widgets that support different directions (such as
<ahref="qslider.html">QSlider</a>, <ahref="qscrollbar.html">QScrollBar</a> or <ahref="qheader.html">QHeader</a>) specify stretching in the
respective direction only. Widgets that can provide scrollbars
(usually subclasses of <ahref="qscrollview.html">QScrollView</a>) tend to specify that they can
use additional space, and that they can make do with less than
sizeHint().
<p><p>See also <ahref="#sizeHint-prop">sizeHint</a>, <ahref="qlayout.html">QLayout</a>, <ahref="qsizepolicy.html">QSizePolicy</a>, and <ahref="#updateGeometry">updateGeometry</a>().
<p>Set this property's value with <ahref="#setSizePolicy">setSizePolicy</a>() and get this property's value with <ahref="#sizePolicy">sizePolicy</a>().
<p><p>See also <ahref="#update">update</a>(), <ahref="#repaint">repaint</a>(), and <ahref="#paintEvent">paintEvent</a>().
<p>Set this property's value with <ahref="#setUpdatesEnabled">setUpdatesEnabled</a>() and get this property's value with <ahref="#isUpdatesEnabled">isUpdatesEnabled</a>().
<p>This property holds whether the widget is visible.
<p>Calling <ahref="#show">show</a>() sets the widget to visible status if all its parent
widgets up to the top-level widget are visible. If an ancestor is
not visible, the widget won't become visible until all its
ancestors are shown.
<p> Calling <ahref="#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> 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> A widget that happens to be obscured by other windows on the
screen is considered to be visible. The same applies to iconified
top-level widgets and windows that exist on another virtual
desktop (on platforms that support this concept). A widget
receives spontaneous show and hide events when its mapping status
is changed by the window system, e.g. a spontaneous hide event
when the user minimizes the window, and a spontaneous show event
when the window is restored again.
<p><p>See also <ahref="#show">show</a>(), <ahref="#hide">hide</a>(), <ahref="#hidden-prop">hidden</a>, <ahref="#isVisibleTo">isVisibleTo</a>(), <ahref="#minimized-prop">minimized</a>, <ahref="#showEvent">showEvent</a>(), and <ahref="#hideEvent">hideEvent</a>().
<p>Get this property's value with <ahref="#isVisible">isVisible</a>().
<p>This property holds the level of opacity for the window.
<p>The valid range of opacity is from 1.0 (completely opaque) to
0.0 (completely transparent).
<p> By default the value of this property is 1.0.
<p> This feature is only present on Mac OS X and Windows 2000 and up.
<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 <ahref="qpixmap.html#grabWindow">QPixmap::grabWindow</a>(). Also note
that semi-transparent windows update and resize significantely slower than
opaque windows.
<p>Set this property's value with <ahref="#setWindowOpacity">setWindowOpacity</a>() and get this property's value with <ahref="#windowOpacity">windowOpacity</a>().
<h3class=fn>int <aname="x-prop"></a>x</h3><p>This property holds the x coordinate of the widget relative to its parent including any window frame.
<p>See the <ahref="geometry.html">Window Geometry documentation</a>
for an overview of top-level widget geometry.
<p><p>See also <ahref="#frameGeometry-prop">frameGeometry</a>, <ahref="#y-prop">y</a>, and <ahref="#pos-prop">pos</a>.
<p>Get this property's value with <ahref="#x">x</a>().
<h3class=fn>int <aname="y-prop"></a>y</h3>
<p>This property holds the y coordinate of the widget relative to its parent and including any window frame.
<p>See the <ahref="geometry.html">Window Geometry documentation</a>
for an overview of top-level widget geometry.
<p><p>See also <ahref="#frameGeometry-prop">frameGeometry</a>, <ahref="#x-prop">x</a>, and <ahref="#pos-prop">pos</a>.
<p>Get this property's value with <ahref="#y">y</a>().
<!-- eof -->
<hr><p>
This file is part of the <ahref="index.html">Qt toolkit</a>.