The QMenuBar class provides a menu widget for use in menu bars, context menus, and other popup menus.
This class is a JS wrapper around Qt's QMenuBar class
QMenuBar inherits from NodeWidget
Example
const { QMenuBar, QMainWindow } = require("@nodegui/nodegui");const win = new QMainWindow();const menu = new QMenuBar();const menuBar = new QMenuBar();win.setMenuBar(menuBar);win.show();global.win = win;
new QMenuBar(parent?)
parentNodeWidget (optional). Any widget inheriting from NodeWidget can be passed as a parent. This will make this widget, the child of the parent widget.
Static Methods
QMenuBar can access all the static methods defined in NodeWidget
Instance Properties
QMenuBar can access all the instance properties defined in NodeWidget
Instance Methods
QMenuBar can access all the instance methods defined in NodeWidget. Additionally it also has the following instance methods:
menu.addMenu(menu)
Appends menu to the menu bar. It calls the native method QMenuBar: addMenu.
menuQMenu.
menu.setNativeMenuBar(nativeMenuBar)
This property holds whether or not a menubar will be used as a native menubar on platforms that support it. It calls the native method QMenuBar: setNativeMenuBar.
nativeMenuBarBoolean.