On Aug 9, 2013, at 2:42 AM, Daiwei Li <daiwe...@gmail.com<mailto:daiwe...@gmail.com>> wrote:
Hi all, I would like to be able to include Menus in my ApplcationWindow's MenuBar based on the platform. e.g.: import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Window 2.0 ApplicationWindow { title: qsTr("Hello World") width: 640 height: 480 menuBar: MenuBar { Menu { title: qsTr("File") visible: Qt.platform.os === "win" MenuItem { text: qsTr("Exit") onTriggered: Qt.quit(); } } } } Unfortunately, this example doesn't work (the menu is still there) because Menu.visible is ignored unless Menu is a submenu. Does anyone know how I can conditionally show a menu in the menubar? Thanks, Daiwei I can confirm that this is indeed a bug and we are working on a fix for it. We have created https://bugreports.qt-project.org/browse/QTBUG-32899 to track it. Regards, Jens
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest