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

- Class List
- Class Hierarchy
- Class Members

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

# QMenuBar Class Reference

Search for all occurrences

## Detailed Description

Definition at line 62 of file qmenubar.h.

`#include <qmenubar.h>`

Inheritance diagram for QMenuBar:
[legend]

List of all members.

## Public Slots
virtual void | setVisible (bool visible)
## Signals
void | triggered (QAction *action)
void | hovered (QAction *action)
## Public Member Functions
| QMenuBar (QWidget *parent=0)
| ~QMenuBar ()
QAction * | addAction (const QString &text)
QAction * | addAction (const QString &text, const QObject *receiver, const char *member)
QAction * | addMenu (QMenu *menu)
QMenu * | addMenu (const QString &title)
QMenu * | addMenu (const QIcon &icon, const QString &title)
QAction * | addSeparator ()
QAction * | insertSeparator (QAction *before)
QAction * | insertMenu (QAction *before, QMenu *menu)
void | clear ()
QAction * | activeAction () const
void | setActiveAction (QAction *action)
void | setDefaultUp (bool)
bool | isDefaultUp () const
QSize | sizeHint () const
QSize | minimumSizeHint () const
int | heightForWidth (int) const
QRect | actionGeometry (QAction *) const
QAction * | actionAt (const QPoint &) const
void | setCornerWidget (QWidget *w, Qt::Corner corner=Qt::TopRightCorner)
QWidget * | cornerWidget (Qt::Corner corner=Qt::TopRightCorner) const
bool | isNativeMenuBar () const
void | setNativeMenuBar (bool nativeMenuBar)
## Protected Member Functions
void | changeEvent (QEvent *)
void | keyPressEvent (QKeyEvent *)
void | mouseReleaseEvent (QMouseEvent *)
void | mousePressEvent (QMouseEvent *)
void | mouseMoveEvent (QMouseEvent *)
void | leaveEvent (QEvent *)
void | paintEvent (QPaintEvent *)
void | resizeEvent (QResizeEvent *)
void | actionEvent (QActionEvent *)
void | focusOutEvent (QFocusEvent *)
void | focusInEvent (QFocusEvent *)
void | timerEvent (QTimerEvent *)
bool | eventFilter (QObject *, QEvent *)
bool | event (QEvent *)
void | initStyleOption (QStyleOptionMenuItem *option, const QAction *action) const
## Properties
bool | defaultUp
bool | nativeMenuBar
## Friends
class | QMenuPrivate
class | QWindowsStyle

## Constructor & Destructor Documentation

QMenuBar | ( | QWidget * | parent = `0` | ) | `[explicit]`

~QMenuBar | ( |  | ) |

## Member Function Documentation

QAction* addAction | ( | const QString & | text | ) |

Search for all occurrences

QAction* addAction | ( | const QString & | text,
|  | const QObject * | receiver,
|  | const char * | member
| ) |  |

Search for all occurrences

QAction* addMenu | ( | QMenu * | menu | ) |

Search for all occurrences

QMenu* addMenu | ( | const QString & | title | ) |

Search for all occurrences

QMenu* addMenu | ( | const QIcon & | icon,
|  | const QString & | title
| ) |  |

Search for all occurrences

QAction* addSeparator | ( |  | ) |

Search for all occurrences

QAction* insertSeparator | ( | QAction * | before | ) |

Search for all occurrences

QAction* insertMenu | ( | QAction * | before,
|  | QMenu * | menu
| ) |  |

Search for all occurrences

void clear | ( |  | ) |

Search for all occurrences

QAction* activeAction | ( |  | ) | const

Search for all occurrences

void setActiveAction | ( | QAction * | action | ) |

Search for all occurrences

void setDefaultUp | ( | bool |  | ) |

Search for all occurrences

bool isDefaultUp | ( |  | ) | const

Search for all occurrences

QSize sizeHint | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QWidget.

QSize minimumSizeHint | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QWidget.

int heightForWidth | ( | int |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QWidget.

QRect actionGeometry | ( | QAction * |  | ) | const

Search for all occurrences

QAction* actionAt | ( | const QPoint & |  | ) | const

Search for all occurrences

void setCornerWidget | ( | QWidget * | w,
|  | Qt::Corner | corner = `Qt::TopRightCorner`
| ) |  |

Search for all occurrences

QWidget* cornerWidget | ( | Qt::Corner | corner = `Qt::TopRightCorner` | ) | const

Search for all occurrences

bool isNativeMenuBar | ( |  | ) | const

Search for all occurrences

void setNativeMenuBar | ( | bool | nativeMenuBar | ) |

Search for all occurrences

virtual void setVisible | ( | bool | visible | ) | `[virtual, slot]`

Search for all occurrences

Reimplemented from QWidget.

void triggered | ( | QAction * | action | ) | `[signal]`

Search for all occurrences

void hovered | ( | QAction * | action | ) | `[signal]`

Search for all occurrences

void changeEvent | ( | QEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void keyPressEvent | ( | QKeyEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void mouseReleaseEvent | ( | QMouseEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void mousePressEvent | ( | QMouseEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void mouseMoveEvent | ( | QMouseEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void leaveEvent | ( | QEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void paintEvent | ( | QPaintEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void resizeEvent | ( | QResizeEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void actionEvent | ( | QActionEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void focusOutEvent | ( | QFocusEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void focusInEvent | ( | QFocusEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

void timerEvent | ( | QTimerEvent * |  | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QObject.

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

Search for all occurrences

Reimplemented from QObject.

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

Search for all occurrences

Reimplemented from QWidget.

void initStyleOption | ( | QStyleOptionMenuItem * | option,
|  | const QAction * | action
| ) |  | const `[protected]`

Search for all occurrences

## Friends And Related Function Documentation

friend class QMenuPrivate `[friend]`

Search for all occurrences

Definition at line 351 of file qmenubar.h.

friend class QWindowsStyle `[friend]`

Search for all occurrences

Definition at line 352 of file qmenubar.h.

## Property Documentation

bool defaultUp `[read, write]`

Search for all occurrences

Definition at line 66 of file qmenubar.h.

bool nativeMenuBar `[read, write]`

Search for all occurrences

Definition at line 67 of file qmenubar.h.

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

- QtGui/qmenubar.h

QMenuBar QMenuBar QMenuBar QMenuBar QMenuBar QMenuBar QMenuBar QMenuBar QMenuBar QMenuBar
QMenuBar QMenuBar QMenuBar QMenuBar QMenuBar QMenuBar QMenuBar QMenuBar QMenuBar QMenuBar