<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <html><head><title>QMdiArea Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm } a:link { color: #004faf; text-decoration: none } a:visited { color: #672967; text-decoration: none } td.postheader { font-family: sans-serif } tr.address { font-family: sans-serif } body { background: #ffffff; color: black; } </style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">  </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QMdiArea Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QMdiArea widget provides an area in which MDI windows are displayed. <a href="#details">More...</a></p> <p>Inherits <a href="qabstractscrollarea.html">QAbstractScrollArea</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qmdiarea.html#AreaOption-enum">AreaOption</a></b> { DontMaximizeSubWindowOnActivation }</li><li><div class="fn" />class <b><a href="qmdiarea-areaoptions.html">AreaOptions</a></b></li><li><div class="fn" />enum <b><a href="qmdiarea.html#ViewMode-enum">ViewMode</a></b> { SubWindowView, TabbedView }</li><li><div class="fn" />enum <b><a href="qmdiarea.html#WindowOrder-enum">WindowOrder</a></b> { CreationOrder, StackingOrder, ActivationHistoryOrder }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qmdiarea.html#QMdiArea">__init__</a></b> (<i>self</i>, QWidget <i>parent</i> = None)</li><li><div class="fn" /><b><a href="qmdiarea.html#activateNextSubWindow">activateNextSubWindow</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qmdiarea.html#activatePreviousSubWindow">activatePreviousSubWindow</a></b> (<i>self</i>)</li><li><div class="fn" />WindowOrder <b><a href="qmdiarea.html#activationOrder">activationOrder</a></b> (<i>self</i>)</li><li><div class="fn" />QMdiSubWindow <b><a href="qmdiarea.html#activeSubWindow">activeSubWindow</a></b> (<i>self</i>)</li><li><div class="fn" />QMdiSubWindow <b><a href="qmdiarea.html#addSubWindow">addSubWindow</a></b> (<i>self</i>, QWidget <i>widget</i>, Qt.WindowFlags <i>flags</i> = 0)</li><li><div class="fn" />QBrush <b><a href="qmdiarea.html#background">background</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qmdiarea.html#cascadeSubWindows">cascadeSubWindows</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qmdiarea.html#childEvent">childEvent</a></b> (<i>self</i>, QChildEvent <i>childEvent</i>)</li><li><div class="fn" /><b><a href="qmdiarea.html#closeActiveSubWindow">closeActiveSubWindow</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qmdiarea.html#closeAllSubWindows">closeAllSubWindows</a></b> (<i>self</i>)</li><li><div class="fn" />QMdiSubWindow <b><a href="qmdiarea.html#currentSubWindow">currentSubWindow</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmdiarea.html#documentMode">documentMode</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmdiarea.html#event">event</a></b> (<i>self</i>, QEvent <i>event</i>)</li><li><div class="fn" />bool <b><a href="qmdiarea.html#eventFilter">eventFilter</a></b> (<i>self</i>, QObject <i>object</i>, QEvent <i>event</i>)</li><li><div class="fn" />QSize <b><a href="qmdiarea.html#minimumSizeHint">minimumSizeHint</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qmdiarea.html#paintEvent">paintEvent</a></b> (<i>self</i>, QPaintEvent <i>paintEvent</i>)</li><li><div class="fn" /><b><a href="qmdiarea.html#removeSubWindow">removeSubWindow</a></b> (<i>self</i>, QWidget <i>widget</i>)</li><li><div class="fn" /><b><a href="qmdiarea.html#resizeEvent">resizeEvent</a></b> (<i>self</i>, QResizeEvent <i>resizeEvent</i>)</li><li><div class="fn" /><b><a href="qmdiarea.html#scrollContentsBy">scrollContentsBy</a></b> (<i>self</i>, int <i>dx</i>, int <i>dy</i>)</li><li><div class="fn" /><b><a href="qmdiarea.html#setActivationOrder">setActivationOrder</a></b> (<i>self</i>, WindowOrder <i>order</i>)</li><li><div class="fn" /><b><a href="qmdiarea.html#setActiveSubWindow">setActiveSubWindow</a></b> (<i>self</i>, QMdiSubWindow <i>window</i>)</li><li><div class="fn" /><b><a href="qmdiarea.html#setBackground">setBackground</a></b> (<i>self</i>, QBrush <i>background</i>)</li><li><div class="fn" /><b><a href="qmdiarea.html#setDocumentMode">setDocumentMode</a></b> (<i>self</i>, bool <i>enabled</i>)</li><li><div class="fn" /><b><a href="qmdiarea.html#setOption">setOption</a></b> (<i>self</i>, AreaOption <i>option</i>, bool <i>on</i> = True)</li><li><div class="fn" /><b><a href="qmdiarea.html#setTabPosition">setTabPosition</a></b> (<i>self</i>, QTabWidget.TabPosition <i>position</i>)</li><li><div class="fn" /><b><a href="qmdiarea.html#setTabsClosable">setTabsClosable</a></b> (<i>self</i>, bool <i>closable</i>)</li><li><div class="fn" /><b><a href="qmdiarea.html#setTabShape">setTabShape</a></b> (<i>self</i>, QTabWidget.TabShape <i>shape</i>)</li><li><div class="fn" /><b><a href="qmdiarea.html#setTabsMovable">setTabsMovable</a></b> (<i>self</i>, bool <i>movable</i>)</li><li><div class="fn" /><b><a href="qmdiarea.html#setupViewport">setupViewport</a></b> (<i>self</i>, QWidget <i>viewport</i>)</li><li><div class="fn" /><b><a href="qmdiarea.html#setViewMode">setViewMode</a></b> (<i>self</i>, ViewMode <i>mode</i>)</li><li><div class="fn" /><b><a href="qmdiarea.html#showEvent">showEvent</a></b> (<i>self</i>, QShowEvent <i>showEvent</i>)</li><li><div class="fn" />QSize <b><a href="qmdiarea.html#sizeHint">sizeHint</a></b> (<i>self</i>)</li><li><div class="fn" />list-of-QMdiSubWindow <b><a href="qmdiarea.html#subWindowList">subWindowList</a></b> (<i>self</i>, WindowOrder <i>order</i> = QMdiArea.CreationOrder)</li><li><div class="fn" />QTabWidget.TabPosition <b><a href="qmdiarea.html#tabPosition">tabPosition</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmdiarea.html#tabsClosable">tabsClosable</a></b> (<i>self</i>)</li><li><div class="fn" />QTabWidget.TabShape <b><a href="qmdiarea.html#tabShape">tabShape</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmdiarea.html#tabsMovable">tabsMovable</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmdiarea.html#testOption">testOption</a></b> (<i>self</i>, AreaOption <i>opton</i>)</li><li><div class="fn" /><b><a href="qmdiarea.html#tileSubWindows">tileSubWindows</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qmdiarea.html#timerEvent">timerEvent</a></b> (<i>self</i>, QTimerEvent <i>timerEvent</i>)</li><li><div class="fn" />ViewMode <b><a href="qmdiarea.html#viewMode">viewMode</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmdiarea.html#viewportEvent">viewportEvent</a></b> (<i>self</i>, QEvent <i>event</i>)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qmdiarea.html#subWindowActivated">subWindowActivated</a></b> (QMdiSubWindow *)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QMdiArea widget provides an area in which MDI windows are displayed.</p> <p>QMdiArea functions, essentially, like a window manager for MDI windows. For instance, it draws the windows it manages on itself and arranges them in a cascading or tile pattern. QMdiArea is commonly used as the center widget in a <a href="qmainwindow.html">QMainWindow</a> to create MDI applications, but can also be placed in any layout. The following code adds an area to a main window:</p> <pre class="cpp"> <span class="type"><a href="qmainwindow.html">QMainWindow</a></span> <span class="operator">*</span>mainWindow <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qmainwindow.html">QMainWindow</a></span>; mainWindow<span class="operator">-</span><span class="operator">></span>setCentralWidget(mdiArea); </pre> <p>Unlike the window managers for top-level windows, all window flags (<a href="qt.html#WindowType-enum">Qt.WindowFlags</a>) are supported by QMdiArea as long as the flags are supported by the current widget style. If a specific flag is not supported by the style (e.g., the <a href="qt.html#WindowType-enum">WindowShadeButtonHint</a>), you can still shade the window with showShaded().</p> <p>Subwindows in QMdiArea are instances of <a href="qmdisubwindow.html">QMdiSubWindow</a>. They are added to an MDI area with <a href="qmdiarea.html#addSubWindow">addSubWindow</a>(). It is common to pass a <a href="qwidget.html">QWidget</a>, which is set as the internal widget, to this function, but it is also possible to pass a <a href="qmdisubwindow.html">QMdiSubWindow</a> directly.The class inherits <a href="qwidget.html">QWidget</a>, and you can use the same API as with a normal top-level window when programming. <a href="qmdisubwindow.html">QMdiSubWindow</a> also has behavior that is specific to MDI windows. See the <a href="qmdisubwindow.html">QMdiSubWindow</a> class description for more details.</p> <p>A subwindow becomes active when it gets the keyboard focus, or when <a href="qwidget.html#setFocus">setFocus</a>() is called. The user activates a window by moving focus in the usual ways. The MDI area emits the <a href="qmdiarea.html#subWindowActivated">subWindowActivated</a>() signal when the active window changes, and the <a href="qmdiarea.html#activeSubWindow">activeSubWindow</a>() function returns the active subwindow.</p> <p>The convenience function <a href="qmdiarea.html#subWindowList">subWindowList</a>() returns a list of all subwindows. This information could be used in a popup menu containing a list of windows, for example.</p> <p>The subwindows are sorted by the current <a href="qmdiarea.html#WindowOrder-enum">WindowOrder</a>. This is used for the <a href="qmdiarea.html#subWindowList">subWindowList</a>() and for <a href="qmdiarea.html#activateNextSubWindow">activateNextSubWindow</a>() and acivatePreviousSubWindow(). Also, it is used when cascading or tiling the windows with <a href="qmdiarea.html#cascadeSubWindows">cascadeSubWindows</a>() and <a href="qmdiarea.html#tileSubWindows">tileSubWindows</a>().</p> <p>QMdiArea provides two built-in layout strategies for subwindows: <a href="qmdiarea.html#cascadeSubWindows">cascadeSubWindows</a>() and <a href="qmdiarea.html#tileSubWindows">tileSubWindows</a>(). Both are slots and are easily connected to menu entries.</p> <table class="generic"> <tr class="odd" valign="top"> <td><img alt="" src="images/mdi-cascade.png" /></td> <td><img alt="" src="images/mdi-tile.png" /></td> </tr> </table> <p><b>Note:</b> The default scroll bar property for QMdiArea is <a href="qt.html#ScrollBarPolicy-enum">Qt.ScrollBarAlwaysOff</a>.</p> <hr /><h2>Type Documentation</h2><h3 class="fn"><a name="AreaOption-enum" />QMdiArea.AreaOption</h3><p>This enum describes options that customize the behavior of the <a href="qmdiarea.html">QMdiArea</a>.</p> <table class="valuelist"> <tr class="odd" valign="top"> <th class="tblConst">Constant</th> <th class="tblval">Value</th> <th class="tbldscr">Description</th> </tr> <tr> <td class="topAlign"> <tt>QMdiArea.DontMaximizeSubWindowOnActivation</tt></td> <td class="topAlign"><tt>0x1</tt></td> <td class="topAlign">When the active subwindow is maximized, the default behavior is to maximize the next subwindow that is activated. Set this option if you do not want this behavior.</td> </tr> </table> <p>The AreaOptions type is a typedef for <a href="qflags.html">QFlags</a><AreaOption>. It stores an OR combination of AreaOption values.</p> <h3 class="fn"><a name="ViewMode-enum" />QMdiArea.ViewMode</h3><p>This enum describes the view mode of the area; i.e. how sub-windows will be displayed.</p> <table class="valuelist"> <tr class="odd" valign="top"> <th class="tblConst">Constant</th> <th class="tblval">Value</th> <th class="tbldscr">Description</th> </tr> <tr> <td class="topAlign"><tt>QMdiArea.SubWindowView</tt></td> <td class="topAlign"><tt>0</tt></td> <td class="topAlign">Display sub-windows with window frames (default).</td> </tr> <tr> <td class="topAlign"><tt>QMdiArea.TabbedView</tt></td> <td class="topAlign"><tt>1</tt></td> <td class="topAlign">Display sub-windows with tabs in a tab bar.</td> </tr> </table> <p>This enum was introduced or modified in Qt 4.4.</p> <p><b>See also</b> <a href="qmdiarea.html#viewMode-prop">setViewMode</a>().</p> <h3 class="fn"><a name="WindowOrder-enum" />QMdiArea.WindowOrder</h3><p>Specifies the criteria to use for ordering the list of child windows returned by <a href="qmdiarea.html#subWindowList">subWindowList</a>(). The functions <a href="qmdiarea.html#cascadeSubWindows">cascadeSubWindows</a>() and <a href="qmdiarea.html#tileSubWindows">tileSubWindows</a>() follow this order when arranging the windows.</p> <table class="valuelist"> <tr class="odd" valign="top"> <th class="tblConst">Constant</th> <th class="tblval">Value</th> <th class="tbldscr">Description</th> </tr> <tr> <td class="topAlign"><tt>QMdiArea.CreationOrder</tt></td> <td class="topAlign"><tt>0</tt></td> <td class="topAlign">The windows are returned in the order of their creation.</td> </tr> <tr> <td class="topAlign"><tt>QMdiArea.StackingOrder</tt></td> <td class="topAlign"><tt>1</tt></td> <td class="topAlign">The windows are returned in the order in which they are stacked, with the top-most window being last in the list.</td> </tr> <tr> <td class="topAlign"><tt>QMdiArea.ActivationHistoryOrder</tt></td> <td class="topAlign"><tt>2</tt></td> <td class="topAlign">The windows are returned in the order in which they were activated.</td> </tr> </table> <p><b>See also</b> <a href="qmdiarea.html#subWindowList">subWindowList</a>().</p> <hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QMdiArea" />QMdiArea.__init__ (<i>self</i>, <a href="qwidget.html">QWidget</a> <i>parent</i> = None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs an empty mdi area. <i>parent</i> is passed to <a href="qwidget.html">QWidget</a>'s constructor.</p> <h3 class="fn"><a name="activateNextSubWindow" />QMdiArea.activateNextSubWindow (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void activateNextSubWindow()</tt>.</p><p>Gives the keyboard focus to another window in the list of child windows. The window activated will be the next one determined by the current <a href="qmdiarea.html#WindowOrder-enum">activation order</a>.</p> <p><b>See also</b> <a href="qmdiarea.html#activatePreviousSubWindow">activatePreviousSubWindow</a>() and <a href="qmdiarea.html#WindowOrder-enum">QMdiArea.WindowOrder</a>.</p> <h3 class="fn"><a name="activatePreviousSubWindow" />QMdiArea.activatePreviousSubWindow (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void activatePreviousSubWindow()</tt>.</p><p>Gives the keyboard focus to another window in the list of child windows. The window activated will be the previous one determined by the current <a href="qmdiarea.html#WindowOrder-enum">activation order</a>.</p> <p><b>See also</b> <a href="qmdiarea.html#activateNextSubWindow">activateNextSubWindow</a>() and <a href="qmdiarea.html#WindowOrder-enum">QMdiArea.WindowOrder</a>.</p> <h3 class="fn"><a name="activationOrder" /><a href="qmdiarea.html#WindowOrder-enum">WindowOrder</a> QMdiArea.activationOrder (<i>self</i>)</h3><h3 class="fn"><a name="activeSubWindow" /><a href="qmdisubwindow.html">QMdiSubWindow</a> QMdiArea.activeSubWindow (<i>self</i>)</h3><p>Returns a pointer to the current active subwindow. If no window is currently active, 0 is returned.</p> <p>Subwindows are treated as top-level windows with respect to window state, i.e., if a widget outside the MDI area is the active window, no subwindow will be active. Note that if a widget in the window in which the MDI area lives gains focus, the window will be activated.</p> <p><b>See also</b> <a href="qmdiarea.html#setActiveSubWindow">setActiveSubWindow</a>() and <a href="qt.html#WindowState-enum">Qt.WindowState</a>.</p> <h3 class="fn"><a name="addSubWindow" /><a href="qmdisubwindow.html">QMdiSubWindow</a> QMdiArea.addSubWindow (<i>self</i>, <a href="qwidget.html">QWidget</a> <i>widget</i>, <a href="qt-windowflags.html">Qt.WindowFlags</a> <i>flags</i> = 0)</h3><p>The <i>widget</i> argument has it's ownership transferred to Qt.</p><p>Adds <i>widget</i> as a new subwindow to the MDI area. If <i>windowFlags</i> are non-zero, they will override the flags set on the widget.</p> <p>The <i>widget</i> can be either a <a href="qmdisubwindow.html">QMdiSubWindow</a> or another <a href="qwidget.html">QWidget</a> (in which case the MDI area will create a subwindow and set the <i>widget</i> as the internal widget).</p> <p><b>Note:</b> Once the subwindow has been added, its parent will be the <i>viewport widget</i> of the <a href="qmdiarea.html">QMdiArea</a>.</p> <pre class="cpp"> <span class="type"><a href="qmdiarea.html">QMdiArea</a></span> mdiArea; <span class="type"><a href="qmdisubwindow.html">QMdiSubWindow</a></span> <span class="operator">*</span>subWindow1 <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qmdisubwindow.html">QMdiSubWindow</a></span>; subWindow1<span class="operator">-</span><span class="operator">></span>setWidget(internalWidget1); subWindow1<span class="operator">-</span><span class="operator">></span>setAttribute(<span class="type"><a href="qt.html">Qt</a></span><span class="operator">.</span>WA_DeleteOnClose); mdiArea<span class="operator">.</span>addSubWindow(subWindow1); <span class="type"><a href="qmdisubwindow.html">QMdiSubWindow</a></span> <span class="operator">*</span>subWindow2 <span class="operator">=</span> mdiArea<span class="operator">.</span>addSubWindow(internalWidget2); </pre> <p>When you create your own subwindow, you must set the <a href="qt.html#WidgetAttribute-enum">Qt.WA_DeleteOnClose</a> widget attribute if you want the window to be deleted when closed in the MDI area. If not, the window will be hidden and the MDI area will not activate the next subwindow.</p> <p>Returns the <a href="qmdisubwindow.html">QMdiSubWindow</a> that is added to the MDI area.</p> <p><b>See also</b> <a href="qmdiarea.html#removeSubWindow">removeSubWindow</a>().</p> <h3 class="fn"><a name="background" /><a href="qbrush.html">QBrush</a> QMdiArea.background (<i>self</i>)</h3><h3 class="fn"><a name="cascadeSubWindows" />QMdiArea.cascadeSubWindows (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void cascadeSubWindows()</tt>.</p><p>Arranges all the child windows in a cascade pattern.</p> <p><b>See also</b> <a href="qmdiarea.html#tileSubWindows">tileSubWindows</a>().</p> <h3 class="fn"><a name="childEvent" />QMdiArea.childEvent (<i>self</i>, <a href="qchildevent.html">QChildEvent</a> <i>childEvent</i>)</h3><p>Reimplemented from <a href="qobject.html#childEvent">QObject.childEvent</a>().</p> <h3 class="fn"><a name="closeActiveSubWindow" />QMdiArea.closeActiveSubWindow (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void closeActiveSubWindow()</tt>.</p><p>Closes the active subwindow.</p> <p><b>See also</b> <a href="qmdiarea.html#closeAllSubWindows">closeAllSubWindows</a>().</p> <h3 class="fn"><a name="closeAllSubWindows" />QMdiArea.closeAllSubWindows (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void closeAllSubWindows()</tt>.</p><p>Closes all subwindows by sending a <a href="qcloseevent.html">QCloseEvent</a> to each window. You may receive <a href="qmdiarea.html#subWindowActivated">subWindowActivated</a>() signals from subwindows before they are closed (if the MDI area activates the subwindow when another is closing).</p> <p>Subwindows that ignore the close event will remain open.</p> <p><b>See also</b> <a href="qmdiarea.html#closeActiveSubWindow">closeActiveSubWindow</a>().</p> <h3 class="fn"><a name="currentSubWindow" /><a href="qmdisubwindow.html">QMdiSubWindow</a> QMdiArea.currentSubWindow (<i>self</i>)</h3><p>Returns a pointer to the current subwindow, or 0 if there is no current subwindow.</p> <p>This function will return the same as <a href="qmdiarea.html#activeSubWindow">activeSubWindow</a>() if the <a href="qapplication.html">QApplication</a> containing <a href="qmdiarea.html">QMdiArea</a> is active.</p> <p><b>See also</b> <a href="qmdiarea.html#activeSubWindow">activeSubWindow</a>() and <a href="qapplication.html#activeWindow">QApplication.activeWindow</a>().</p> <h3 class="fn"><a name="documentMode" />bool QMdiArea.documentMode (<i>self</i>)</h3><h3 class="fn"><a name="event" />bool QMdiArea.event (<i>self</i>, <a href="qevent.html">QEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qobject.html#event">QObject.event</a>().</p> <h3 class="fn"><a name="eventFilter" />bool QMdiArea.eventFilter (<i>self</i>, <a href="qobject.html">QObject</a> <i>object</i>, <a href="qevent.html">QEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qobject.html#eventFilter">QObject.eventFilter</a>().</p> <h3 class="fn"><a name="minimumSizeHint" /><a href="qsize.html">QSize</a> QMdiArea.minimumSizeHint (<i>self</i>)</h3><p>Reimplemented from <a href="qwidget.html#minimumSizeHint-prop">QWidget.minimumSizeHint</a>().</p> <h3 class="fn"><a name="paintEvent" />QMdiArea.paintEvent (<i>self</i>, <a href="qpaintevent.html">QPaintEvent</a> <i>paintEvent</i>)</h3><p>Reimplemented from <a href="qwidget.html#paintEvent">QWidget.paintEvent</a>().</p> <h3 class="fn"><a name="removeSubWindow" />QMdiArea.removeSubWindow (<i>self</i>, <a href="qwidget.html">QWidget</a> <i>widget</i>)</h3><p>Removes <i>widget</i> from the MDI area. The <i>widget</i> must be either a <a href="qmdisubwindow.html">QMdiSubWindow</a> or a widget that is the internal widget of a subwindow. Note <i>widget</i> is never actually deleted by <a href="qmdiarea.html">QMdiArea</a>. If a <a href="qmdisubwindow.html">QMdiSubWindow</a> is passed in its parent is set to 0 and it is removed, but if an internal widget is passed in the child widget is set to 0 but the <a href="qmdisubwindow.html">QMdiSubWindow</a> is not removed.</p> <p><b>See also</b> <a href="qmdiarea.html#addSubWindow">addSubWindow</a>().</p> <h3 class="fn"><a name="resizeEvent" />QMdiArea.resizeEvent (<i>self</i>, <a href="qresizeevent.html">QResizeEvent</a> <i>resizeEvent</i>)</h3><p>Reimplemented from <a href="qwidget.html#resizeEvent">QWidget.resizeEvent</a>().</p> <h3 class="fn"><a name="scrollContentsBy" />QMdiArea.scrollContentsBy (<i>self</i>, int <i>dx</i>, int <i>dy</i>)</h3><p>Reimplemented from <a href="qabstractscrollarea.html#scrollContentsBy">QAbstractScrollArea.scrollContentsBy</a>().</p> <h3 class="fn"><a name="setActivationOrder" />QMdiArea.setActivationOrder (<i>self</i>, <a href="qmdiarea.html#WindowOrder-enum">WindowOrder</a> <i>order</i>)</h3><h3 class="fn"><a name="setActiveSubWindow" />QMdiArea.setActiveSubWindow (<i>self</i>, <a href="qmdisubwindow.html">QMdiSubWindow</a> <i>window</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setActiveSubWindow(QMdiSubWindow *)</tt>.</p><p>Activates the subwindow <i>window</i>. If <i>window</i> is 0, any current active window is deactivated.</p> <p><b>See also</b> <a href="qmdiarea.html#activeSubWindow">activeSubWindow</a>().</p> <h3 class="fn"><a name="setBackground" />QMdiArea.setBackground (<i>self</i>, <a href="qbrush.html">QBrush</a> <i>background</i>)</h3><h3 class="fn"><a name="setDocumentMode" />QMdiArea.setDocumentMode (<i>self</i>, bool <i>enabled</i>)</h3><h3 class="fn"><a name="setOption" />QMdiArea.setOption (<i>self</i>, <a href="qmdiarea.html#AreaOption-enum">AreaOption</a> <i>option</i>, bool <i>on</i> = True)</h3><p>If <i>on</i> is true, <i>option</i> is enabled on the MDI area; otherwise it is disabled. See <a href="qmdiarea.html#AreaOption-enum">AreaOption</a> for the effect of each option.</p> <p><b>See also</b> <a href="qmdiarea.html#AreaOption-enum">AreaOption</a> and <a href="qmdiarea.html#testOption">testOption</a>().</p> <h3 class="fn"><a name="setTabPosition" />QMdiArea.setTabPosition (<i>self</i>, <a href="qtabwidget.html#TabPosition-enum">QTabWidget.TabPosition</a> <i>position</i>)</h3><h3 class="fn"><a name="setTabsClosable" />QMdiArea.setTabsClosable (<i>self</i>, bool <i>closable</i>)</h3><h3 class="fn"><a name="setTabShape" />QMdiArea.setTabShape (<i>self</i>, <a href="qtabwidget.html#TabShape-enum">QTabWidget.TabShape</a> <i>shape</i>)</h3><h3 class="fn"><a name="setTabsMovable" />QMdiArea.setTabsMovable (<i>self</i>, bool <i>movable</i>)</h3><h3 class="fn"><a name="setupViewport" />QMdiArea.setupViewport (<i>self</i>, <a href="qwidget.html">QWidget</a> <i>viewport</i>)</h3><p>This slot is called by <a href="qabstractscrollarea.html">QAbstractScrollArea</a> after <a href="qabstractscrollarea.html#setViewport">setViewport</a>() has been called. Reimplement this function in a subclass of <a href="qmdiarea.html">QMdiArea</a> to initialize the new <i>viewport</i> before it is used.</p> <p><b>See also</b> <a href="qabstractscrollarea.html#setViewport">setViewport</a>().</p> <h3 class="fn"><a name="setViewMode" />QMdiArea.setViewMode (<i>self</i>, <a href="qmdiarea.html#ViewMode-enum">ViewMode</a> <i>mode</i>)</h3><h3 class="fn"><a name="showEvent" />QMdiArea.showEvent (<i>self</i>, <a href="qshowevent.html">QShowEvent</a> <i>showEvent</i>)</h3><p>Reimplemented from <a href="qwidget.html#showEvent">QWidget.showEvent</a>().</p> <h3 class="fn"><a name="sizeHint" /><a href="qsize.html">QSize</a> QMdiArea.sizeHint (<i>self</i>)</h3><p>Reimplemented from <a href="qwidget.html#sizeHint-prop">QWidget.sizeHint</a>().</p> <h3 class="fn"><a name="subWindowList" />list-of-QMdiSubWindow QMdiArea.subWindowList (<i>self</i>, <a href="qmdiarea.html#WindowOrder-enum">WindowOrder</a> <i>order</i> = QMdiArea.CreationOrder)</h3><p>Returns a list of all subwindows in the MDI area. If <i>order</i> is <a href="qmdiarea.html#WindowOrder-enum">CreationOrder</a> (the default), the windows are sorted in the order in which they were inserted into the workspace. If <i>order</i> is <a href="qmdiarea.html#WindowOrder-enum">StackingOrder</a>, the windows are listed in their stacking order, with the topmost window as the last item in the list. If <i>order</i> is <a href="qmdiarea.html#WindowOrder-enum">ActivationHistoryOrder</a>, the windows are listed according to their recent activation history.</p> <p><b>See also</b> <a href="qmdiarea.html#WindowOrder-enum">WindowOrder</a>.</p> <h3 class="fn"><a name="tabPosition" /><a href="qtabwidget.html#TabPosition-enum">QTabWidget.TabPosition</a> QMdiArea.tabPosition (<i>self</i>)</h3><h3 class="fn"><a name="tabsClosable" />bool QMdiArea.tabsClosable (<i>self</i>)</h3><h3 class="fn"><a name="tabShape" /><a href="qtabwidget.html#TabShape-enum">QTabWidget.TabShape</a> QMdiArea.tabShape (<i>self</i>)</h3><h3 class="fn"><a name="tabsMovable" />bool QMdiArea.tabsMovable (<i>self</i>)</h3><h3 class="fn"><a name="testOption" />bool QMdiArea.testOption (<i>self</i>, <a href="qmdiarea.html#AreaOption-enum">AreaOption</a> <i>opton</i>)</h3><p>Returns true if <i>option</i> is enabled; otherwise returns false.</p> <p><b>See also</b> <a href="qmdiarea.html#AreaOption-enum">AreaOption</a> and <a href="qmdiarea.html#setOption">setOption</a>().</p> <h3 class="fn"><a name="tileSubWindows" />QMdiArea.tileSubWindows (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void tileSubWindows()</tt>.</p><p>Arranges all child windows in a tile pattern.</p> <p><b>See also</b> <a href="qmdiarea.html#cascadeSubWindows">cascadeSubWindows</a>().</p> <h3 class="fn"><a name="timerEvent" />QMdiArea.timerEvent (<i>self</i>, <a href="qtimerevent.html">QTimerEvent</a> <i>timerEvent</i>)</h3><p>Reimplemented from <a href="qobject.html#timerEvent">QObject.timerEvent</a>().</p> <h3 class="fn"><a name="viewMode" /><a href="qmdiarea.html#ViewMode-enum">ViewMode</a> QMdiArea.viewMode (<i>self</i>)</h3><h3 class="fn"><a name="viewportEvent" />bool QMdiArea.viewportEvent (<i>self</i>, <a href="qevent.html">QEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qabstractscrollarea.html#viewportEvent">QAbstractScrollArea.viewportEvent</a>().</p> <hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="subWindowActivated" />void subWindowActivated (QMdiSubWindow *)</h3><p>This is the default overload of this signal.</p><p><a href="qmdiarea.html">QMdiArea</a> emits this signal after <i>window</i> has been activated. When <i>window</i> is 0, <a href="qmdiarea.html">QMdiArea</a> has just deactivated its last active window, and there are no active windows on the workspace.</p> <p><b>See also</b> <a href="qmdiarea.html#activeSubWindow">QMdiArea.activeSubWindow</a>().</p> <address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.10.3 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt 4.8.5</td></tr></table></div></address></body></html>