1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465
|
<?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>QMainWindow 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">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>
<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 <i>parent</i> = None, Qt.WindowFlags <i>flags</i> = 0)</li><li><div class="fn" /><b><a href="qmainwindow.html#addDockWidget">addDockWidget</a></b> (<i>self</i>, Qt.DockWidgetArea <i>area</i>, QDockWidget <i>dockwidget</i>)</li><li><div class="fn" /><b><a href="qmainwindow.html#addDockWidget-2">addDockWidget</a></b> (<i>self</i>, Qt.DockWidgetArea <i>area</i>, QDockWidget <i>dockwidget</i>, Qt.Orientation <i>orientation</i>)</li><li><div class="fn" /><b><a href="qmainwindow.html#addToolBar">addToolBar</a></b> (<i>self</i>, Qt.ToolBarArea <i>area</i>, QToolBar <i>toolbar</i>)</li><li><div class="fn" /><b><a href="qmainwindow.html#addToolBar-2">addToolBar</a></b> (<i>self</i>, QToolBar <i>toolbar</i>)</li><li><div class="fn" />QToolBar <b><a href="qmainwindow.html#addToolBar-3">addToolBar</a></b> (<i>self</i>, QString <i>title</i>)</li><li><div class="fn" /><b><a href="qmainwindow.html#addToolBarBreak">addToolBarBreak</a></b> (<i>self</i>, Qt.ToolBarArea <i>area</i> = 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 <i>event</i>)</li><li><div class="fn" />Qt.DockWidgetArea <b><a href="qmainwindow.html#corner">corner</a></b> (<i>self</i>, Qt.Corner <i>corner</i>)</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 <i>dockwidget</i>)</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 <i>event</i>)</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 <i>before</i>, QToolBar <i>toolbar</i>)</li><li><div class="fn" /><b><a href="qmainwindow.html#insertToolBarBreak">insertToolBarBreak</a></b> (<i>self</i>, QToolBar <i>before</i>)</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 <i>pos</i>)</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 <i>dockwidget</i>)</li><li><div class="fn" /><b><a href="qmainwindow.html#removeToolBar">removeToolBar</a></b> (<i>self</i>, QToolBar <i>toolbar</i>)</li><li><div class="fn" /><b><a href="qmainwindow.html#removeToolBarBreak">removeToolBarBreak</a></b> (<i>self</i>, QToolBar <i>before</i>)</li><li><div class="fn" />bool <b><a href="qmainwindow.html#restoreDockWidget">restoreDockWidget</a></b> (<i>self</i>, QDockWidget <i>dockwidget</i>)</li><li><div class="fn" />bool <b><a href="qmainwindow.html#restoreState">restoreState</a></b> (<i>self</i>, QByteArray <i>state</i>, int <i>version</i> = 0)</li><li><div class="fn" />QByteArray <b><a href="qmainwindow.html#saveState">saveState</a></b> (<i>self</i>, int <i>version</i> = 0)</li><li><div class="fn" /><b><a href="qmainwindow.html#setAnimated">setAnimated</a></b> (<i>self</i>, bool <i>enabled</i>)</li><li><div class="fn" /><b><a href="qmainwindow.html#setCentralWidget">setCentralWidget</a></b> (<i>self</i>, QWidget <i>widget</i>)</li><li><div class="fn" /><b><a href="qmainwindow.html#setCorner">setCorner</a></b> (<i>self</i>, Qt.Corner <i>corner</i>, Qt.DockWidgetArea <i>area</i>)</li><li><div class="fn" /><b><a href="qmainwindow.html#setDockNestingEnabled">setDockNestingEnabled</a></b> (<i>self</i>, bool <i>enabled</i>)</li><li><div class="fn" /><b><a href="qmainwindow.html#setDockOptions">setDockOptions</a></b> (<i>self</i>, DockOptions <i>options</i>)</li><li><div class="fn" /><b><a href="qmainwindow.html#setDocumentMode">setDocumentMode</a></b> (<i>self</i>, bool <i>enabled</i>)</li><li><div class="fn" /><b><a href="qmainwindow.html#setIconSize">setIconSize</a></b> (<i>self</i>, QSize <i>iconSize</i>)</li><li><div class="fn" /><b><a href="qmainwindow.html#setMenuBar">setMenuBar</a></b> (<i>self</i>, QMenuBar <i>menubar</i>)</li><li><div class="fn" /><b><a href="qmainwindow.html#setMenuWidget">setMenuWidget</a></b> (<i>self</i>, QWidget <i>menubar</i>)</li><li><div class="fn" /><b><a href="qmainwindow.html#setStatusBar">setStatusBar</a></b> (<i>self</i>, QStatusBar <i>statusbar</i>)</li><li><div class="fn" /><b><a href="qmainwindow.html#setTabPosition">setTabPosition</a></b> (<i>self</i>, Qt.DockWidgetAreas <i>areas</i>, QTabWidget.TabPosition <i>tabPosition</i>)</li><li><div class="fn" /><b><a href="qmainwindow.html#setTabShape">setTabShape</a></b> (<i>self</i>, QTabWidget.TabShape <i>tabShape</i>)</li><li><div class="fn" /><b><a href="qmainwindow.html#setToolButtonStyle">setToolButtonStyle</a></b> (<i>self</i>, Qt.ToolButtonStyle <i>toolButtonStyle</i>)</li><li><div class="fn" /><b><a href="qmainwindow.html#setUnifiedTitleAndToolBarOnMac">setUnifiedTitleAndToolBarOnMac</a></b> (<i>self</i>, bool <i>set</i>)</li><li><div class="fn" /><b><a href="qmainwindow.html#splitDockWidget">splitDockWidget</a></b> (<i>self</i>, QDockWidget <i>after</i>, QDockWidget <i>dockwidget</i>, Qt.Orientation <i>orientation</i>)</li><li><div class="fn" />QStatusBar <b><a href="qmainwindow.html#statusBar">statusBar</a></b> (<i>self</i>)</li><li><div class="fn" />unknown-type <b><a href="qmainwindow.html#tabifiedDockWidgets">tabifiedDockWidgets</a></b> (<i>self</i>, QDockWidget <i>dockwidget</i>)</li><li><div class="fn" /><b><a href="qmainwindow.html#tabifyDockWidget">tabifyDockWidget</a></b> (<i>self</i>, QDockWidget <i>first</i>, QDockWidget <i>second</i>)</li><li><div class="fn" />QTabWidget.TabPosition <b><a href="qmainwindow.html#tabPosition">tabPosition</a></b> (<i>self</i>, Qt.DockWidgetArea <i>area</i>)</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 <i>toolbar</i>)</li><li><div class="fn" />bool <b><a href="qmainwindow.html#toolBarBreak">toolBarBreak</a></b> (<i>self</i>, QToolBar <i>toolbar</i>)</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&)</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>
<a id="qt-main-window-framework" name="qt-main-window-framework" />
<h3>Qt Main Window Framework</h3>
<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>
<p class="centerAlign"><img alt="" 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>
<a id="creating-main-window-components" name="creating-main-window-components" />
<h3>Creating Main Window Components</h3>
<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>
<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>
<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>
<a id="creating-menus" name="creating-menus" />
<h4>Creating Menus</h4>
<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>
<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>
<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>
<p>An example of how to create menus follows:</p>
<pre class="cpp">
<span class="type">void</span> MainWindow<span class="operator">.</span>createMenus()
{
fileMenu <span class="operator">=</span> menuBar()<span class="operator">-</span><span class="operator">></span>addMenu(tr(<span class="string">"&File"</span>));
fileMenu<span class="operator">-</span><span class="operator">></span>addAction(newAct);
fileMenu<span class="operator">-</span><span class="operator">></span>addAction(openAct);
fileMenu<span class="operator">-</span><span class="operator">></span>addAction(saveAct);
</pre>
<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>
<a id="creating-toolbars" name="creating-toolbars" />
<h4>Creating Toolbars</h4>
<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>
<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>
<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>
<p>An example of toolbar creation follows:</p>
<pre class="cpp">
<span class="type">void</span> MainWindow<span class="operator">.</span>createToolBars()
{
fileToolBar <span class="operator">=</span> addToolBar(tr(<span class="string">"File"</span>));
fileToolBar<span class="operator">-</span><span class="operator">></span>addAction(newAct);
</pre>
<a id="creating-dock-widgets" name="creating-dock-widgets" />
<h4>Creating Dock Widgets</h4>
<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>
<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>
<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>
<p>We give an example of how to create and add dock widgets to a
main window:</p>
<pre class="cpp">
<span class="type"><a href="qdockwidget.html">QDockWidget</a></span> <span class="operator">*</span>dockWidget <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qdockwidget.html">QDockWidget</a></span>(tr(<span class="string">"Dock Widget"</span>)<span class="operator">,</span> <span class="keyword">this</span>);
dockWidget<span class="operator">-</span><span class="operator">></span>setAllowedAreas(<span class="type"><a href="qt.html">Qt</a></span><span class="operator">.</span>LeftDockWidgetArea <span class="operator">|</span>
<span class="type"><a href="qt.html">Qt</a></span><span class="operator">.</span>RightDockWidgetArea);
dockWidget<span class="operator">-</span><span class="operator">></span>setWidget(dockWidgetContents);
addDockWidget(<span class="type"><a href="qt.html">Qt</a></span><span class="operator">.</span>LeftDockWidgetArea<span class="operator">,</span> dockWidget);
</pre>
<a id="the-status-bar" name="the-status-bar" />
<h4>The Status Bar</h4>
<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>
<a id="storing-state" name="storing-state" />
<h3>Storing State</h3>
<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>
<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>
<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>QMainWindow.AnimatedDocks</tt></td>
<td class="topAlign"><tt>0x01</tt></td>
<td class="topAlign">Identical to the <a href="qmainwindow.html#animated-prop">animated</a> property.</td>
</tr>
<tr>
<td class="topAlign"><tt>QMainWindow.AllowNestedDocks</tt></td>
<td class="topAlign"><tt>0x02</tt></td>
<td class="topAlign">Identical to the <a href="qmainwindow.html#dockNestingEnabled-prop">dockNestingEnabled</a>
property.</td>
</tr>
<tr>
<td class="topAlign"><tt>QMainWindow.AllowTabbedDocks</tt></td>
<td class="topAlign"><tt>0x04</tt></td>
<td class="topAlign">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>
<tr>
<td class="topAlign"><tt>QMainWindow.ForceTabbedDocks</tt></td>
<td class="topAlign"><tt>0x08</tt></td>
<td class="topAlign">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>
<tr>
<td class="topAlign"><tt>QMainWindow.VerticalTabs</tt></td>
<td class="topAlign"><tt>0x10</tt></td>
<td class="topAlign">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>
</table>
<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>
<p>This enum was introduced or modified in Qt 4.3.</p>
<p>The DockOptions type is a typedef for <a href="qflags.html">QFlags</a><DockOption>. It stores an OR
combination of DockOption values.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QMainWindow" />QMainWindow.__init__ (<i>self</i>, <a href="qwidget.html">QWidget</a> <i>parent</i> = None, <a href="qt-windowflags.html">Qt.WindowFlags</a> <i>flags</i> = 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>
<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>
<h3 class="fn"><a name="addDockWidget" />QMainWindow.addDockWidget (<i>self</i>, <a href="qt.html#DockWidgetArea-enum">Qt.DockWidgetArea</a> <i>area</i>, <a href="qdockwidget.html">QDockWidget</a> <i>dockwidget</i>)</h3><p>The <i>dockwidget</i> argument has it's ownership transferred to Qt.</p><p>Adds the given <i>dockwidget</i> to the specified
<i>area</i>.</p>
<h3 class="fn"><a name="addDockWidget-2" />QMainWindow.addDockWidget (<i>self</i>, <a href="qt.html#DockWidgetArea-enum">Qt.DockWidgetArea</a> <i>area</i>, <a href="qdockwidget.html">QDockWidget</a> <i>dockwidget</i>, <a href="qt.html#Orientation-enum">Qt.Orientation</a> <i>orientation</i>)</h3><p>The <i>dockwidget</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>
<h3 class="fn"><a name="addToolBar" />QMainWindow.addToolBar (<i>self</i>, <a href="qt.html#ToolBarArea-enum">Qt.ToolBarArea</a> <i>area</i>, <a href="qtoolbar.html">QToolBar</a> <i>toolbar</i>)</h3><p>The <i>toolbar</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>
<p><b>See also</b> <a href="qmainwindow.html#insertToolBar">insertToolBar</a>(), <a href="qmainwindow.html#addToolBarBreak">addToolBarBreak</a>(), and
<a href="qmainwindow.html#insertToolBarBreak">insertToolBarBreak</a>().</p>
<h3 class="fn"><a name="addToolBar-2" />QMainWindow.addToolBar (<i>self</i>, <a href="qtoolbar.html">QToolBar</a> <i>toolbar</i>)</h3><p>The <i>toolbar</i> argument has it's ownership transferred to Qt.</p><p>This is an overloaded function.</p>
<p>Equivalent of calling addToolBar(<a href="qt.html#ToolBarArea-enum">Qt.TopToolBarArea</a>,
<i>toolbar</i>)</p>
<h3 class="fn"><a name="addToolBar-3" /><a href="qtoolbar.html">QToolBar</a> QMainWindow.addToolBar (<i>self</i>, QString <i>title</i>)</h3><p>This is an overloaded function.</p>
<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>
<p><b>See also</b> <a href="qwidget.html#windowTitle-prop">setWindowTitle</a>().</p>
<h3 class="fn"><a name="addToolBarBreak" />QMainWindow.addToolBarBreak (<i>self</i>, <a href="qt.html#ToolBarArea-enum">Qt.ToolBarArea</a> <i>area</i> = Qt.TopToolBarArea)</h3><p>Adds a toolbar break to the given <i>area</i> after all the
other objects that are present.</p>
<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>
<p><b>See also</b> <a href="qmainwindow.html#setCentralWidget">setCentralWidget</a>().</p>
<h3 class="fn"><a name="contextMenuEvent" />QMainWindow.contextMenuEvent (<i>self</i>, <a href="qcontextmenuevent.html">QContextMenuEvent</a> <i>event</i>)</h3><p>Reimplemented from <a href="qwidget.html#contextMenuEvent">QWidget.contextMenuEvent</a>().</p>
<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> <i>corner</i>)</h3><p>Returns the dock widget area that occupies the specified
<i>corner</i>.</p>
<p><b>See also</b> <a href="qmainwindow.html#setCorner">setCorner</a>().</p>
<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>
<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>
<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>
<p><b>See also</b> <a href="qmainwindow.html#addDockWidget">addDockWidget</a>(), <a href="qmainwindow.html#addToolBar">addToolBar</a>(), and <a href="qmainwindow.html#menuBar">menuBar</a>().</p>
<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> <i>dockwidget</i>)</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>
<p><b>See also</b> <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>
<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> <i>event</i>)</h3><p>Reimplemented from <a href="qobject.html#event">QObject.event</a>().</p>
<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> <i>before</i>, <a href="qtoolbar.html">QToolBar</a> <i>toolbar</i>)</h3><p>The <i>toolbar</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>
<p><b>See also</b> <a href="qmainwindow.html#insertToolBarBreak">insertToolBarBreak</a>(),
<a href="qmainwindow.html#addToolBar">addToolBar</a>(), and
<a href="qmainwindow.html#addToolBarBreak">addToolBarBreak</a>().</p>
<h3 class="fn"><a name="insertToolBarBreak" />QMainWindow.insertToolBarBreak (<i>self</i>, <a href="qtoolbar.html">QToolBar</a> <i>before</i>)</h3><p>Inserts a toolbar break before the toolbar specified by
<i>before</i>.</p>
<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> <i>pos</i>)</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>
<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>
<pre class="cpp">
<span class="type"><a href="qmenubar.html">QMenuBar</a></span> <span class="operator">*</span>menuBar <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qmenubar.html">QMenuBar</a></span>(<span class="number">0</span>);
</pre>
<p><b>See also</b> <a href="qmainwindow.html#setMenuBar">setMenuBar</a>().</p>
<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>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qmainwindow.html#setMenuWidget">setMenuWidget</a>().</p>
<h3 class="fn"><a name="removeDockWidget" />QMainWindow.removeDockWidget (<i>self</i>, <a href="qdockwidget.html">QDockWidget</a> <i>dockwidget</i>)</h3><p>The <i>dockwidget</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>
<h3 class="fn"><a name="removeToolBar" />QMainWindow.removeToolBar (<i>self</i>, <a href="qtoolbar.html">QToolBar</a> <i>toolbar</i>)</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>
<h3 class="fn"><a name="removeToolBarBreak" />QMainWindow.removeToolBarBreak (<i>self</i>, <a href="qtoolbar.html">QToolBar</a> <i>before</i>)</h3><p>Removes a toolbar break previously inserted before the toolbar
specified by <i>before</i>.</p>
<h3 class="fn"><a name="restoreDockWidget" />bool QMainWindow.restoreDockWidget (<i>self</i>, <a href="qdockwidget.html">QDockWidget</a> <i>dockwidget</i>)</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>
<p><b>See also</b> <a href="qmainwindow.html#restoreState">restoreState</a>() and <a href="qmainwindow.html#saveState">saveState</a>().</p>
<h3 class="fn"><a name="restoreState" />bool QMainWindow.restoreState (<i>self</i>, <a href="qbytearray.html">QByteArray</a> <i>state</i>, int <i>version</i> = 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>
<p>To restore geometry saved using <a href="qsettings.html">QSettings</a>, you can use code like this:</p>
<pre class="cpp">
<span class="type">void</span> MainWindow<span class="operator">.</span>readSettings()
{
<span class="type"><a href="qsettings.html">QSettings</a></span> settings(<span class="string">"MyCompany"</span><span class="operator">,</span> <span class="string">"MyApp"</span>);
restoreGeometry(settings<span class="operator">.</span>value(<span class="string">"myWidget/geometry"</span>)<span class="operator">.</span>toByteArray());
restoreState(settings<span class="operator">.</span>value(<span class="string">"myWidget/windowState"</span>)<span class="operator">.</span>toByteArray());
}
</pre>
<p><b>See also</b> <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>
<h3 class="fn"><a name="saveState" /><a href="qbytearray.html">QByteArray</a> QMainWindow.saveState (<i>self</i>, int <i>version</i> = 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>
<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>
<p>To restore the saved state, pass the return value and
<i>version</i> number to <a href="qmainwindow.html#restoreState">restoreState</a>().</p>
<p>To save the geometry when the window closes, you can implement a
close event like this:</p>
<pre class="cpp">
<span class="type">void</span> MyMainWindow<span class="operator">.</span><a href="qwidget.html#closeEvent">closeEvent</a>(<span class="type"><a href="qcloseevent.html">QCloseEvent</a></span> <span class="operator">*</span>event)
{
<span class="type"><a href="qsettings.html">QSettings</a></span> settings(<span class="string">"MyCompany"</span><span class="operator">,</span> <span class="string">"MyApp"</span>);
settings<span class="operator">.</span>setValue(<span class="string">"geometry"</span><span class="operator">,</span> saveGeometry());
settings<span class="operator">.</span>setValue(<span class="string">"windowState"</span><span class="operator">,</span> saveState());
<span class="type"><a href="qmainwindow.html">QMainWindow</a></span><span class="operator">.</span>closeEvent(event);
}
</pre>
<p><b>See also</b> <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>
<h3 class="fn"><a name="setAnimated" />QMainWindow.setAnimated (<i>self</i>, bool <i>enabled</i>)</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> <i>widget</i>)</h3><p>The <i>widget</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>
<p>Note: <a href="qmainwindow.html">QMainWindow</a> takes ownership
of the <i>widget</i> pointer and deletes it at the appropriate
time.</p>
<p><b>See also</b> <a href="qmainwindow.html#centralWidget">centralWidget</a>().</p>
<h3 class="fn"><a name="setCorner" />QMainWindow.setCorner (<i>self</i>, <a href="qt.html#Corner-enum">Qt.Corner</a> <i>corner</i>, <a href="qt.html#DockWidgetArea-enum">Qt.DockWidgetArea</a> <i>area</i>)</h3><p>Sets the given dock widget <i>area</i> to occupy the specified
<i>corner</i>.</p>
<p><b>See also</b> <a href="qmainwindow.html#corner">corner</a>().</p>
<h3 class="fn"><a name="setDockNestingEnabled" />QMainWindow.setDockNestingEnabled (<i>self</i>, bool <i>enabled</i>)</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> <i>options</i>)</h3><h3 class="fn"><a name="setDocumentMode" />QMainWindow.setDocumentMode (<i>self</i>, bool <i>enabled</i>)</h3><h3 class="fn"><a name="setIconSize" />QMainWindow.setIconSize (<i>self</i>, <a href="qsize.html">QSize</a> <i>iconSize</i>)</h3><h3 class="fn"><a name="setMenuBar" />QMainWindow.setMenuBar (<i>self</i>, <a href="qmenubar.html">QMenuBar</a> <i>menubar</i>)</h3><p>The <i>menubar</i> argument has it's ownership transferred to Qt.</p><p>Sets the menu bar for the main window to <i>menuBar</i>.</p>
<p>Note: <a href="qmainwindow.html">QMainWindow</a> takes ownership
of the <i>menuBar</i> pointer and deletes it at the appropriate
time.</p>
<p><b>See also</b> <a href="qmainwindow.html#menuBar">menuBar</a>().</p>
<h3 class="fn"><a name="setMenuWidget" />QMainWindow.setMenuWidget (<i>self</i>, <a href="qwidget.html">QWidget</a> <i>menubar</i>)</h3><p>The <i>menubar</i> argument has it's ownership transferred to Qt.</p><p>Sets the menu bar for the main window to <i>menuBar</i>.</p>
<p><a href="qmainwindow.html">QMainWindow</a> takes ownership of
the <i>menuBar</i> pointer and deletes it at the appropriate
time.</p>
<p>This function was introduced in Qt 4.2.</p>
<p><b>See also</b> <a href="qmainwindow.html#menuWidget">menuWidget</a>().</p>
<h3 class="fn"><a name="setStatusBar" />QMainWindow.setStatusBar (<i>self</i>, <a href="qstatusbar.html">QStatusBar</a> <i>statusbar</i>)</h3><p>The <i>statusbar</i> argument has it's ownership transferred to Qt.</p><p>Sets the status bar for the main window to <i>statusbar</i>.</p>
<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>
<p><b>See also</b> <a href="qmainwindow.html#statusBar">statusBar</a>().</p>
<h3 class="fn"><a name="setTabPosition" />QMainWindow.setTabPosition (<i>self</i>, <a href="qt-dockwidgetareas.html">Qt.DockWidgetAreas</a> <i>areas</i>, <a href="qtabwidget.html#TabPosition-enum">QTabWidget.TabPosition</a> <i>tabPosition</i>)</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>
<p><b>Note:</b> The <a href="qmainwindow.html#DockOption-enum">VerticalTabs</a> dock option
overrides the tab positions set by this method.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also</b> <a href="qmainwindow.html#tabPosition">tabPosition</a>() and <a href="qmainwindow.html#tabShape-prop">setTabShape</a>().</p>
<h3 class="fn"><a name="setTabShape" />QMainWindow.setTabShape (<i>self</i>, <a href="qtabwidget.html#TabShape-enum">QTabWidget.TabShape</a> <i>tabShape</i>)</h3><h3 class="fn"><a name="setToolButtonStyle" />QMainWindow.setToolButtonStyle (<i>self</i>, <a href="qt.html#ToolButtonStyle-enum">Qt.ToolButtonStyle</a> <i>toolButtonStyle</i>)</h3><h3 class="fn"><a name="setUnifiedTitleAndToolBarOnMac" />QMainWindow.setUnifiedTitleAndToolBarOnMac (<i>self</i>, bool <i>set</i>)</h3><h3 class="fn"><a name="splitDockWidget" />QMainWindow.splitDockWidget (<i>self</i>, <a href="qdockwidget.html">QDockWidget</a> <i>after</i>, <a href="qdockwidget.html">QDockWidget</a> <i>dockwidget</i>, <a href="qt.html#Orientation-enum">Qt.Orientation</a> <i>orientation</i>)</h3><p>The <i>dockwidget</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>
<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>
<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>
<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>
<p><b>See also</b> <a href="qmainwindow.html#tabifyDockWidget">tabifyDockWidget</a>(),
<a href="qmainwindow.html#addDockWidget">addDockWidget</a>(), and
<a href="qmainwindow.html#removeDockWidget">removeDockWidget</a>().</p>
<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>
<p><b>See also</b> <a href="qmainwindow.html#setStatusBar">setStatusBar</a>().</p>
<h3 class="fn"><a name="tabifiedDockWidgets" />unknown-type QMainWindow.tabifiedDockWidgets (<i>self</i>, <a href="qdockwidget.html">QDockWidget</a> <i>dockwidget</i>)</h3><p>Returns the dock widgets that are tabified together with
<i>dockwidget</i>.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also</b> <a href="qmainwindow.html#tabifyDockWidget">tabifyDockWidget</a>().</p>
<h3 class="fn"><a name="tabifyDockWidget" />QMainWindow.tabifyDockWidget (<i>self</i>, <a href="qdockwidget.html">QDockWidget</a> <i>first</i>, <a href="qdockwidget.html">QDockWidget</a> <i>second</i>)</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>
<p><b>See also</b> <a href="qmainwindow.html#tabifiedDockWidgets">tabifiedDockWidgets</a>().</p>
<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> <i>area</i>)</h3><p>Returns the tab position for <i>area</i>.</p>
<p><b>Note:</b> The <a href="qmainwindow.html#DockOption-enum">VerticalTabs</a> dock option
overrides the tab positions returned by this function.</p>
<p>This function was introduced in Qt 4.5.</p>
<p><b>See also</b> <a href="qmainwindow.html#setTabPosition">setTabPosition</a>() and <a href="qmainwindow.html#tabShape-prop">tabShape</a>().</p>
<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> <i>toolbar</i>)</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>
<p><b>See also</b> <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>
<h3 class="fn"><a name="toolBarBreak" />bool QMainWindow.toolBarBreak (<i>self</i>, <a href="qtoolbar.html">QToolBar</a> <i>toolbar</i>)</h3><p>Returns whether there is a toolbar break before the
<i>toolbar</i>.</p>
<p><b>See also</b> <a href="qmainwindow.html#addToolBarBreak">addToolBarBreak</a>() and
<a href="qmainwindow.html#insertToolBarBreak">insertToolBarBreak</a>().</p>
<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&)</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>
<p>You can connect this signal to other components to help maintain
a consistent appearance for your application.</p>
<p><b>See also</b> <a href="qmainwindow.html#iconSize-prop">setIconSize</a>().</p>
<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>
<p>You can connect this signal to other components to help maintain
a consistent appearance for your application.</p>
<p><b>See also</b> <a href="qmainwindow.html#toolButtonStyle-prop">setToolButtonStyle</a>().</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.12.1 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qt.io">The Qt Company</a> 2015</td><td align="right" width="25%">Qt 4.8.7</td></tr></table></div></address></body></html>
|