I have created a QWidget (i.e something that acts as a window). However I am unable to set a Menu Bar to the QWidget using QMenu (NOT QMenuBar). I am not using Qt Designer. I am making the program in C++ and would like help with how I can get a menu bar to be displayed in the top - left of a window. Here is the code -
#include <QApplication>
#include <QAction>
#include <QMenu>
int main(int argc, char** argv){
QApplication qapp_base = QApplication(argc, argv);
QWidget qwin_main = QWidget();
qwin_main.setFixedSize(1280, 720);
QMenu qmen_main = QMenu(&qwin_main);
qwin_main.show();
qmen_main.show();
return qapp_base.exec();
}