Take the code from the calculator example in the documentation and modify it to use QMainWindow in place of QDialog. Then follow the excellent menus example to create menus.
Take the code from the calculator example in the documentation and modify it to use QMainWindow in place of QDialog. Then follow the excellent menus example to create menus.
i did that calculator,how to add Menubar with file ,view, help ??
read the documentation of QMainWindow, find a method that has something to do with QMenuBar and try to do something with that method
menuBar() function returns menubar in that add menus u need
QMenu filemenu;
filemenu=menuBar().addMenu(tr("file"));
filemenu.addAction(newAct); newAct ic object of QAction
Bookmarks