Menu not showing up in menuBar

I created the default app from the Creator template Qt Widget Project/Qt Gui Application, and then tried to add a File menu to the menuBar. The File menu did not show up. What's wrong, it seems so simple?

As you can see from the code, I tried to get the menuBar in two different ways.

I encountered the same problem when I created a new QMainwindow project using the native MenuBar and adding some items to it.
The MenuBar does not appear after running the program, and appears only when double clicking the windoow to make it full screen.
the code line:
@menuBar()->setNativeMenuBar(false);// Trick to see native MenuBar@
You can say it is the trick to see the native MenuBar, but for me it has no sense especially the false thing. The question still remains why it does not appear in-spite automatic generation?

which platform you are trying ? If Ubuntu and Mac, platform do some intelligence. Just try to add few more actions like QAction("David") , QAction("Dheeru") like this. It will start showing up. Since you are default "Quit" and "Quit" is by default available. So it may not be showing up.