Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions | ![]() |
The QMainWindow class provides a main application window. More...
#include <QMainWindow>
Inherits QWidget.
The QMainWindow class provides a main application window.
QMainWindow provides a main application window, with a menu bar, tool bars, dock windows and a status bar around a large central widget, such as a text edit, drawing canvas or QWorkspace (for MDI applications).
See also QDockWindow and QToolBar.
This property holds size of toolbar icons in this mainwindow.
The default is Qt::AutomaticIconSize.
Access functions:
This property holds style of toolbar buttons in this mainwindow.
The default is Qt::ToolButtonIconOnly.
Access functions:
Constructs a QMainWindow with the given parent and the specified widget flags.
Destroys the main window.
Adds the toolbar into the specified area in this main window. The toolbar is placed at the end of the current tool bar block (i.e. line).
See also insertToolBar(), addToolBarBlock(), and insertToolBarBlock().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Equivalent of calling addToolBar(Qt::ToolBarAreaTop, toolbar)
Returns the central widget for the main window. This function returns zero if the central widget has not been set.
See also setCentralWidget().
Returns the dock window area that occupies the specified corner.
See also setCorner().
This function is called to create a popup menu when the user right-clicks a toolbar or dock window. If you want to create a custom popup menu, reimplement this function and return the created popup menu. Ownership of the popup menu is transferred to the caller.
Returns the Qt::DockWindowArea for dockwindow.
See also addDockWindow(), extendDockWindowArea(), splitDockWindow(), and Qt::DockWindowArea.
Inserts the toolbar into the specified area in this main window. The toolbar is placed before the toolbar before.
See also insertToolBarBlock(), addToolBar(), and addToolBarBlock().
Returns the menu bar for the main window. This function creates and returns an empty menu bar if the menu bar does not exist.
See also setMenuBar().
Removes the dockwindow from the main window.
Removes the toolbar from the main window.
Restores the state of this mainwindow's toolbars and dockwindows. The version number is compared with that stored in state. If they do not match, the mainwindow's state is left unchanged, and this function returns false; otherwise, the state is restored, and this function returns true.
See also saveState().
Saves the current state of this mainwindow's toolbars and dockwindows. The version number is stored as part of the data.
To restore the saved state, pass the return value and version number to restoreState().
See also restoreState().
Sets the given widget to be the main window's central widget.
Warning: This function should be called at most once for each main window instance
See also centralWidget().
Sets the given dock window area to occupy the specified corner.
See also corner().
Sets the menu bar for the main window to menubar.
See also menuBar().
Sets the status bar for the main window to statusbar.
See also statusBar().
Returns the status bar for the main window. This function creates and returns an empty status bar if the status bar does not exist.
See also setStatusBar().
Returns the tool bar area for toolbar.
See also addToolBar(), addToolBarBlock(), and Qt::ToolBarArea.
Copyright © 2004 Trolltech | Trademarks | Qt 4.0.0-b1 |