KDE 4.9 PyKDE API Reference

- KDE's Python API

# KMenuBar Class Reference

`from PyKDE4.kdeui import *`

Inherits: QMenuBar → QWidget → QObject

## Detailed Description

KDE Style-able menubar.

This is required since QMenuBar is currently not handled by QStyle.

Author:
  Daniel "Mosfet" Duley.

## Methods
| __init__ (self, QWidget parent=0)
| closeEvent (self, QCloseEvent a0)
bool | eventFilter (self, QObject a0, QEvent a1)
bool | isTopLevelMenu (self)
| paintEvent (self, QPaintEvent a0)
| resize (self, int w, int h)
| resize (self, QSize s)
| resizeEvent (self, QResizeEvent a0)
| setFrameStyle (self, int a0)
| setGeometry (self, QRect r)
| setGeometry (self, int x, int y, int w, int h)
| setLineWidth (self, int a0)
| setMargin (self, int a0)
| setTopLevelMenu (self, bool top_level=1)
QSize | sizeHint (self)
| slotReadConfig (self)

## Method Documentation

__init__ | ( | self, |
|  | QWidget | parent=0
| ) |  |  |

closeEvent | ( | self, |
|  | QCloseEvent | a0
| ) |  |  |

bool eventFilter | ( | self, |
|  | QObject | a0,
|  | QEvent | a1
| ) |  |  |

bool isTopLevelMenu | ( |  | self ) |

Is our menubar a top-level (Macintosh style) menubar?

Returns:
  True if it is top-level.

paintEvent | ( | self, |
|  | QPaintEvent | a0
| ) |  |  |

resize | ( | self, |
|  | int | w,
|  | int | h
| ) |  |  |

resize | ( | self, |
|  | QSize | s
| ) |  |  |

resizeEvent | ( | self, |
|  | QResizeEvent | a0
| ) |  |  |

setFrameStyle | ( | self, |
|  | int | a0
| ) |  |  |

setGeometry | ( | self, |
|  | QRect | r
| ) |  |  |

setGeometry | ( | self, |
|  | int | x,
|  | int | y,
|  | int | w,
|  | int | h
| ) |  |  |

setLineWidth | ( | self, |
|  | int | a0
| ) |  |  |

setMargin | ( | self, |
|  | int | a0
| ) |  |  |

setTopLevelMenu | ( | self, |
|  | bool | top_level=1
| ) |  |  |

This controls whether or not this menubar will be a top-level bar similar to the way Macintosh handles menubars. This overrides any global config settings.

Keep in mind that it is probably a really bad idea to use this unless you really know what you're doing. A feature like a top-level menubar is one that should really be shared by all applications. If your app is the only one with a top-level bar, then things might look very... odd.

This is included only for those people that do know that they need to use it.

Parameters:

  | top_level | If set to true, then this menubar will be a top-level menu

QSize sizeHint | ( |  | self ) |

slotReadConfig | ( |  | self ) |