![]() |
Home · Overviews · Examples | ![]() |
The QMdiSubWindow class provides a subwindow class for QMdiArea. More...
Inherits QWidget.
The QMdiSubWindow class provides a subwindow class for QMdiArea.
QMdiSubWindow represents a top-level window in a QMdiArea, and consists of a title bar with window decorations, an internal widget, and (depending on the current style) a window frame and a size grip. QMdiSubWindow has its own layout, which consists of the title bar and a center area for the internal widget.
The most common way to construct a QMdiSubWindow is to call QMdiArea::addSubWindow() with the internal widget as the argument. You can also create a subwindow yourself, and set an internal widget by calling setWidget.
You use the same API when programming with subwindows as with regular top-level windows (e.g., you can call functions such as show, hide, showMaximized, and setWindowTitle).
QMdiSubWindow also supports behavior specific to subwindows in an MDI area.
By default, each QMdiSubWindow is visible inside the MDI area viewport when moved around, but it is also possible to specify transparent window movement and resizing behavior, where only the outline of a subwindow is updated during these operations. The setOption function is used to enable this behavior.
The isShaded function detects whether the subwindow is currently shaded (i.e., the window is collapsed so that only the title bar is visible). To enter shaded mode, call showShaded. QMdiSubWindow emits the windowStateChanged signal whenever the window state has changed (e.g., when the window becomes minimized, or is restored). It also emits aboutToActivate before it is activated.
In keyboard-interactive mode, the windows are moved and resized with the keyboard. You can enter this mode through the system menu of the window. The keyboardSingleStep and keyboardPageStep properties control the distance the widget is moved or resized for each keypress event. When shift is pressed down page step is used; otherwise single step is used.
See also QMdiArea.
Copyright © 2008 Trolltech | Trademarks | Qt Jambi 4.3.4_01 |