【发布时间】:2016-11-01 12:41:34
【问题描述】:
我想通过按外部来关闭菜单。它在桌面上运行良好。但是不能在安卓上运行。只有按返回键才能关闭菜单。
import QtQuick 2.7
import QtQuick.Window 2.2
import QtQuick.Controls 2.0
Window {
visible: true
width: 640
height: 480
title: qsTr("Hello Qt Quick")
Component.onCompleted: menu.open()
Menu {
id: menu
closePolicy: Popup.CloseOnPressOutside | Popup.CloseOnEscape
MenuItem {
text: "Test"
}
}
}
Popup.CloseOnPressOutside 好像没用。
我使用安卓 4.4.2。我该怎么办?
【问题讨论】:
标签: android qt menu qml qtquick2