Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.8.0
-
None
-
e6eaf29c69f0f352fc8279b9f508ae468d18cafd
Description
Qt 5.8.0 introduce new Qt.labs.platform module with Platform Menu implementation.
I've try create context menu with sub menu like:
import QtQuick 2.6 import QtQuick.Window 2.2 import Qt.labs.platform 1.0 Window { width: 300 height: 300 visible: true MouseArea { anchors.fill: parent acceptedButtons: Qt.RightButton onClicked: menu.open() } Menu { id: menu Menu { title: qsTr ("Sub Menu 1") MenuItem { text: "Sub Menu 1 Item" } } Menu { title: qsTr ("Sub Menu 2") MenuItem { text: "Sub Menu 2 Item" } } } }
On Linux (Debian) all work fine, but there are no sub menus on Windows.
Looking to the code I've found QWidget backend is used on Windows. But QWidget backend don't implement sub menus.
I use QtQuick 2 only and has no lot of expierence in QtWidgets, but seems it should work (see Qt Widgets Menu Example)