Reputation: 479
I'm new to Qt and Qt/QML and I am trying to setup a menubar but it doesn't show it at all.
I've copied pasted the code and still nothing(from Qt doc).
import QtQuick 2.0
import QtQuick.Controls 1.0
ApplicationWindow {
visible: true;
width: 1000;
height: 700;
title: "App";
MenuBar {
Menu {
title: "File"
MenuItem { text: "Open..." }
MenuItem { text: "Close" }
}
Menu {
title: "Edit"
MenuItem { text: "Cut" }
MenuItem { text: "Copy" }
MenuItem { text: "Paste" }
}
}
}
Upvotes: 1
Views: 3682
Reputation: 479
Solved it by using
menuBar: MenuBar{//Menubar content}
instead of
MenuBar{//Menubar content}
Upvotes: 9