- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Slots | Signals | Public Member Functions | Protected Member Functions | Properties

# QMainWindow Class Reference

Search for all occurrences

## Detailed Description

Definition at line 63 of file qmainwindow.h.

`#include <qmainwindow.h>`

Inheritance diagram for QMainWindow:
[legend]

List of all members.

## Public Types
enum | DockOption { AnimatedDocks = 0x01, AllowNestedDocks = 0x02, AllowTabbedDocks = 0x04, ForceTabbedDocks = 0x08, VerticalTabs = 0x10 }
## Public Slots
void | setAnimated (bool enabled)
void | setDockNestingEnabled (bool enabled)
## Signals
void | iconSizeChanged (const QSize &iconSize)
void | toolButtonStyleChanged (Qt::ToolButtonStyle toolButtonStyle)
## Public Member Functions
| QMainWindow (QWidget *parent=0, Qt::WindowFlags flags=0)
| ~QMainWindow ()
QSize | iconSize () const
void | setIconSize (const QSize &iconSize)
Qt::ToolButtonStyle | toolButtonStyle () const
void | setToolButtonStyle (Qt::ToolButtonStyle toolButtonStyle)
bool | isAnimated () const
bool | isDockNestingEnabled () const
bool | documentMode () const
void | setDocumentMode (bool enabled)
QTabWidget::TabShape | tabShape () const
void | setTabShape (QTabWidget::TabShape tabShape)
QTabWidget::TabPosition | tabPosition (Qt::DockWidgetArea area) const
void | setTabPosition (Qt::DockWidgetAreas areas, QTabWidget::TabPosition tabPosition)
void | setDockOptions (DockOptions options)
DockOptions | dockOptions () const
bool | isSeparator (const QPoint &pos) const
QMenuBar * | menuBar () const
void | setMenuBar (QMenuBar *menubar)
QWidget * | menuWidget () const
void | setMenuWidget (QWidget *menubar)
QStatusBar * | statusBar () const
void | setStatusBar (QStatusBar *statusbar)
QWidget * | centralWidget () const
void | setCentralWidget (QWidget *widget)
void | setCorner (Qt::Corner corner, Qt::DockWidgetArea area)
Qt::DockWidgetArea | corner (Qt::Corner corner) const
void | addToolBarBreak (Qt::ToolBarArea area=Qt::TopToolBarArea)
void | insertToolBarBreak (QToolBar *before)
void | addToolBar (Qt::ToolBarArea area, QToolBar *toolbar)
void | addToolBar (QToolBar *toolbar)
QToolBar * | addToolBar (const QString &title)
void | insertToolBar (QToolBar *before, QToolBar *toolbar)
void | removeToolBar (QToolBar *toolbar)
void | removeToolBarBreak (QToolBar *before)
void | setUnifiedTitleAndToolBarOnMac (bool set)
bool | unifiedTitleAndToolBarOnMac () const
Qt::ToolBarArea | toolBarArea (QToolBar *toolbar) const
bool | toolBarBreak (QToolBar *toolbar) const
void | addDockWidget (Qt::DockWidgetArea area, QDockWidget *dockwidget)
void | addDockWidget (Qt::DockWidgetArea area, QDockWidget *dockwidget, Qt::Orientation orientation)
void | splitDockWidget (QDockWidget *after, QDockWidget *dockwidget, Qt::Orientation orientation)
void | tabifyDockWidget (QDockWidget *first, QDockWidget *second)
QList< QDockWidget * > | tabifiedDockWidgets (QDockWidget *dockwidget) const
void | removeDockWidget (QDockWidget *dockwidget)
bool | restoreDockWidget (QDockWidget *dockwidget)
Qt::DockWidgetArea | dockWidgetArea (QDockWidget *dockwidget) const
QByteArray | saveState (int version=0) const
bool | restoreState (const QByteArray &state, int version=0)
virtual QMenu * | createPopupMenu ()
## Protected Member Functions
void | contextMenuEvent (QContextMenuEvent *event)
bool | event (QEvent *event)
## Properties
QSize | iconSize
Qt::ToolButtonStyle | toolButtonStyle
bool | animated
bool | documentMode
QTabWidget::TabShape | tabShape
bool | dockNestingEnabled
DockOptions | dockOptions
bool | unifiedTitleAndToolBarOnMac

## Member Enumeration Documentation

enum DockOption

Search for all occurrences

Enumerator:

  AnimatedDocks | Search for all occurrences
  AllowNestedDocks | Search for all occurrences
  AllowTabbedDocks | Search for all occurrences
  ForceTabbedDocks | Search for all occurrences
  VerticalTabs | Search for all occurrences

Definition at line 87 of file qmainwindow.h.

                        {
            AnimatedDocks = 0x01,
            AllowNestedDocks = 0x02,
            AllowTabbedDocks = 0x04,
            ForceTabbedDocks = 0x08,  // implies AllowTabbedDocks, !AllowNestedDocks
            VerticalTabs = 0x10       // implies AllowTabbedDocks
        };

## Constructor & Destructor Documentation

QMainWindow | ( | QWidget * | parent = `0`,
|  | Qt::WindowFlags | flags = `0`
| ) |  | `[explicit]`

~QMainWindow | ( |  | ) |

## Member Function Documentation

QSize iconSize | ( |  | ) | const

Search for all occurrences

void setIconSize | ( | const QSize & | iconSize | ) |

Search for all occurrences

Qt::ToolButtonStyle toolButtonStyle | ( |  | ) | const

Search for all occurrences

void setToolButtonStyle | ( | Qt::ToolButtonStyle | toolButtonStyle | ) |

Search for all occurrences

bool isAnimated | ( |  | ) | const

Search for all occurrences

bool isDockNestingEnabled | ( |  | ) | const

Search for all occurrences

bool documentMode | ( |  | ) | const

Search for all occurrences

void setDocumentMode | ( | bool | enabled | ) |

Search for all occurrences

QTabWidget::TabShape tabShape | ( |  | ) | const

Search for all occurrences

void setTabShape | ( | QTabWidget::TabShape | tabShape | ) |

Search for all occurrences

QTabWidget::TabPosition tabPosition | ( | Qt::DockWidgetArea | area | ) | const

Search for all occurrences

void setTabPosition | ( | Qt::DockWidgetAreas | areas,
|  | QTabWidget::TabPosition | tabPosition
| ) |  |

Search for all occurrences

void setDockOptions | ( | DockOptions | options | ) |

Search for all occurrences

DockOptions dockOptions | ( |  | ) | const

Search for all occurrences

bool isSeparator | ( | const QPoint & | pos | ) | const

Search for all occurrences

QMenuBar* menuBar | ( |  | ) | const

Search for all occurrences

void setMenuBar | ( | QMenuBar * | menubar | ) |

Search for all occurrences

QWidget* menuWidget | ( |  | ) | const

Search for all occurrences

void setMenuWidget | ( | QWidget * | menubar | ) |

Search for all occurrences

QStatusBar* statusBar | ( |  | ) | const

Search for all occurrences

void setStatusBar | ( | QStatusBar * | statusbar | ) |

Search for all occurrences

QWidget* centralWidget | ( |  | ) | const

Search for all occurrences

void setCentralWidget | ( | QWidget * | widget | ) |

Search for all occurrences

void setCorner | ( | Qt::Corner | corner,
|  | Qt::DockWidgetArea | area
| ) |  |

Search for all occurrences

Qt::DockWidgetArea corner | ( | Qt::Corner | corner | ) | const

Search for all occurrences

void addToolBarBreak | ( | Qt::ToolBarArea | area = `Qt::TopToolBarArea` | ) |

Search for all occurrences

void insertToolBarBreak | ( | QToolBar * | before | ) |

Search for all occurrences

void addToolBar | ( | Qt::ToolBarArea | area,
|  | QToolBar * | toolbar
| ) |  |

Search for all occurrences

void addToolBar | ( | QToolBar * | toolbar | ) |

Search for all occurrences

QToolBar* addToolBar | ( | const QString & | title | ) |

Search for all occurrences

void insertToolBar | ( | QToolBar * | before,
|  | QToolBar * | toolbar
| ) |  |

Search for all occurrences

void removeToolBar | ( | QToolBar * | toolbar | ) |

Search for all occurrences

void removeToolBarBreak | ( | QToolBar * | before | ) |

Search for all occurrences

void setUnifiedTitleAndToolBarOnMac | ( | bool | set | ) |

Search for all occurrences

bool unifiedTitleAndToolBarOnMac | ( |  | ) | const

Search for all occurrences

Qt::ToolBarArea toolBarArea | ( | QToolBar * | toolbar | ) | const

Search for all occurrences

bool toolBarBreak | ( | QToolBar * | toolbar | ) | const

Search for all occurrences

void addDockWidget | ( | Qt::DockWidgetArea | area,
|  | QDockWidget * | dockwidget
| ) |  |

Search for all occurrences

void addDockWidget | ( | Qt::DockWidgetArea | area,
|  | QDockWidget * | dockwidget,
|  | Qt::Orientation | orientation
| ) |  |

Search for all occurrences

void splitDockWidget | ( | QDockWidget * | after,
|  | QDockWidget * | dockwidget,
|  | Qt::Orientation | orientation
| ) |  |

Search for all occurrences

void tabifyDockWidget | ( | QDockWidget * | first,
|  | QDockWidget * | second
| ) |  |

Search for all occurrences

QList<QDockWidget*> tabifiedDockWidgets | ( | QDockWidget * | dockwidget | ) | const

Search for all occurrences

void removeDockWidget | ( | QDockWidget * | dockwidget | ) |

Search for all occurrences

bool restoreDockWidget | ( | QDockWidget * | dockwidget | ) |

Search for all occurrences

Qt::DockWidgetArea dockWidgetArea | ( | QDockWidget * | dockwidget | ) | const

Search for all occurrences

QByteArray saveState | ( | int | version = `0` | ) | const

Search for all occurrences

bool restoreState | ( | const QByteArray & | state,
|  | int | version = `0`
| ) |  |

Search for all occurrences

virtual QMenu* createPopupMenu | ( |  | ) | `[virtual]`

Search for all occurrences

void setAnimated | ( | bool | enabled | ) | `[slot]`

Search for all occurrences

void setDockNestingEnabled | ( | bool | enabled | ) | `[slot]`

Search for all occurrences

void iconSizeChanged | ( | const QSize & | iconSize | ) | `[signal]`

Search for all occurrences

void toolButtonStyleChanged | ( | Qt::ToolButtonStyle | toolButtonStyle | ) | `[signal]`

Search for all occurrences

void contextMenuEvent | ( | QContextMenuEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

bool event | ( | QEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

## Property Documentation

QSize iconSize `[read, write]`

Search for all occurrences

Definition at line 69 of file qmainwindow.h.

Qt::ToolButtonStyle toolButtonStyle `[read, write]`

Search for all occurrences

Definition at line 70 of file qmainwindow.h.

bool animated `[read, write]`

Search for all occurrences

Definition at line 72 of file qmainwindow.h.

bool documentMode `[read, write]`

Search for all occurrences

Definition at line 74 of file qmainwindow.h.

QTabWidget::TabShape tabShape `[read, write]`

Search for all occurrences

Definition at line 77 of file qmainwindow.h.

bool dockNestingEnabled `[read, write]`

Search for all occurrences

Definition at line 79 of file qmainwindow.h.

DockOptions dockOptions `[read, write]`

Search for all occurrences

Definition at line 81 of file qmainwindow.h.

bool unifiedTitleAndToolBarOnMac `[read, write]`

Search for all occurrences

Definition at line 83 of file qmainwindow.h.

The documentation for this class was generated from the following file:

- QtGui/qmainwindow.h

QMainWindow QMainWindow QMainWindow QMainWindow QMainWindow QMainWindow QMainWindow QMainWindow QMainWindow QMainWindow
QMainWindow QMainWindow QMainWindow QMainWindow QMainWindow QMainWindow QMainWindow QMainWindow QMainWindow QMainWindow