Unsolved How to cancel the QML menu once it is clicked ?
-
I have tried many QT5.5 QML examples which have menu, they
all have the same problem: can not cancel the menu once
it was clicked, unless you click a menuitem.One of the examples is listed as
http://doc.qt.io/qt-5/qtquickcontrols-texteditor-example.htmlMoreover, once you clicked the menu, and you move the main
application window, the pending menu will stay wherever it
was anchored on the screen(not moved with the main window).I have also tried using MouseArea under menu, but did not
work:Menu {
id: id_FileMenu
title: qsTr("File")
...
MouseArea {
anchors.fill: parent
hoverEnabled: true
onExited: {
console.log("Exited Menu.");
parent.exit();
}
}
}