Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions

QMainWindow Class Reference

The QMainWindow class provides a main application window. More...

#include <QMainWindow>

Inherits QWidget.

Writable Properties

Read-Only Properties

Public Functions

Public Slots

Signals

Static Public Members

Protected Functions


Detailed Description

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.


Member Function Documentation

QMainWindow::QMainWindow ( QWidget * parent = 0, Qt::WFlags flags = 0 )

Constructs a QMainWindow with the given parent and the specified widget flags.

QMainWindow::~QMainWindow ()

Destroys the main window.

QWidget * QMainWindow::centralWidget () const

Returns the central widget for the main window. This function returns zero if the central widget has not been set.

See also setCentralWidget().

Qt::DockWindowArea QMainWindow::corner ( Qt::Corner corner ) const

Returns the dock window area that occupies the specified corner.

See also setCorner().

QMenuBar * QMainWindow::menuBar () const

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().

void QMainWindow::setCentralWidget ( QWidget * widget )

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().

void QMainWindow::setCorner ( Qt::Corner corner, Qt::DockWindowArea area )

Sets the given dock window area to occupy the specified corner.

See also corner().

void QMainWindow::setMenuBar ( QMenuBar * menubar )

Sets the menu bar for the main window to menubar.

See also menuBar().

void QMainWindow::setStatusBar ( QStatusBar * statusbar )

Sets the status bar for the main window to statusbar.

See also statusBar().

QStatusBar * QMainWindow::statusBar () const

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().


Copyright © 2004 Trolltech. Trademarks
Qt 4.0.0-tp2