# QMainWindow Class Reference

### [com.trolltech.qt.gui package]

Inherits QWidget.

### Constructor

- void QMainWindow(QWidget parent, WindowFlags flags)

### Constructor Properties

- prototype: The QMainWindow prototype object
- AnimatedDocks = 0x01
- AllowNestedDocks = 0x02
- AllowTabbedDocks = 0x04
- ForceTabbedDocks = 0x08
- VerticalTabs = 0x10
- DockOption( value )
- DockOptions( value1, value2, ... )

### Prototype Object Properties

The QMainWindow prototype object inherits properties from the QWidget prototype object and also has the following properties.

- void addDockWidget(DockWidgetArea area, QDockWidget dockwidget)
- void addToolBar(QToolBar toolbar)
- void addToolBarBreak(ToolBarArea area)
- QWidget centralWidget()
- DockWidgetArea corner(Corner corner)
- QMenu createPopupMenu()
- DockWidgetArea dockWidgetArea(QDockWidget dockwidget)
- void insertToolBar(QToolBar before, QToolBar toolbar)
- void insertToolBarBreak(QToolBar before)
- bool isSeparator(QPoint pos)
- QMenuBar menuBar()
- QWidget menuWidget()
- void removeDockWidget(QDockWidget dockwidget)
- void removeToolBar(QToolBar toolbar)
- void removeToolBarBreak(QToolBar before)
- bool restoreDockWidget(QDockWidget dockwidget)
- bool restoreState(QByteArray state, int version)
- QByteArray saveState(int version)
- void setCentralWidget(QWidget widget)
- void setCorner(Corner corner, DockWidgetArea area)
- void setMenuBar(QMenuBar menubar)
- void setMenuWidget(QWidget menubar)
- void setStatusBar(QStatusBar statusbar)
- void setTabPosition(DockWidgetAreas areas, TabPosition tabPosition)
- void splitDockWidget(QDockWidget after, QDockWidget dockwidget, Orientation orientation)
- QStatusBar statusBar()
- TabPosition tabPosition(DockWidgetArea area)
- List tabifiedDockWidgets(QDockWidget dockwidget)
- void tabifyDockWidget(QDockWidget first, QDockWidget second)
- ToolBarArea toolBarArea(QToolBar toolbar)
- bool toolBarBreak(QToolBar toolbar)

### Instance Properties

QMainWindow objects inherit properties from the QMainWindow prototype object and also have the following properties.

- iconSize
- toolButtonStyle
- animated
- documentMode
- tabShape
- dockNestingEnabled
- dockOptions
- unifiedTitleAndToolBarOnMac