I have 2 classes : MainWindow() and Menubar(). MainWindow() is a QMainWindow and Menubar is a QMenuBar. I don't know how I can add the menu bar to the main window.
With the QToolBar, I can make something like this :
self.toolbar = Toolbar()
self.addToolBar(self.toolbar)
But with the QMenubar, there isn't any function like "addMenuBar()".
So I can't figure out with it.
QMainWindow
comes with its defaultQMenuBar
, but you can set a new one withQMainWindow.setMenuBar()
More informations in the Qt Documentation