Menubars 在QtQuick Controls 1中存在,用来显示主窗口头部的菜单栏,但在Qt5.7的QtQuick.Controls 2.0 消失了,据说Qt5.8中会重新加入
The ApplicationWindow of Qt Quick Controls 2 doesn't have a menuBar property, it has been replaced by a more customizable header property that accepts Item (but it doesn't accept MenuBar anymore).
Qt Quick Controls 2 are not meant to offer a native desktop application, but are meant to offer simple, efficient and customizable components. For example in QQC2 you would use a ToolBaror a TabBar as the header of an ApplicationWindow.
Although it's not documented, it seems that just having a MenuBar as a child of an ApplicationWindow (in both QQC1 and QQC2) sets the native menu bar on OS X (not on Android though, and I haven't tested it on other platforms).
I asked the same question on Qt blog announcing release of Qt 5.7 and this is their answer:
http://blog.qt.io/blog/2016/06/16/qt-