~ubuntu-branches/ubuntu/precise/python-qt4/precise-proposed

« back to all changes in this revision

Viewing changes to doc/html/qmainwindow.html

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell, Jonathan Riddell
  • Date: 2010-11-08 16:13:33 UTC
  • mfrom: (1.5.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20101108161333-0nec4wu0nz3wpf9r
Tags: 4.8.1-0ubuntu1
[ Jonathan Riddell ]
* New upstream release
* Build against python-sip-dev 4.11.2
* Remove kubuntu_02_fix-scpk-and-flag-issue.diff merged upstream
* Install __init__.py into /usr/lib/python3.2/dist-packages/PyQt4,
  fixes Python 3 support
* Add QtDeclarative to python-qt4
* Add kubuntu_03_uiparser.diff from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
td.postheader { font-family: sans-serif }
7
7
tr.address { font-family: sans-serif }
8
8
body { background: #ffffff; color: black; }
9
 
</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">&#160;&#160;</td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QMainWindow Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QMainWindow class provides a main application window. <a href="#details">More...</a></p>
 
9
</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">&#160;&#160;</td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QMainWindow Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QMainWindow class provides a main application window.
 
10
<a href="#details">More...</a></p>
 
11
 
10
12
<p>Inherits <a href="qwidget.html">QWidget</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qmainwindow.html#DockOption-enum">DockOption</a></b> { AnimatedDocks, AllowNestedDocks, AllowTabbedDocks, ForceTabbedDocks, VerticalTabs }</li><li><div class="fn" />class <b><a href="qmainwindow-dockoptions.html">DockOptions</a></b></li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qmainwindow.html#QMainWindow">__init__</a></b> (<i>self</i>, QWidget&#160;<i>parent</i>&#160;=&#160;None, Qt.WindowFlags&#160;<i>flags</i>&#160;=&#160;0)</li><li><div class="fn" /><b><a href="qmainwindow.html#addDockWidget">addDockWidget</a></b> (<i>self</i>, Qt.DockWidgetArea, QDockWidget)</li><li><div class="fn" /><b><a href="qmainwindow.html#addDockWidget-2">addDockWidget</a></b> (<i>self</i>, Qt.DockWidgetArea, QDockWidget, Qt.Orientation)</li><li><div class="fn" /><b><a href="qmainwindow.html#addToolBar">addToolBar</a></b> (<i>self</i>, Qt.ToolBarArea, QToolBar)</li><li><div class="fn" /><b><a href="qmainwindow.html#addToolBar-2">addToolBar</a></b> (<i>self</i>, QToolBar)</li><li><div class="fn" />QToolBar <b><a href="qmainwindow.html#addToolBar-3">addToolBar</a></b> (<i>self</i>, QString)</li><li><div class="fn" /><b><a href="qmainwindow.html#addToolBarBreak">addToolBarBreak</a></b> (<i>self</i>, Qt.ToolBarArea&#160;<i>area</i>&#160;=&#160;Qt.TopToolBarArea)</li><li><div class="fn" />QWidget <b><a href="qmainwindow.html#centralWidget">centralWidget</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qmainwindow.html#contextMenuEvent">contextMenuEvent</a></b> (<i>self</i>, QContextMenuEvent)</li><li><div class="fn" />Qt.DockWidgetArea <b><a href="qmainwindow.html#corner">corner</a></b> (<i>self</i>, Qt.Corner)</li><li><div class="fn" />QMenu <b><a href="qmainwindow.html#createPopupMenu">createPopupMenu</a></b> (<i>self</i>)</li><li><div class="fn" />DockOptions <b><a href="qmainwindow.html#dockOptions">dockOptions</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.DockWidgetArea <b><a href="qmainwindow.html#dockWidgetArea">dockWidgetArea</a></b> (<i>self</i>, QDockWidget)</li><li><div class="fn" />bool <b><a href="qmainwindow.html#documentMode">documentMode</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmainwindow.html#event">event</a></b> (<i>self</i>, QEvent)</li><li><div class="fn" />QSize <b><a href="qmainwindow.html#iconSize">iconSize</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qmainwindow.html#insertToolBar">insertToolBar</a></b> (<i>self</i>, QToolBar, QToolBar)</li><li><div class="fn" /><b><a href="qmainwindow.html#insertToolBarBreak">insertToolBarBreak</a></b> (<i>self</i>, QToolBar)</li><li><div class="fn" />bool <b><a href="qmainwindow.html#isAnimated">isAnimated</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmainwindow.html#isDockNestingEnabled">isDockNestingEnabled</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmainwindow.html#isSeparator">isSeparator</a></b> (<i>self</i>, QPoint)</li><li><div class="fn" />QMenuBar <b><a href="qmainwindow.html#menuBar">menuBar</a></b> (<i>self</i>)</li><li><div class="fn" />QWidget <b><a href="qmainwindow.html#menuWidget">menuWidget</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qmainwindow.html#removeDockWidget">removeDockWidget</a></b> (<i>self</i>, QDockWidget)</li><li><div class="fn" /><b><a href="qmainwindow.html#removeToolBar">removeToolBar</a></b> (<i>self</i>, QToolBar)</li><li><div class="fn" /><b><a href="qmainwindow.html#removeToolBarBreak">removeToolBarBreak</a></b> (<i>self</i>, QToolBar)</li><li><div class="fn" />bool <b><a href="qmainwindow.html#restoreDockWidget">restoreDockWidget</a></b> (<i>self</i>, QDockWidget)</li><li><div class="fn" />bool <b><a href="qmainwindow.html#restoreState">restoreState</a></b> (<i>self</i>, QByteArray, int&#160;<i>version</i>&#160;=&#160;0)</li><li><div class="fn" />QByteArray <b><a href="qmainwindow.html#saveState">saveState</a></b> (<i>self</i>, int&#160;<i>version</i>&#160;=&#160;0)</li><li><div class="fn" /><b><a href="qmainwindow.html#setAnimated">setAnimated</a></b> (<i>self</i>, bool)</li><li><div class="fn" /><b><a href="qmainwindow.html#setCentralWidget">setCentralWidget</a></b> (<i>self</i>, QWidget)</li><li><div class="fn" /><b><a href="qmainwindow.html#setCorner">setCorner</a></b> (<i>self</i>, Qt.Corner, Qt.DockWidgetArea)</li><li><div class="fn" /><b><a href="qmainwindow.html#setDockNestingEnabled">setDockNestingEnabled</a></b> (<i>self</i>, bool)</li><li><div class="fn" /><b><a href="qmainwindow.html#setDockOptions">setDockOptions</a></b> (<i>self</i>, DockOptions)</li><li><div class="fn" /><b><a href="qmainwindow.html#setDocumentMode">setDocumentMode</a></b> (<i>self</i>, bool)</li><li><div class="fn" /><b><a href="qmainwindow.html#setIconSize">setIconSize</a></b> (<i>self</i>, QSize)</li><li><div class="fn" /><b><a href="qmainwindow.html#setMenuBar">setMenuBar</a></b> (<i>self</i>, QMenuBar)</li><li><div class="fn" /><b><a href="qmainwindow.html#setMenuWidget">setMenuWidget</a></b> (<i>self</i>, QWidget)</li><li><div class="fn" /><b><a href="qmainwindow.html#setStatusBar">setStatusBar</a></b> (<i>self</i>, QStatusBar)</li><li><div class="fn" /><b><a href="qmainwindow.html#setTabPosition">setTabPosition</a></b> (<i>self</i>, Qt.DockWidgetAreas, QTabWidget.TabPosition)</li><li><div class="fn" /><b><a href="qmainwindow.html#setTabShape">setTabShape</a></b> (<i>self</i>, QTabWidget.TabShape)</li><li><div class="fn" /><b><a href="qmainwindow.html#setToolButtonStyle">setToolButtonStyle</a></b> (<i>self</i>, Qt.ToolButtonStyle)</li><li><div class="fn" /><b><a href="qmainwindow.html#setUnifiedTitleAndToolBarOnMac">setUnifiedTitleAndToolBarOnMac</a></b> (<i>self</i>, bool)</li><li><div class="fn" /><b><a href="qmainwindow.html#splitDockWidget">splitDockWidget</a></b> (<i>self</i>, QDockWidget, QDockWidget, Qt.Orientation)</li><li><div class="fn" />QStatusBar <b><a href="qmainwindow.html#statusBar">statusBar</a></b> (<i>self</i>)</li><li><div class="fn" />list-of-QDockWidget <b><a href="qmainwindow.html#tabifiedDockWidgets">tabifiedDockWidgets</a></b> (<i>self</i>, QDockWidget)</li><li><div class="fn" /><b><a href="qmainwindow.html#tabifyDockWidget">tabifyDockWidget</a></b> (<i>self</i>, QDockWidget, QDockWidget)</li><li><div class="fn" />QTabWidget.TabPosition <b><a href="qmainwindow.html#tabPosition">tabPosition</a></b> (<i>self</i>, Qt.DockWidgetArea)</li><li><div class="fn" />QTabWidget.TabShape <b><a href="qmainwindow.html#tabShape">tabShape</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.ToolBarArea <b><a href="qmainwindow.html#toolBarArea">toolBarArea</a></b> (<i>self</i>, QToolBar)</li><li><div class="fn" />bool <b><a href="qmainwindow.html#toolBarBreak">toolBarBreak</a></b> (<i>self</i>, QToolBar)</li><li><div class="fn" />Qt.ToolButtonStyle <b><a href="qmainwindow.html#toolButtonStyle">toolButtonStyle</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmainwindow.html#unifiedTitleAndToolBarOnMac">unifiedTitleAndToolBarOnMac</a></b> (<i>self</i>)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qmainwindow.html#iconSizeChanged">iconSizeChanged</a></b> (const QSize&amp;)</li><li><div class="fn" />void <b><a href="qmainwindow.html#toolButtonStyleChanged">toolButtonStyleChanged</a></b> (Qt::ToolButtonStyle)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QMainWindow class provides a main application window.</p>
11
 
<ul><li><a href="#qt-main-window-framework">Qt Main Window Framework</a></li>
12
 
<li><a href="#creating-main-window-components">Creating Main Window Components</a></li>
13
 
<ul><li><a href="#creating-menus">Creating Menus</a></li>
14
 
<li><a href="#creating-toolbars">Creating Toolbars</a></li>
15
 
<li><a href="#creating-dock-widgets">Creating Dock Widgets</a></li>
16
 
<li><a href="#the-status-bar">The Status Bar</a></li>
17
 
</ul>
18
 
<li><a href="#storing-state">Storing State</a></li>
19
 
</ul>
20
 
<a name="qt-main-window-framework" />
 
13
<a id="qt-main-window-framework" name="qt-main-window-framework" />
21
14
<h3>Qt Main Window Framework</h3>
22
 
<p>A main window provides a framework for building an application's user interface. Qt has QMainWindow and its <a href="mainwindow-classes.html">related classes</a> for main window management. QMainWindow has its own layout to which you can add <a href="qtoolbar.html">QToolBar</a>s, <a href="qdockwidget.html">QDockWidget</a>s, a <a href="qmenubar.html">QMenuBar</a>, and a <a href="qstatusbar.html">QStatusBar</a>. The layout has a center area that can be occupied by any kind of widget. You can see an image of the layout below.</p>
23
 
<p align="center"><img src="images/mainwindowlayout.png" /></p><p><b>Note:</b> Creating a main window without a central widget is not supported. You must have a central widget even if it is just a placeholder.</p>
24
 
<a name="creating-main-window-components" />
 
15
<p>A main window provides a framework for building an application's
 
16
user interface. Qt has QMainWindow and its <a href="mainwindow-classes.html">related classes</a> for main window
 
17
management. QMainWindow has its own layout to which you can add
 
18
<a href="qtoolbar.html">QToolBar</a>s, <a href="qdockwidget.html">QDockWidget</a>s, a <a href="qmenubar.html">QMenuBar</a>, and a <a href="qstatusbar.html">QStatusBar</a>. The layout has a center area that
 
19
can be occupied by any kind of widget. You can see an image of the
 
20
layout below.</p>
 
21
<p class="centerAlign"><img src="images/mainwindowlayout.png" /></p>
 
22
<p><b>Note:</b> Creating a main window without a central widget is
 
23
not supported. You must have a central widget even if it is just a
 
24
placeholder.</p>
 
25
<a id="creating-main-window-components" name="creating-main-window-components" />
25
26
<h3>Creating Main Window Components</h3>
26
 
<p>A central widget will typically be a standard Qt widget such as a <a href="qtextedit.html">QTextEdit</a> or a <a href="qgraphicsview.html">QGraphicsView</a>. Custom widgets can also be used for advanced applications. You set the central widget with <tt>setCentralWidget()</tt>.</p>
27
 
<p>Main windows have either a single (SDI) or multiple (MDI) document interface. You create MDI applications in Qt by using a <a href="qmdiarea.html">QMdiArea</a> as the central widget.</p>
28
 
<p>We will now examine each of the other widgets that can be added to a main window. We give examples on how to create and add them.</p>
29
 
<a name="creating-menus" />
 
27
<p>A central widget will typically be a standard Qt widget such as
 
28
a <a href="qtextedit.html">QTextEdit</a> or a <a href="qgraphicsview.html">QGraphicsView</a>. Custom widgets can also be
 
29
used for advanced applications. You set the central widget with
 
30
<tt>setCentralWidget()</tt>.</p>
 
31
<p>Main windows have either a single (SDI) or multiple (MDI)
 
32
document interface. You create MDI applications in Qt by using a
 
33
<a href="qmdiarea.html">QMdiArea</a> as the central widget.</p>
 
34
<p>We will now examine each of the other widgets that can be added
 
35
to a main window. We give examples on how to create and add
 
36
them.</p>
 
37
<a id="creating-menus" name="creating-menus" />
30
38
<h4>Creating Menus</h4>
31
 
<p>Qt implements menus in <a href="qmenu.html">QMenu</a> and QMainWindow keeps them in a <a href="qmenubar.html">QMenuBar</a>. <a href="qaction.html">QAction</a>s are added to the menus, which display them as menu items.</p>
32
 
<p>You can add new menus to the main window's menu bar by calling <tt>menuBar()</tt>, which returns the <a href="qmenubar.html">QMenuBar</a> for the window, and then add a menu with <a href="qmenubar.html#addMenu">QMenuBar.addMenu</a>().</p>
33
 
<p>QMainWindow comes with a default menu bar, but you can also set one yourself with <tt>setMenuBar()</tt>. If you wish to implement a custom menu bar (i.e., not use the <a href="qmenubar.html">QMenuBar</a> widget), you can set it with <tt>setMenuWidget()</tt>.</p>
 
39
<p>Qt implements menus in <a href="qmenu.html">QMenu</a> and
 
40
QMainWindow keeps them in a <a href="qmenubar.html">QMenuBar</a>.
 
41
<a href="qaction.html">QAction</a>s are added to the menus, which
 
42
display them as menu items.</p>
 
43
<p>You can add new menus to the main window's menu bar by calling
 
44
<tt>menuBar()</tt>, which returns the <a href="qmenubar.html">QMenuBar</a> for the window, and then add a menu
 
45
with <a href="qmenubar.html#addMenu">QMenuBar.addMenu</a>().</p>
 
46
<p>QMainWindow comes with a default menu bar, but you can also set
 
47
one yourself with <tt>setMenuBar()</tt>. If you wish to implement a
 
48
custom menu bar (i.e., not use the <a href="qmenubar.html">QMenuBar</a> widget), you can set it with
 
49
<tt>setMenuWidget()</tt>.</p>
34
50
<p>An example of how to create menus follows:</p>
35
 
<pre> void MainWindow.createMenus()
 
51
<pre class="highlightedCode brush: cpp">
 
52
 void MainWindow.createMenus()
36
53
 {
37
54
     fileMenu = menuBar()-&gt;addMenu(tr("&amp;File"));
38
55
     fileMenu-&gt;addAction(newAct);
39
56
     fileMenu-&gt;addAction(openAct);
40
 
     fileMenu-&gt;addAction(saveAct);</pre>
41
 
<p>The <tt>createPopupMenu()</tt> function creates popup menus when the main window receives context menu events. The default implementation generates a menu with the checkable actions from the dock widgets and toolbars. You can reimplement <tt>createPopupMenu()</tt> for a custom menu.</p>
42
 
<a name="creating-toolbars" />
 
57
     fileMenu-&gt;addAction(saveAct);
 
58
</pre>
 
59
<p>The <tt>createPopupMenu()</tt> function creates popup menus when
 
60
the main window receives context menu events. The default
 
61
implementation generates a menu with the checkable actions from the
 
62
dock widgets and toolbars. You can reimplement
 
63
<tt>createPopupMenu()</tt> for a custom menu.</p>
 
64
<a id="creating-toolbars" name="creating-toolbars" />
43
65
<h4>Creating Toolbars</h4>
44
 
<p>Toolbars are implemented in the <a href="qtoolbar.html">QToolBar</a> class. You add a toolbar to a main window with <tt>addToolBar()</tt>.</p>
45
 
<p>You control the initial position of toolbars by assigning them to a specific <a href="qt.html#ToolBarArea-enum">Qt.ToolBarArea</a>. You can split an area by inserting a toolbar break - think of this as a line break in text editing - with <tt>addToolBarBreak()</tt> or <tt>insertToolBarBreak()</tt>. You can also restrict placement by the user with <a href="qtoolbar.html#allowedAreas-prop">QToolBar.setAllowedAreas</a>() and <a href="qtoolbar.html#movable-prop">QToolBar.setMovable</a>().</p>
46
 
<p>The size of toolbar icons can be retrieved with <tt>iconSize()</tt>. The sizes are platform dependent; you can set a fixed size with <tt>setIconSize()</tt>. You can alter the appearance of all tool buttons in the toolbars with <tt>setToolButtonStyle()</tt>.</p>
 
66
<p>Toolbars are implemented in the <a href="qtoolbar.html">QToolBar</a> class. You add a toolbar to a main
 
67
window with <tt>addToolBar()</tt>.</p>
 
68
<p>You control the initial position of toolbars by assigning them
 
69
to a specific <a href="qt.html#ToolBarArea-enum">Qt.ToolBarArea</a>. You can split an
 
70
area by inserting a toolbar break - think of this as a line break
 
71
in text editing - with <tt>addToolBarBreak()</tt> or
 
72
<tt>insertToolBarBreak()</tt>. You can also restrict placement by
 
73
the user with <a href="qtoolbar.html#allowedAreas-prop">QToolBar.setAllowedAreas</a>()
 
74
and <a href="qtoolbar.html#movable-prop">QToolBar.setMovable</a>().</p>
 
75
<p>The size of toolbar icons can be retrieved with
 
76
<tt>iconSize()</tt>. The sizes are platform dependent; you can set
 
77
a fixed size with <tt>setIconSize()</tt>. You can alter the
 
78
appearance of all tool buttons in the toolbars with
 
79
<tt>setToolButtonStyle()</tt>.</p>
47
80
<p>An example of toolbar creation follows:</p>
48
 
<pre> void MainWindow.createToolBars()
 
81
<pre class="highlightedCode brush: cpp">
 
82
 void MainWindow.createToolBars()
49
83
 {
50
84
     fileToolBar = addToolBar(tr("File"));
51
 
     fileToolBar-&gt;addAction(newAct);</pre>
52
 
<a name="creating-dock-widgets" />
 
85
     fileToolBar-&gt;addAction(newAct);
 
86
</pre>
 
87
<a id="creating-dock-widgets" name="creating-dock-widgets" />
53
88
<h4>Creating Dock Widgets</h4>
54
 
<p>Dock widgets are implemented in the <a href="qdockwidget.html">QDockWidget</a> class. A dock widget is a window that can be docked into the main window. You add dock widgets to a main window with <tt>addDockWidget()</tt>.</p>
55
 
<p>There are four dock widget areas as given by the <a href="qt.html#DockWidgetArea-enum">Qt.DockWidgetArea</a> enum: left, right, top, and bottom. You can specify which dock widget area that should occupy the corners where the areas overlap with <tt>setCorner()</tt>. By default each area can only contain one row (vertical or horizontal) of dock widgets, but if you enable nesting with <tt>setDockNestingEnabled()</tt>, dock widgets can be added in either direction.</p>
56
 
<p>Two dock widgets may also be stacked on top of each other. A <a href="qtabbar.html">QTabBar</a> is then used to select which of the widgets that should be displayed.</p>
57
 
<p>We give an example of how to create and add dock widgets to a main window:</p>
58
 
<pre>     QDockWidget *dockWidget = new QDockWidget(tr("Dock Widget"), this);
 
89
<p>Dock widgets are implemented in the <a href="qdockwidget.html">QDockWidget</a> class. A dock widget is a window
 
90
that can be docked into the main window. You add dock widgets to a
 
91
main window with <tt>addDockWidget()</tt>.</p>
 
92
<p>There are four dock widget areas as given by the <a href="qt.html#DockWidgetArea-enum">Qt.DockWidgetArea</a> enum: left,
 
93
right, top, and bottom. You can specify which dock widget area that
 
94
should occupy the corners where the areas overlap with
 
95
<tt>setCorner()</tt>. By default each area can only contain one row
 
96
(vertical or horizontal) of dock widgets, but if you enable nesting
 
97
with <tt>setDockNestingEnabled()</tt>, dock widgets can be added in
 
98
either direction.</p>
 
99
<p>Two dock widgets may also be stacked on top of each other. A
 
100
<a href="qtabbar.html">QTabBar</a> is then used to select which of
 
101
the widgets that should be displayed.</p>
 
102
<p>We give an example of how to create and add dock widgets to a
 
103
main window:</p>
 
104
<pre class="highlightedCode brush: cpp">
 
105
     QDockWidget *dockWidget = new QDockWidget(tr("Dock Widget"), this);
59
106
     dockWidget-&gt;setAllowedAreas(Qt.LeftDockWidgetArea |
60
107
                                 Qt.RightDockWidgetArea);
61
108
     dockWidget-&gt;setWidget(dockWidgetContents);
62
 
     addDockWidget(Qt.LeftDockWidgetArea, dockWidget);</pre>
63
 
<a name="the-status-bar" />
 
109
     addDockWidget(Qt.LeftDockWidgetArea, dockWidget);
 
110
</pre>
 
111
<a id="the-status-bar" name="the-status-bar" />
64
112
<h4>The Status Bar</h4>
65
 
<p>You can set a status bar with <tt>setStatusBar()</tt>, but one is created the first time <tt>statusBar()</tt> (which returns the main window's status bar) is called. See <a href="qstatusbar.html">QStatusBar</a> for information on how to use it.</p>
66
 
<a name="storing-state" />
 
113
<p>You can set a status bar with <tt>setStatusBar()</tt>, but one
 
114
is created the first time <tt>statusBar()</tt> (which returns the
 
115
main window's status bar) is called. See <a href="qstatusbar.html">QStatusBar</a> for information on how to use
 
116
it.</p>
 
117
<a id="storing-state" name="storing-state" />
67
118
<h3>Storing State</h3>
68
 
<p>QMainWindow can store the state of its layout with <tt>saveState()</tt>; it can later be retrieved with <tt>restoreState()</tt>. It is the position and size (relative to the size of the main window) of the toolbars and dock widgets that are stored.</p>
69
 
<p>See also <a href="qmenubar.html">QMenuBar</a>, <a href="qtoolbar.html">QToolBar</a>, <a href="qstatusbar.html">QStatusBar</a>, <a href="qdockwidget.html">QDockWidget</a>, <a href="mainwindows-application.html">Application Example</a>, <a href="mainwindows-dockwidgets.html">Dock Widgets Example</a>, <a href="mainwindows-mdi.html">MDI Example</a>, <a href="mainwindows-sdi.html">SDI Example</a>, and <a href="mainwindows-menus.html">Menus Example</a>.</p>
70
 
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="DockOption-enum" />QMainWindow.DockOption</h3><p>This enum contains flags that specify the docking behavior of <a href="qmainwindow.html">QMainWindow</a>.</p>
71
 
<p><table border="1" cellpadding="2" cellspacing="1" class="valuelist" width="100%">
72
 
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
73
 
<tr><td valign="top"><tt>QMainWindow.AnimatedDocks</tt></td><td align="center" valign="top"><tt>0x01</tt></td><td valign="top">Identical to the <a href="qmainwindow.html#animated-prop">animated</a> property.</td></tr>
74
 
<tr><td valign="top"><tt>QMainWindow.AllowNestedDocks</tt></td><td align="center" valign="top"><tt>0x02</tt></td><td valign="top">Identical to the <a href="qmainwindow.html#dockNestingEnabled-prop">dockNestingEnabled</a> property.</td></tr>
75
 
<tr><td valign="top"><tt>QMainWindow.AllowTabbedDocks</tt></td><td align="center" valign="top"><tt>0x04</tt></td><td valign="top">The user can drop one dock widget "on top" of another. The two widgets are stacked and a tab bar appears for selecting which one is visible.</td></tr>
76
 
<tr><td valign="top"><tt>QMainWindow.ForceTabbedDocks</tt></td><td align="center" valign="top"><tt>0x08</tt></td><td valign="top">Each dock area contains a single stack of tabbed dock widgets. In other words, dock widgets cannot be placed next to each other in a dock area. If this option is set, AllowNestedDocks has no effect.</td></tr>
77
 
<tr><td valign="top"><tt>QMainWindow.VerticalTabs</tt></td><td align="center" valign="top"><tt>0x10</tt></td><td valign="top">The two vertical dock areas on the sides of the main window show their tabs vertically. If this option is not set, all dock areas show their tabs at the bottom. Implies AllowTabbedDocks. See also <a href="qmainwindow.html#setTabPosition">setTabPosition</a>().</td></tr>
78
 
</table></p>
79
 
<p>These options only control how dock widgets may be dropped in a <a href="qmainwindow.html">QMainWindow</a>. They do not re-arrange the dock widgets to conform with the specified options. For this reason they should be set before any dock widgets are added to the main window. Exceptions to this are the AnimatedDocks and VerticalTabs options, which may be set at any time.</p>
 
119
<p>QMainWindow can store the state of its layout with
 
120
<tt>saveState()</tt>; it can later be retrieved with
 
121
<tt>restoreState()</tt>. It is the position and size (relative to
 
122
the size of the main window) of the toolbars and dock widgets that
 
123
are stored.</p>
 
124
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="DockOption-enum" />QMainWindow.DockOption</h3><p>This enum contains flags that specify the docking behavior of
 
125
<a href="qmainwindow.html">QMainWindow</a>.</p>
 
126
<table class="valuelist">
 
127
<tr class="odd">
 
128
<td />
 
129
</tr>
 
130
<tr>
 
131
<th class="tblConst">Constant</th>
 
132
<th class="tblval">Value</th>
 
133
<th class="tbldscr">Description</th>
 
134
</tr>
 
135
<tr>
 
136
<td class="topAlign"><tt>QMainWindow.AnimatedDocks</tt></td>
 
137
<td class=" topAlign"><tt>0x01</tt></td>
 
138
<td class="topAlign">Identical to the <a href="qmainwindow.html#animated-prop">animated</a> property.</td>
 
139
</tr>
 
140
<tr>
 
141
<td class="topAlign"><tt>QMainWindow.AllowNestedDocks</tt></td>
 
142
<td class=" topAlign"><tt>0x02</tt></td>
 
143
<td class="topAlign">Identical to the <a href="qmainwindow.html#dockNestingEnabled-prop">dockNestingEnabled</a>
 
144
property.</td>
 
145
</tr>
 
146
<tr>
 
147
<td class="topAlign"><tt>QMainWindow.AllowTabbedDocks</tt></td>
 
148
<td class=" topAlign"><tt>0x04</tt></td>
 
149
<td class="topAlign">The user can drop one dock widget "on top" of
 
150
another. The two widgets are stacked and a tab bar appears for
 
151
selecting which one is visible.</td>
 
152
</tr>
 
153
<tr>
 
154
<td class="topAlign"><tt>QMainWindow.ForceTabbedDocks</tt></td>
 
155
<td class=" topAlign"><tt>0x08</tt></td>
 
156
<td class="topAlign">Each dock area contains a single stack of
 
157
tabbed dock widgets. In other words, dock widgets cannot be placed
 
158
next to each other in a dock area. If this option is set,
 
159
AllowNestedDocks has no effect.</td>
 
160
</tr>
 
161
<tr>
 
162
<td class="topAlign"><tt>QMainWindow.VerticalTabs</tt></td>
 
163
<td class=" topAlign"><tt>0x10</tt></td>
 
164
<td class="topAlign">The two vertical dock areas on the sides of
 
165
the main window show their tabs vertically. If this option is not
 
166
set, all dock areas show their tabs at the bottom. Implies
 
167
AllowTabbedDocks. See also <a href="qmainwindow.html#setTabPosition">setTabPosition</a>().</td>
 
168
</tr>
 
169
</table>
 
170
<p>These options only control how dock widgets may be dropped in a
 
171
<a href="qmainwindow.html">QMainWindow</a>. They do not re-arrange
 
172
the dock widgets to conform with the specified options. For this
 
173
reason they should be set before any dock widgets are added to the
 
174
main window. Exceptions to this are the AnimatedDocks and
 
175
VerticalTabs options, which may be set at any time.</p>
80
176
<p>This enum was introduced in Qt 4.3.</p>
81
 
<p>The DockOptions type is a typedef for <a href="qflags.html">QFlags</a>&lt;DockOption&gt;. It stores an OR combination of DockOption values.</p>
82
 
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QMainWindow" />QMainWindow.__init__ (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>parent</i>&#160;=&#160;None, <a href="qt-windowflags.html">Qt.WindowFlags</a>&#160;<i>flags</i>&#160;=&#160;0)</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 a <a href="qmainwindow.html">QMainWindow</a> with the given <i>parent</i> and the specified widget <i>flags</i>.</p>
83
 
<p><a href="qmainwindow.html">QMainWindow</a> sets the <a href="qt.html#WindowType-enum">Qt.Window</a> flag itself, and will hence always be created as a top-level widget.</p>
84
 
<a name="//apple_ref/cpp/instm/QMainWindow/~QMainWindow" />
85
 
<h3 class="fn"><a name="addDockWidget" />QMainWindow.addDockWidget (<i>self</i>, <a href="qt.html#DockWidgetArea-enum">Qt.DockWidgetArea</a>, <a href="qdockwidget.html">QDockWidget</a>)</h3><p>The <i>QDockWidget</i> argument has it's ownership transferred to Qt.</p><p>Adds the given <i>dockwidget</i> to the specified <i>area</i>.</p>
86
 
<h3 class="fn"><a name="addDockWidget-2" />QMainWindow.addDockWidget (<i>self</i>, <a href="qt.html#DockWidgetArea-enum">Qt.DockWidgetArea</a>, <a href="qdockwidget.html">QDockWidget</a>, <a href="qt.html#Orientation-enum">Qt.Orientation</a>)</h3><p>The <i>QDockWidget</i> argument has it's ownership transferred to Qt.</p><p>Adds <i>dockwidget</i> into the given <i>area</i> in the direction specified by the <i>orientation</i>.</p>
87
 
<a name="//apple_ref/cpp/instm/QMainWindow/addToolBar" />
88
 
<h3 class="fn"><a name="addToolBar" />QMainWindow.addToolBar (<i>self</i>, <a href="qt.html#ToolBarArea-enum">Qt.ToolBarArea</a>, <a href="qtoolbar.html">QToolBar</a>)</h3><p>The <i>QToolBar</i> argument has it's ownership transferred to Qt.</p><p>Adds the <i>toolbar</i> into the specified <i>area</i> in this main window. The <i>toolbar</i> is placed at the end of the current tool bar block (i.e. line). If the main window already manages <i>toolbar</i> then it will only move the toolbar to <i>area</i>.</p>
89
 
<p>See also <a href="qmainwindow.html#insertToolBar">insertToolBar</a>(), <a href="qmainwindow.html#addToolBarBreak">addToolBarBreak</a>(), and <a href="qmainwindow.html#insertToolBarBreak">insertToolBarBreak</a>().</p>
 
177
<p>The DockOptions type is a typedef for <a href="qflags.html">QFlags</a>&lt;DockOption&gt;. It stores an OR
 
178
combination of DockOption values.</p>
 
179
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QMainWindow" />QMainWindow.__init__ (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>parent</i>&#160;=&#160;None, <a href="qt-windowflags.html">Qt.WindowFlags</a>&#160;<i>flags</i>&#160;=&#160;0)</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 a <a href="qmainwindow.html">QMainWindow</a> with the
 
180
given <i>parent</i> and the specified widget <i>flags</i>.</p>
 
181
<p><a href="qmainwindow.html">QMainWindow</a> sets the <a href="qt.html#WindowType-enum">Qt.Window</a> flag itself, and will
 
182
hence always be created as a top-level widget.</p>
 
183
 
 
184
 
 
185
<h3 class="fn"><a name="addDockWidget" />QMainWindow.addDockWidget (<i>self</i>, <a href="qt.html#DockWidgetArea-enum">Qt.DockWidgetArea</a>, <a href="qdockwidget.html">QDockWidget</a>)</h3><p>The <i>QDockWidget</i> argument has it's ownership transferred to Qt.</p><p>Adds the given <i>dockwidget</i> to the specified
 
186
<i>area</i>.</p>
 
187
 
 
188
 
 
189
<h3 class="fn"><a name="addDockWidget-2" />QMainWindow.addDockWidget (<i>self</i>, <a href="qt.html#DockWidgetArea-enum">Qt.DockWidgetArea</a>, <a href="qdockwidget.html">QDockWidget</a>, <a href="qt.html#Orientation-enum">Qt.Orientation</a>)</h3><p>The <i>QDockWidget</i> argument has it's ownership transferred to Qt.</p><p>Adds <i>dockwidget</i> into the given <i>area</i> in the
 
190
direction specified by the <i>orientation</i>.</p>
 
191
 
 
192
 
 
193
<h3 class="fn"><a name="addToolBar" />QMainWindow.addToolBar (<i>self</i>, <a href="qt.html#ToolBarArea-enum">Qt.ToolBarArea</a>, <a href="qtoolbar.html">QToolBar</a>)</h3><p>The <i>QToolBar</i> argument has it's ownership transferred to Qt.</p><p>Adds the <i>toolbar</i> into the specified <i>area</i> in this
 
194
main window. The <i>toolbar</i> is placed at the end of the current
 
195
tool bar block (i.e. line). If the main window already manages
 
196
<i>toolbar</i> then it will only move the toolbar to
 
197
<i>area</i>.</p>
 
198
<p>See also <a href="qmainwindow.html#insertToolBar">insertToolBar</a>(), <a href="qmainwindow.html#addToolBarBreak">addToolBarBreak</a>(), and
 
199
<a href="qmainwindow.html#insertToolBarBreak">insertToolBarBreak</a>().</p>
 
200
 
 
201
 
90
202
<h3 class="fn"><a name="addToolBar-2" />QMainWindow.addToolBar (<i>self</i>, <a href="qtoolbar.html">QToolBar</a>)</h3><p>The <i>QToolBar</i> argument has it's ownership transferred to Qt.</p><p>This is an overloaded function.</p>
91
 
<p>Equivalent of calling addToolBar(<a href="qt.html#ToolBarArea-enum">Qt.TopToolBarArea</a>, <i>toolbar</i>)</p>
 
203
<p>Equivalent of calling addToolBar(<a href="qt.html#ToolBarArea-enum">Qt.TopToolBarArea</a>,
 
204
<i>toolbar</i>)</p>
 
205
 
 
206
 
92
207
<h3 class="fn"><a name="addToolBar-3" /><a href="qtoolbar.html">QToolBar</a> QMainWindow.addToolBar (<i>self</i>, QString)</h3><p>This is an overloaded function.</p>
93
 
<p>Creates a <a href="qtoolbar.html">QToolBar</a> object, setting its window title to <i>title</i>, and inserts it into the top toolbar area.</p>
 
208
<p>Creates a <a href="qtoolbar.html">QToolBar</a> object, setting
 
209
its window title to <i>title</i>, and inserts it into the top
 
210
toolbar area.</p>
94
211
<p>See also <a href="qwidget.html#windowTitle-prop">setWindowTitle</a>().</p>
95
 
<a name="//apple_ref/cpp/instm/QMainWindow/addToolBarBreak" />
96
 
<h3 class="fn"><a name="addToolBarBreak" />QMainWindow.addToolBarBreak (<i>self</i>, <a href="qt.html#ToolBarArea-enum">Qt.ToolBarArea</a>&#160;<i>area</i>&#160;=&#160;Qt.TopToolBarArea)</h3><p>Adds a toolbar break to the given <i>area</i> after all the other objects that are present.</p>
97
 
<a name="//apple_ref/cpp/instm/QMainWindow/centralWidget" />
98
 
<h3 class="fn"><a name="centralWidget" /><a href="qwidget.html">QWidget</a> QMainWindow.centralWidget (<i>self</i>)</h3><p>Returns the central widget for the main window. This function returns zero if the central widget has not been set.</p>
 
212
 
 
213
 
 
214
<h3 class="fn"><a name="addToolBarBreak" />QMainWindow.addToolBarBreak (<i>self</i>, <a href="qt.html#ToolBarArea-enum">Qt.ToolBarArea</a>&#160;<i>area</i>&#160;=&#160;Qt.TopToolBarArea)</h3><p>Adds a toolbar break to the given <i>area</i> after all the
 
215
other objects that are present.</p>
 
216
 
 
217
 
 
218
<h3 class="fn"><a name="centralWidget" /><a href="qwidget.html">QWidget</a> QMainWindow.centralWidget (<i>self</i>)</h3><p>Returns the central widget for the main window. This function
 
219
returns zero if the central widget has not been set.</p>
99
220
<p>See also <a href="qmainwindow.html#setCentralWidget">setCentralWidget</a>().</p>
100
 
<a name="//apple_ref/cpp/instm/QMainWindow/contextMenuEvent" />
 
221
 
 
222
 
101
223
<h3 class="fn"><a name="contextMenuEvent" />QMainWindow.contextMenuEvent (<i>self</i>, <a href="qcontextmenuevent.html">QContextMenuEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#contextMenuEvent">QWidget.contextMenuEvent</a>().</p>
102
 
<a name="//apple_ref/cpp/instm/QMainWindow/corner" />
103
 
<h3 class="fn"><a name="corner" /><a href="qt.html#DockWidgetArea-enum">Qt.DockWidgetArea</a> QMainWindow.corner (<i>self</i>, <a href="qt.html#Corner-enum">Qt.Corner</a>)</h3><p>Returns the dock widget area that occupies the specified <i>corner</i>.</p>
 
224
 
 
225
 
 
226
<h3 class="fn"><a name="corner" /><a href="qt.html#DockWidgetArea-enum">Qt.DockWidgetArea</a> QMainWindow.corner (<i>self</i>, <a href="qt.html#Corner-enum">Qt.Corner</a>)</h3><p>Returns the dock widget area that occupies the specified
 
227
<i>corner</i>.</p>
104
228
<p>See also <a href="qmainwindow.html#setCorner">setCorner</a>().</p>
105
 
<a name="//apple_ref/cpp/instm/QMainWindow/createPopupMenu" />
106
 
<h3 class="fn"><a name="createPopupMenu" /><a href="qmenu.html">QMenu</a> QMainWindow.createPopupMenu (<i>self</i>)</h3><p>Returns a popup menu containing checkable entries for the toolbars and dock widgets present in the main window. If there are no toolbars and dock widgets present, this function returns a null pointer.</p>
107
 
<p>By default, this function is called by the main window when the user activates a context menu, typically by right-clicking on a toolbar or a dock widget.</p>
108
 
<p>If you want to create a custom popup menu, reimplement this function and return a newly-created popup menu. Ownership of the popup menu is transferred to the caller.</p>
 
229
 
 
230
 
 
231
<h3 class="fn"><a name="createPopupMenu" /><a href="qmenu.html">QMenu</a> QMainWindow.createPopupMenu (<i>self</i>)</h3><p>Returns a popup menu containing checkable entries for the
 
232
toolbars and dock widgets present in the main window. If there are
 
233
no toolbars and dock widgets present, this function returns a null
 
234
pointer.</p>
 
235
<p>By default, this function is called by the main window when the
 
236
user activates a context menu, typically by right-clicking on a
 
237
toolbar or a dock widget.</p>
 
238
<p>If you want to create a custom popup menu, reimplement this
 
239
function and return a newly-created popup menu. Ownership of the
 
240
popup menu is transferred to the caller.</p>
109
241
<p>See also <a href="qmainwindow.html#addDockWidget">addDockWidget</a>(), <a href="qmainwindow.html#addToolBar">addToolBar</a>(), and <a href="qmainwindow.html#menuBar">menuBar</a>().</p>
110
 
<a name="//apple_ref/cpp/instm/QMainWindow/dockWidgetArea" />
111
 
<h3 class="fn"><a name="dockOptions" /><a href="qmainwindow-dockoptions.html">DockOptions</a> QMainWindow.dockOptions (<i>self</i>)</h3><h3 class="fn"><a name="dockWidgetArea" /><a href="qt.html#DockWidgetArea-enum">Qt.DockWidgetArea</a> QMainWindow.dockWidgetArea (<i>self</i>, <a href="qdockwidget.html">QDockWidget</a>)</h3><p>Returns the <a href="qt.html#DockWidgetArea-enum">Qt.DockWidgetArea</a> for <i>dockwidget</i>. If <i>dockwidget</i> has not been added to the main window, this function returns <tt>Qt.NoDockWidgetArea</tt>.</p>
112
 
<p>See also <a href="qmainwindow.html#addDockWidget">addDockWidget</a>(), <a href="qmainwindow.html#splitDockWidget">splitDockWidget</a>(), and <a href="qt.html#DockWidgetArea-enum">Qt.DockWidgetArea</a>.</p>
113
 
<a name="//apple_ref/cpp/instm/QMainWindow/event" />
 
242
 
 
243
 
 
244
<h3 class="fn"><a name="dockOptions" /><a href="qmainwindow-dockoptions.html">DockOptions</a> QMainWindow.dockOptions (<i>self</i>)</h3><h3 class="fn"><a name="dockWidgetArea" /><a href="qt.html#DockWidgetArea-enum">Qt.DockWidgetArea</a> QMainWindow.dockWidgetArea (<i>self</i>, <a href="qdockwidget.html">QDockWidget</a>)</h3><p>Returns the <a href="qt.html#DockWidgetArea-enum">Qt.DockWidgetArea</a> for
 
245
<i>dockwidget</i>. If <i>dockwidget</i> has not been added to the
 
246
main window, this function returns
 
247
<tt>Qt.NoDockWidgetArea</tt>.</p>
 
248
<p>See also <a href="qmainwindow.html#addDockWidget">addDockWidget</a>(), <a href="qmainwindow.html#splitDockWidget">splitDockWidget</a>(), and
 
249
<a href="qt.html#DockWidgetArea-enum">Qt.DockWidgetArea</a>.</p>
 
250
 
 
251
 
114
252
<h3 class="fn"><a name="documentMode" />bool QMainWindow.documentMode (<i>self</i>)</h3><h3 class="fn"><a name="event" />bool QMainWindow.event (<i>self</i>, <a href="qevent.html">QEvent</a>)</h3><p>Reimplemented from <a href="qobject.html#event">QObject.event</a>().</p>
115
 
<a name="//apple_ref/cpp/instm/QMainWindow/iconSizeChanged" />
116
 
<h3 class="fn"><a name="iconSize" /><a href="qsize.html">QSize</a> QMainWindow.iconSize (<i>self</i>)</h3><h3 class="fn"><a name="insertToolBar" />QMainWindow.insertToolBar (<i>self</i>, <a href="qtoolbar.html">QToolBar</a>, <a href="qtoolbar.html">QToolBar</a>)</h3><p>The <i>QToolBar</i> argument has it's ownership transferred to Qt.</p><p>Inserts the <i>toolbar</i> into the area occupied by the <i>before</i> toolbar so that it appears before it. For example, in normal left-to-right layout operation, this means that <i>toolbar</i> will appear to the left of the toolbar specified by <i>before</i> in a horizontal toolbar area.</p>
117
 
<p>See also <a href="qmainwindow.html#insertToolBarBreak">insertToolBarBreak</a>(), <a href="qmainwindow.html#addToolBar">addToolBar</a>(), and <a href="qmainwindow.html#addToolBarBreak">addToolBarBreak</a>().</p>
118
 
<a name="//apple_ref/cpp/instm/QMainWindow/insertToolBarBreak" />
119
 
<h3 class="fn"><a name="insertToolBarBreak" />QMainWindow.insertToolBarBreak (<i>self</i>, <a href="qtoolbar.html">QToolBar</a>)</h3><p>Inserts a toolbar break before the toolbar specified by <i>before</i>.</p>
120
 
<a name="//apple_ref/cpp/instm/QMainWindow/menuBar" />
121
 
<h3 class="fn"><a name="isAnimated" />bool QMainWindow.isAnimated (<i>self</i>)</h3><h3 class="fn"><a name="isDockNestingEnabled" />bool QMainWindow.isDockNestingEnabled (<i>self</i>)</h3><h3 class="fn"><a name="isSeparator" />bool QMainWindow.isSeparator (<i>self</i>, <a href="qpoint.html">QPoint</a>)</h3><h3 class="fn"><a name="menuBar" /><a href="qmenubar.html">QMenuBar</a> QMainWindow.menuBar (<i>self</i>)</h3><p>Returns the menu bar for the main window. This function creates and returns an empty menu bar if the menu bar does not exist.</p>
122
 
<p>If you want all windows in a Mac application to share one menu bar, don't use this function to create it, because the menu bar created here will have this <a href="qmainwindow.html">QMainWindow</a> as its parent. Instead, you must create a menu bar that does not have a parent, which you can then share among all the Mac windows. Create a parent-less menu bar this way:</p>
123
 
<pre> QMenuBar *menuBar = new QMenuBar(0);</pre>
 
253
 
 
254
 
 
255
<h3 class="fn"><a name="iconSize" /><a href="qsize.html">QSize</a> QMainWindow.iconSize (<i>self</i>)</h3><h3 class="fn"><a name="insertToolBar" />QMainWindow.insertToolBar (<i>self</i>, <a href="qtoolbar.html">QToolBar</a>, <a href="qtoolbar.html">QToolBar</a>)</h3><p>The <i>QToolBar</i> argument has it's ownership transferred to Qt.</p><p>Inserts the <i>toolbar</i> into the area occupied by the
 
256
<i>before</i> toolbar so that it appears before it. For example, in
 
257
normal left-to-right layout operation, this means that
 
258
<i>toolbar</i> will appear to the left of the toolbar specified by
 
259
<i>before</i> in a horizontal toolbar area.</p>
 
260
<p>See also <a href="qmainwindow.html#insertToolBarBreak">insertToolBarBreak</a>(),
 
261
<a href="qmainwindow.html#addToolBar">addToolBar</a>(), and
 
262
<a href="qmainwindow.html#addToolBarBreak">addToolBarBreak</a>().</p>
 
263
 
 
264
 
 
265
<h3 class="fn"><a name="insertToolBarBreak" />QMainWindow.insertToolBarBreak (<i>self</i>, <a href="qtoolbar.html">QToolBar</a>)</h3><p>Inserts a toolbar break before the toolbar specified by
 
266
<i>before</i>.</p>
 
267
 
 
268
 
 
269
<h3 class="fn"><a name="isAnimated" />bool QMainWindow.isAnimated (<i>self</i>)</h3><h3 class="fn"><a name="isDockNestingEnabled" />bool QMainWindow.isDockNestingEnabled (<i>self</i>)</h3><h3 class="fn"><a name="isSeparator" />bool QMainWindow.isSeparator (<i>self</i>, <a href="qpoint.html">QPoint</a>)</h3><h3 class="fn"><a name="menuBar" /><a href="qmenubar.html">QMenuBar</a> QMainWindow.menuBar (<i>self</i>)</h3><p>Returns the menu bar for the main window. This function creates
 
270
and returns an empty menu bar if the menu bar does not exist.</p>
 
271
<p>If you want all windows in a Mac application to share one menu
 
272
bar, don't use this function to create it, because the menu bar
 
273
created here will have this <a href="qmainwindow.html">QMainWindow</a> as its parent. Instead, you must
 
274
create a menu bar that does not have a parent, which you can then
 
275
share among all the Mac windows. Create a parent-less menu bar this
 
276
way:</p>
 
277
<pre class="highlightedCode brush: cpp">
 
278
 QMenuBar *menuBar = new QMenuBar(0);
 
279
</pre>
124
280
<p>See also <a href="qmainwindow.html#setMenuBar">setMenuBar</a>().</p>
125
 
<a name="//apple_ref/cpp/instm/QMainWindow/menuWidget" />
126
 
<h3 class="fn"><a name="menuWidget" /><a href="qwidget.html">QWidget</a> QMainWindow.menuWidget (<i>self</i>)</h3><p>Returns the menu bar for the main window. This function returns null if a menu bar hasn't been constructed yet.</p>
 
281
 
 
282
 
 
283
<h3 class="fn"><a name="menuWidget" /><a href="qwidget.html">QWidget</a> QMainWindow.menuWidget (<i>self</i>)</h3><p>Returns the menu bar for the main window. This function returns
 
284
null if a menu bar hasn't been constructed yet.</p>
127
285
<p>This function was introduced in Qt 4.2.</p>
128
286
<p>See also <a href="qmainwindow.html#setMenuWidget">setMenuWidget</a>().</p>
129
 
<a name="//apple_ref/cpp/instm/QMainWindow/removeDockWidget" />
130
 
<h3 class="fn"><a name="removeDockWidget" />QMainWindow.removeDockWidget (<i>self</i>, <a href="qdockwidget.html">QDockWidget</a>)</h3><p>The <i>QDockWidget</i> argument</p><p>Removes the <i>dockwidget</i> from the main window layout and hides it. Note that the <i>dockwidget</i> is <i>not</i> deleted.</p>
131
 
<a name="//apple_ref/cpp/instm/QMainWindow/removeToolBar" />
132
 
<h3 class="fn"><a name="removeToolBar" />QMainWindow.removeToolBar (<i>self</i>, <a href="qtoolbar.html">QToolBar</a>)</h3><p>Removes the <i>toolbar</i> from the main window layout and hides it. Note that the <i>toolbar</i> is <i>not</i> deleted.</p>
133
 
<a name="//apple_ref/cpp/instm/QMainWindow/removeToolBarBreak" />
134
 
<h3 class="fn"><a name="removeToolBarBreak" />QMainWindow.removeToolBarBreak (<i>self</i>, <a href="qtoolbar.html">QToolBar</a>)</h3><p>Removes a toolbar break previously inserted before the toolbar specified by <i>before</i>.</p>
135
 
<a name="//apple_ref/cpp/instm/QMainWindow/restoreDockWidget" />
136
 
<h3 class="fn"><a name="restoreDockWidget" />bool QMainWindow.restoreDockWidget (<i>self</i>, <a href="qdockwidget.html">QDockWidget</a>)</h3><p>Restores the state of <i>dockwidget</i> if it is created after the call to <a href="qmainwindow.html#restoreState">restoreState</a>(). Returns true if the state was restored; otherwise returns false.</p>
 
287
 
 
288
 
 
289
<h3 class="fn"><a name="removeDockWidget" />QMainWindow.removeDockWidget (<i>self</i>, <a href="qdockwidget.html">QDockWidget</a>)</h3><p>The <i>QDockWidget</i> argument</p><p>Removes the <i>dockwidget</i> from the main window layout and
 
290
hides it. Note that the <i>dockwidget</i> is <i>not</i>
 
291
deleted.</p>
 
292
 
 
293
 
 
294
<h3 class="fn"><a name="removeToolBar" />QMainWindow.removeToolBar (<i>self</i>, <a href="qtoolbar.html">QToolBar</a>)</h3><p>Removes the <i>toolbar</i> from the main window layout and hides
 
295
it. Note that the <i>toolbar</i> is <i>not</i> deleted.</p>
 
296
 
 
297
 
 
298
<h3 class="fn"><a name="removeToolBarBreak" />QMainWindow.removeToolBarBreak (<i>self</i>, <a href="qtoolbar.html">QToolBar</a>)</h3><p>Removes a toolbar break previously inserted before the toolbar
 
299
specified by <i>before</i>.</p>
 
300
 
 
301
 
 
302
<h3 class="fn"><a name="restoreDockWidget" />bool QMainWindow.restoreDockWidget (<i>self</i>, <a href="qdockwidget.html">QDockWidget</a>)</h3><p>Restores the state of <i>dockwidget</i> if it is created after
 
303
the call to <a href="qmainwindow.html#restoreState">restoreState</a>(). Returns true if
 
304
the state was restored; otherwise returns false.</p>
137
305
<p>See also <a href="qmainwindow.html#restoreState">restoreState</a>() and <a href="qmainwindow.html#saveState">saveState</a>().</p>
138
 
<a name="//apple_ref/cpp/instm/QMainWindow/restoreState" />
139
 
<h3 class="fn"><a name="restoreState" />bool QMainWindow.restoreState (<i>self</i>, <a href="qbytearray.html">QByteArray</a>, int&#160;<i>version</i>&#160;=&#160;0)</h3><p>Restores the <i>state</i> of this mainwindow's toolbars and dockwidgets. The <i>version</i> number is compared with that stored in <i>state</i>. If they do not match, the mainwindow's state is left unchanged, and this function returns <tt>false</tt>; otherwise, the state is restored, and this function returns <tt>true</tt>.</p>
 
306
 
 
307
 
 
308
<h3 class="fn"><a name="restoreState" />bool QMainWindow.restoreState (<i>self</i>, <a href="qbytearray.html">QByteArray</a>, int&#160;<i>version</i>&#160;=&#160;0)</h3><p>Restores the <i>state</i> of this mainwindow's toolbars and
 
309
dockwidgets. The <i>version</i> number is compared with that stored
 
310
in <i>state</i>. If they do not match, the mainwindow's state is
 
311
left unchanged, and this function returns <tt>false</tt>;
 
312
otherwise, the state is restored, and this function returns
 
313
<tt>true</tt>.</p>
140
314
<p>To restore geometry saved using <a href="qsettings.html">QSettings</a>, you can use code like this:</p>
141
 
<pre> void MainWindow.readSettings()
 
315
<pre class="highlightedCode brush: cpp">
 
316
 void MainWindow.readSettings()
142
317
 {
143
318
     QSettings settings("MyCompany", "MyApp");
144
319
     restoreGeometry(settings.value("myWidget/geometry").toByteArray());
145
320
     restoreState(settings.value("myWidget/windowState").toByteArray());
146
 
 }</pre>
147
 
<p>See also <a href="qmainwindow.html#saveState">saveState</a>(), <a href="qwidget.html#saveGeometry">QWidget.saveGeometry</a>(), <a href="qwidget.html#restoreGeometry">QWidget.restoreGeometry</a>(), and <a href="qmainwindow.html#restoreDockWidget">restoreDockWidget</a>().</p>
148
 
<a name="//apple_ref/cpp/instm/QMainWindow/saveState" />
149
 
<h3 class="fn"><a name="saveState" /><a href="qbytearray.html">QByteArray</a> QMainWindow.saveState (<i>self</i>, int&#160;<i>version</i>&#160;=&#160;0)</h3><p>Saves the current state of this mainwindow's toolbars and dockwidgets. The <i>version</i> number is stored as part of the data.</p>
150
 
<p>The <a href="qobject.html#objectName-prop">objectName</a> property is used to identify each <a href="qtoolbar.html">QToolBar</a> and <a href="qdockwidget.html">QDockWidget</a>. You should make sure that this property is unique for each <a href="qtoolbar.html">QToolBar</a> and <a href="qdockwidget.html">QDockWidget</a> you add to the <a href="qmainwindow.html">QMainWindow</a></p>
151
 
<p>To restore the saved state, pass the return value and <i>version</i> number to <a href="qmainwindow.html#restoreState">restoreState</a>().</p>
152
 
<p>To save the geometry when the window closes, you can implement a close event like this:</p>
153
 
<pre> void MyMainWindow.closeEvent(QCloseEvent *event)
 
321
 }
 
322
</pre>
 
323
<p>See also <a href="qmainwindow.html#saveState">saveState</a>(),
 
324
<a href="qwidget.html#saveGeometry">QWidget.saveGeometry</a>(),
 
325
<a href="qwidget.html#restoreGeometry">QWidget.restoreGeometry</a>(), and
 
326
<a href="qmainwindow.html#restoreDockWidget">restoreDockWidget</a>().</p>
 
327
 
 
328
 
 
329
<h3 class="fn"><a name="saveState" /><a href="qbytearray.html">QByteArray</a> QMainWindow.saveState (<i>self</i>, int&#160;<i>version</i>&#160;=&#160;0)</h3><p>Saves the current state of this mainwindow's toolbars and
 
330
dockwidgets. The <i>version</i> number is stored as part of the
 
331
data.</p>
 
332
<p>The <a href="qobject.html#objectName-prop">objectName</a>
 
333
property is used to identify each <a href="qtoolbar.html">QToolBar</a> and <a href="qdockwidget.html">QDockWidget</a>. You should make sure that this
 
334
property is unique for each <a href="qtoolbar.html">QToolBar</a>
 
335
and <a href="qdockwidget.html">QDockWidget</a> you add to the
 
336
<a href="qmainwindow.html">QMainWindow</a></p>
 
337
<p>To restore the saved state, pass the return value and
 
338
<i>version</i> number to <a href="qmainwindow.html#restoreState">restoreState</a>().</p>
 
339
<p>To save the geometry when the window closes, you can implement a
 
340
close event like this:</p>
 
341
<pre class="highlightedCode brush: cpp">
 
342
 void MyMainWindow.closeEvent(QCloseEvent *event)
154
343
 {
155
344
     QSettings settings("MyCompany", "MyApp");
156
345
     settings.setValue("geometry", saveGeometry());
157
346
     settings.setValue("windowState", saveState());
158
347
     QMainWindow.closeEvent(event);
159
 
 }</pre>
160
 
<p>See also <a href="qmainwindow.html#restoreState">restoreState</a>(), <a href="qwidget.html#saveGeometry">QWidget.saveGeometry</a>(), and <a href="qwidget.html#restoreGeometry">QWidget.restoreGeometry</a>().</p>
161
 
<a name="//apple_ref/cpp/instm/QMainWindow/setCentralWidget" />
162
 
<h3 class="fn"><a name="setAnimated" />QMainWindow.setAnimated (<i>self</i>, bool)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setAnimated(bool)</tt>.</p><h3 class="fn"><a name="setCentralWidget" />QMainWindow.setCentralWidget (<i>self</i>, <a href="qwidget.html">QWidget</a>)</h3><p>The <i>QWidget</i> argument has it's ownership transferred to Qt.</p><p>Sets the given <i>widget</i> to be the main window's central widget.</p>
163
 
<p>Note: <a href="qmainwindow.html">QMainWindow</a> takes ownership of the <i>widget</i> pointer and deletes it at the appropriate time.</p>
 
348
 }
 
349
</pre>
 
350
<p>See also <a href="qmainwindow.html#restoreState">restoreState</a>(), <a href="qwidget.html#saveGeometry">QWidget.saveGeometry</a>(), and
 
351
<a href="qwidget.html#restoreGeometry">QWidget.restoreGeometry</a>().</p>
 
352
 
 
353
 
 
354
<h3 class="fn"><a name="setAnimated" />QMainWindow.setAnimated (<i>self</i>, bool)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setAnimated(bool)</tt>.</p><h3 class="fn"><a name="setCentralWidget" />QMainWindow.setCentralWidget (<i>self</i>, <a href="qwidget.html">QWidget</a>)</h3><p>The <i>QWidget</i> argument has it's ownership transferred to Qt.</p><p>Sets the given <i>widget</i> to be the main window's central
 
355
widget.</p>
 
356
<p>Note: <a href="qmainwindow.html">QMainWindow</a> takes ownership
 
357
of the <i>widget</i> pointer and deletes it at the appropriate
 
358
time.</p>
164
359
<p>See also <a href="qmainwindow.html#centralWidget">centralWidget</a>().</p>
165
 
<a name="//apple_ref/cpp/instm/QMainWindow/setCorner" />
166
 
<h3 class="fn"><a name="setCorner" />QMainWindow.setCorner (<i>self</i>, <a href="qt.html#Corner-enum">Qt.Corner</a>, <a href="qt.html#DockWidgetArea-enum">Qt.DockWidgetArea</a>)</h3><p>Sets the given dock widget <i>area</i> to occupy the specified <i>corner</i>.</p>
 
360
 
 
361
 
 
362
<h3 class="fn"><a name="setCorner" />QMainWindow.setCorner (<i>self</i>, <a href="qt.html#Corner-enum">Qt.Corner</a>, <a href="qt.html#DockWidgetArea-enum">Qt.DockWidgetArea</a>)</h3><p>Sets the given dock widget <i>area</i> to occupy the specified
 
363
<i>corner</i>.</p>
167
364
<p>See also <a href="qmainwindow.html#corner">corner</a>().</p>
168
 
<a name="//apple_ref/cpp/instm/QMainWindow/setMenuBar" />
 
365
 
 
366
 
169
367
<h3 class="fn"><a name="setDockNestingEnabled" />QMainWindow.setDockNestingEnabled (<i>self</i>, bool)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setDockNestingEnabled(bool)</tt>.</p><h3 class="fn"><a name="setDockOptions" />QMainWindow.setDockOptions (<i>self</i>, <a href="qmainwindow-dockoptions.html">DockOptions</a>)</h3><h3 class="fn"><a name="setDocumentMode" />QMainWindow.setDocumentMode (<i>self</i>, bool)</h3><h3 class="fn"><a name="setIconSize" />QMainWindow.setIconSize (<i>self</i>, <a href="qsize.html">QSize</a>)</h3><h3 class="fn"><a name="setMenuBar" />QMainWindow.setMenuBar (<i>self</i>, <a href="qmenubar.html">QMenuBar</a>)</h3><p>The <i>QMenuBar</i> argument has it's ownership transferred to Qt.</p><p>Sets the menu bar for the main window to <i>menuBar</i>.</p>
170
 
<p>Note: <a href="qmainwindow.html">QMainWindow</a> takes ownership of the <i>menuBar</i> pointer and deletes it at the appropriate time.</p>
 
368
<p>Note: <a href="qmainwindow.html">QMainWindow</a> takes ownership
 
369
of the <i>menuBar</i> pointer and deletes it at the appropriate
 
370
time.</p>
171
371
<p>See also <a href="qmainwindow.html#menuBar">menuBar</a>().</p>
172
 
<a name="//apple_ref/cpp/instm/QMainWindow/setMenuWidget" />
 
372
 
 
373
 
173
374
<h3 class="fn"><a name="setMenuWidget" />QMainWindow.setMenuWidget (<i>self</i>, <a href="qwidget.html">QWidget</a>)</h3><p>The <i>QWidget</i> argument has it's ownership transferred to Qt.</p><p>Sets the menu bar for the main window to <i>menuBar</i>.</p>
174
 
<p><a href="qmainwindow.html">QMainWindow</a> takes ownership of the <i>menuBar</i> pointer and deletes it at the appropriate time.</p>
 
375
<p><a href="qmainwindow.html">QMainWindow</a> takes ownership of
 
376
the <i>menuBar</i> pointer and deletes it at the appropriate
 
377
time.</p>
175
378
<p>This function was introduced in Qt 4.2.</p>
176
379
<p>See also <a href="qmainwindow.html#menuWidget">menuWidget</a>().</p>
177
 
<a name="//apple_ref/cpp/instm/QMainWindow/setStatusBar" />
 
380
 
 
381
 
178
382
<h3 class="fn"><a name="setStatusBar" />QMainWindow.setStatusBar (<i>self</i>, <a href="qstatusbar.html">QStatusBar</a>)</h3><p>The <i>QStatusBar</i> argument has it's ownership transferred to Qt.</p><p>Sets the status bar for the main window to <i>statusbar</i>.</p>
179
 
<p>Setting the status bar to 0 will remove it from the main window. Note that <a href="qmainwindow.html">QMainWindow</a> takes ownership of the <i>statusbar</i> pointer and deletes it at the appropriate time.</p>
 
383
<p>Setting the status bar to 0 will remove it from the main window.
 
384
Note that <a href="qmainwindow.html">QMainWindow</a> takes
 
385
ownership of the <i>statusbar</i> pointer and deletes it at the
 
386
appropriate time.</p>
180
387
<p>See also <a href="qmainwindow.html#statusBar">statusBar</a>().</p>
181
 
<a name="//apple_ref/cpp/instm/QMainWindow/setTabPosition" />
182
 
<h3 class="fn"><a name="setTabPosition" />QMainWindow.setTabPosition (<i>self</i>, <a href="qt-dockwidgetareas.html">Qt.DockWidgetAreas</a>, <a href="qtabwidget.html#TabPosition-enum">QTabWidget.TabPosition</a>)</h3><p>Sets the tab position for the given dock widget <i>areas</i> to the specified <i>tabPosition</i>. By default, all dock areas show their tabs at the bottom.</p>
183
 
<p><b>Note:</b> The <a href="qmainwindow.html#DockOption-enum">VerticalTabs</a> dock option overrides the tab positions set by this method.</p>
 
388
 
 
389
 
 
390
<h3 class="fn"><a name="setTabPosition" />QMainWindow.setTabPosition (<i>self</i>, <a href="qt-dockwidgetareas.html">Qt.DockWidgetAreas</a>, <a href="qtabwidget.html#TabPosition-enum">QTabWidget.TabPosition</a>)</h3><p>Sets the tab position for the given dock widget <i>areas</i> to
 
391
the specified <i>tabPosition</i>. By default, all dock areas show
 
392
their tabs at the bottom.</p>
 
393
<p><b>Note:</b> The <a href="qmainwindow.html#DockOption-enum">VerticalTabs</a> dock option
 
394
overrides the tab positions set by this method.</p>
184
395
<p>This function was introduced in Qt 4.5.</p>
185
396
<p>See also <a href="qmainwindow.html#tabPosition">tabPosition</a>() and <a href="qmainwindow.html#tabShape-prop">setTabShape</a>().</p>
186
 
<a name="//apple_ref/cpp/instm/QMainWindow/splitDockWidget" />
187
 
<h3 class="fn"><a name="setTabShape" />QMainWindow.setTabShape (<i>self</i>, <a href="qtabwidget.html#TabShape-enum">QTabWidget.TabShape</a>)</h3><h3 class="fn"><a name="setToolButtonStyle" />QMainWindow.setToolButtonStyle (<i>self</i>, <a href="qt.html#ToolButtonStyle-enum">Qt.ToolButtonStyle</a>)</h3><h3 class="fn"><a name="setUnifiedTitleAndToolBarOnMac" />QMainWindow.setUnifiedTitleAndToolBarOnMac (<i>self</i>, bool)</h3><h3 class="fn"><a name="splitDockWidget" />QMainWindow.splitDockWidget (<i>self</i>, <a href="qdockwidget.html">QDockWidget</a>, <a href="qdockwidget.html">QDockWidget</a>, <a href="qt.html#Orientation-enum">Qt.Orientation</a>)</h3><p>The <i>QDockWidget</i> argument has it's ownership transferred to Qt.</p><p>Splits the space covered by the <i>first</i> dock widget into two parts, moves the <i>first</i> dock widget into the first part, and moves the <i>second</i> dock widget into the second part.</p>
188
 
<p>The <i>orientation</i> specifies how the space is divided: A <a href="qt.html#Orientation-enum">Qt.Horizontal</a> split places the second dock widget to the right of the first; a <a href="qt.html#Orientation-enum">Qt.Vertical</a> split places the second dock widget below the first.</p>
189
 
<p><i>Note</i>: if <i>first</i> is currently in a tabbed docked area, <i>second</i> will be added as a new tab, not as a neighbor of <i>first</i>. This is because a single tab can contain only one dock widget.</p>
190
 
<p><i>Note</i>: The <a href="qt.html#LayoutDirection-enum">Qt.LayoutDirection</a> influences the order of the dock widgets in the two parts of the divided area. When right-to-left layout direction is enabled, the placing of the dock widgets will be reversed.</p>
191
 
<p>See also <a href="qmainwindow.html#tabifyDockWidget">tabifyDockWidget</a>(), <a href="qmainwindow.html#addDockWidget">addDockWidget</a>(), and <a href="qmainwindow.html#removeDockWidget">removeDockWidget</a>().</p>
192
 
<a name="//apple_ref/cpp/instm/QMainWindow/statusBar" />
193
 
<h3 class="fn"><a name="statusBar" /><a href="qstatusbar.html">QStatusBar</a> QMainWindow.statusBar (<i>self</i>)</h3><p>Returns the status bar for the main window. This function creates and returns an empty status bar if the status bar does not exist.</p>
 
397
 
 
398
 
 
399
<h3 class="fn"><a name="setTabShape" />QMainWindow.setTabShape (<i>self</i>, <a href="qtabwidget.html#TabShape-enum">QTabWidget.TabShape</a>)</h3><h3 class="fn"><a name="setToolButtonStyle" />QMainWindow.setToolButtonStyle (<i>self</i>, <a href="qt.html#ToolButtonStyle-enum">Qt.ToolButtonStyle</a>)</h3><h3 class="fn"><a name="setUnifiedTitleAndToolBarOnMac" />QMainWindow.setUnifiedTitleAndToolBarOnMac (<i>self</i>, bool)</h3><h3 class="fn"><a name="splitDockWidget" />QMainWindow.splitDockWidget (<i>self</i>, <a href="qdockwidget.html">QDockWidget</a>, <a href="qdockwidget.html">QDockWidget</a>, <a href="qt.html#Orientation-enum">Qt.Orientation</a>)</h3><p>The <i>QDockWidget</i> argument has it's ownership transferred to Qt.</p><p>Splits the space covered by the <i>first</i> dock widget into
 
400
two parts, moves the <i>first</i> dock widget into the first part,
 
401
and moves the <i>second</i> dock widget into the second part.</p>
 
402
<p>The <i>orientation</i> specifies how the space is divided: A
 
403
<a href="qt.html#Orientation-enum">Qt.Horizontal</a> split places
 
404
the second dock widget to the right of the first; a <a href="qt.html#Orientation-enum">Qt.Vertical</a> split places the second
 
405
dock widget below the first.</p>
 
406
<p><i>Note</i>: if <i>first</i> is currently in a tabbed docked
 
407
area, <i>second</i> will be added as a new tab, not as a neighbor
 
408
of <i>first</i>. This is because a single tab can contain only one
 
409
dock widget.</p>
 
410
<p><i>Note</i>: The <a href="qt.html#LayoutDirection-enum">Qt.LayoutDirection</a> influences
 
411
the order of the dock widgets in the two parts of the divided area.
 
412
When right-to-left layout direction is enabled, the placing of the
 
413
dock widgets will be reversed.</p>
 
414
<p>See also <a href="qmainwindow.html#tabifyDockWidget">tabifyDockWidget</a>(),
 
415
<a href="qmainwindow.html#addDockWidget">addDockWidget</a>(), and
 
416
<a href="qmainwindow.html#removeDockWidget">removeDockWidget</a>().</p>
 
417
 
 
418
 
 
419
<h3 class="fn"><a name="statusBar" /><a href="qstatusbar.html">QStatusBar</a> QMainWindow.statusBar (<i>self</i>)</h3><p>Returns the status bar for the main window. This function
 
420
creates and returns an empty status bar if the status bar does not
 
421
exist.</p>
194
422
<p>See also <a href="qmainwindow.html#setStatusBar">setStatusBar</a>().</p>
195
 
<a name="//apple_ref/cpp/instm/QMainWindow/tabPosition" />
196
 
<h3 class="fn"><a name="tabifiedDockWidgets" />list-of-QDockWidget QMainWindow.tabifiedDockWidgets (<i>self</i>, <a href="qdockwidget.html">QDockWidget</a>)</h3><p>Returns the dock widgets that are tabified together with <i>dockwidget</i>.</p>
 
423
 
 
424
 
 
425
<h3 class="fn"><a name="tabifiedDockWidgets" />list-of-QDockWidget QMainWindow.tabifiedDockWidgets (<i>self</i>, <a href="qdockwidget.html">QDockWidget</a>)</h3><p>Returns the dock widgets that are tabified together with
 
426
<i>dockwidget</i>.</p>
197
427
<p>This function was introduced in Qt 4.5.</p>
198
428
<p>See also <a href="qmainwindow.html#tabifyDockWidget">tabifyDockWidget</a>().</p>
199
 
<a name="//apple_ref/cpp/instm/QMainWindow/tabifyDockWidget" />
200
 
<h3 class="fn"><a name="tabifyDockWidget" />QMainWindow.tabifyDockWidget (<i>self</i>, <a href="qdockwidget.html">QDockWidget</a>, <a href="qdockwidget.html">QDockWidget</a>)</h3><p>Moves <i>second</i> dock widget on top of <i>first</i> dock widget, creating a tabbed docked area in the main window.</p>
 
429
 
 
430
 
 
431
<h3 class="fn"><a name="tabifyDockWidget" />QMainWindow.tabifyDockWidget (<i>self</i>, <a href="qdockwidget.html">QDockWidget</a>, <a href="qdockwidget.html">QDockWidget</a>)</h3><p>Moves <i>second</i> dock widget on top of <i>first</i> dock
 
432
widget, creating a tabbed docked area in the main window.</p>
201
433
<p>See also <a href="qmainwindow.html#tabifiedDockWidgets">tabifiedDockWidgets</a>().</p>
202
 
<a name="//apple_ref/cpp/instm/QMainWindow/toolBarArea" />
 
434
 
 
435
 
203
436
<h3 class="fn"><a name="tabPosition" /><a href="qtabwidget.html#TabPosition-enum">QTabWidget.TabPosition</a> QMainWindow.tabPosition (<i>self</i>, <a href="qt.html#DockWidgetArea-enum">Qt.DockWidgetArea</a>)</h3><p>Returns the tab position for <i>area</i>.</p>
204
 
<p><b>Note:</b> The <a href="qmainwindow.html#DockOption-enum">VerticalTabs</a> dock option overrides the tab positions returned by this function.</p>
 
437
<p><b>Note:</b> The <a href="qmainwindow.html#DockOption-enum">VerticalTabs</a> dock option
 
438
overrides the tab positions returned by this function.</p>
205
439
<p>This function was introduced in Qt 4.5.</p>
206
440
<p>See also <a href="qmainwindow.html#setTabPosition">setTabPosition</a>() and <a href="qmainwindow.html#tabShape-prop">tabShape</a>().</p>
207
 
<a name="//apple_ref/cpp/instm/QMainWindow/tabifiedDockWidgets" />
208
 
<h3 class="fn"><a name="tabShape" /><a href="qtabwidget.html#TabShape-enum">QTabWidget.TabShape</a> QMainWindow.tabShape (<i>self</i>)</h3><h3 class="fn"><a name="toolBarArea" /><a href="qt.html#ToolBarArea-enum">Qt.ToolBarArea</a> QMainWindow.toolBarArea (<i>self</i>, <a href="qtoolbar.html">QToolBar</a>)</h3><p>Returns the <a href="qt.html#ToolBarArea-enum">Qt.ToolBarArea</a> for <i>toolbar</i>. If <i>toolbar</i> has not been added to the main window, this function returns <tt>Qt.NoToolBarArea</tt>.</p>
209
 
<p>See also <a href="qmainwindow.html#addToolBar">addToolBar</a>(), <a href="qmainwindow.html#addToolBarBreak">addToolBarBreak</a>(), and <a href="qt.html#ToolBarArea-enum">Qt.ToolBarArea</a>.</p>
210
 
<a name="//apple_ref/cpp/instm/QMainWindow/toolBarBreak" />
211
 
<h3 class="fn"><a name="toolBarBreak" />bool QMainWindow.toolBarBreak (<i>self</i>, <a href="qtoolbar.html">QToolBar</a>)</h3><p>Returns whether there is a toolbar break before the <i>toolbar</i>.</p>
212
 
<p>See also <a href="qmainwindow.html#addToolBarBreak">addToolBarBreak</a>() and <a href="qmainwindow.html#insertToolBarBreak">insertToolBarBreak</a>().</p>
213
 
<a name="//apple_ref/cpp/instm/QMainWindow/toolButtonStyleChanged" />
214
 
<h3 class="fn"><a name="toolButtonStyle" /><a href="qt.html#ToolButtonStyle-enum">Qt.ToolButtonStyle</a> QMainWindow.toolButtonStyle (<i>self</i>)</h3><h3 class="fn"><a name="unifiedTitleAndToolBarOnMac" />bool QMainWindow.unifiedTitleAndToolBarOnMac (<i>self</i>)</h3><hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="iconSizeChanged" />void iconSizeChanged (const QSize&amp;)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the size of the icons used in the window is changed. The new icon size is passed in <i>iconSize</i>.</p>
215
 
<p>You can connect this signal to other components to help maintain a consistent appearance for your application.</p>
 
441
 
 
442
 
 
443
<h3 class="fn"><a name="tabShape" /><a href="qtabwidget.html#TabShape-enum">QTabWidget.TabShape</a> QMainWindow.tabShape (<i>self</i>)</h3><h3 class="fn"><a name="toolBarArea" /><a href="qt.html#ToolBarArea-enum">Qt.ToolBarArea</a> QMainWindow.toolBarArea (<i>self</i>, <a href="qtoolbar.html">QToolBar</a>)</h3><p>Returns the <a href="qt.html#ToolBarArea-enum">Qt.ToolBarArea</a> for <i>toolbar</i>.
 
444
If <i>toolbar</i> has not been added to the main window, this
 
445
function returns <tt>Qt.NoToolBarArea</tt>.</p>
 
446
<p>See also <a href="qmainwindow.html#addToolBar">addToolBar</a>(),
 
447
<a href="qmainwindow.html#addToolBarBreak">addToolBarBreak</a>(),
 
448
and <a href="qt.html#ToolBarArea-enum">Qt.ToolBarArea</a>.</p>
 
449
 
 
450
 
 
451
<h3 class="fn"><a name="toolBarBreak" />bool QMainWindow.toolBarBreak (<i>self</i>, <a href="qtoolbar.html">QToolBar</a>)</h3><p>Returns whether there is a toolbar break before the
 
452
<i>toolbar</i>.</p>
 
453
<p>See also <a href="qmainwindow.html#addToolBarBreak">addToolBarBreak</a>() and
 
454
<a href="qmainwindow.html#insertToolBarBreak">insertToolBarBreak</a>().</p>
 
455
 
 
456
 
 
457
<h3 class="fn"><a name="toolButtonStyle" /><a href="qt.html#ToolButtonStyle-enum">Qt.ToolButtonStyle</a> QMainWindow.toolButtonStyle (<i>self</i>)</h3><h3 class="fn"><a name="unifiedTitleAndToolBarOnMac" />bool QMainWindow.unifiedTitleAndToolBarOnMac (<i>self</i>)</h3><hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="iconSizeChanged" />void iconSizeChanged (const QSize&amp;)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the size of the icons used in the
 
458
window is changed. The new icon size is passed in
 
459
<i>iconSize</i>.</p>
 
460
<p>You can connect this signal to other components to help maintain
 
461
a consistent appearance for your application.</p>
216
462
<p>See also <a href="qmainwindow.html#iconSize-prop">setIconSize</a>().</p>
217
 
<a name="//apple_ref/cpp/instm/QMainWindow/insertToolBar" />
218
 
<h3 class="fn"><a name="toolButtonStyleChanged" />void toolButtonStyleChanged (Qt::ToolButtonStyle)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the style used for tool buttons in the window is changed. The new style is passed in <i>toolButtonStyle</i>.</p>
219
 
<p>You can connect this signal to other components to help maintain a consistent appearance for your application.</p>
 
463
 
 
464
 
 
465
<h3 class="fn"><a name="toolButtonStyleChanged" />void toolButtonStyleChanged (Qt::ToolButtonStyle)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the style used for tool buttons in
 
466
the window is changed. The new style is passed in
 
467
<i>toolButtonStyle</i>.</p>
 
468
<p>You can connect this signal to other components to help maintain
 
469
a consistent appearance for your application.</p>
220
470
<p>See also <a href="qmainwindow.html#toolButtonStyle-prop">setToolButtonStyle</a>().</p>
221
 
<p /><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.7.7 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt&#160;4.6.3</td></tr></table></div></address></body></html>
 
 
b'\\ No newline at end of file'
 
471
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.8.1 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt&#160;4.7.0</td></tr></table></div></address></body></html>
 
 
b'\\ No newline at end of file'