-
Bug
-
Resolution: Done
-
P1: Critical
-
5.8.0
-
None
-
Qt 5.8
QQC2 2.1
-
-
49163ca689562a4a000490fb137e5c9533684471
If no explicit closePolicy is set, hitting the BACK Key on Android quits the APP. There's no way to catch the BACK Key.
Qt 5.7 and QQC2.0 works well - it happens with new default closePolicy in 5.8
Here's to test:
import QtQuick 2.7 import QtQuick.Controls 2.1 import QtQuick.Layouts 1.3 import QtQuick.Controls.Material 2.1 ApplicationWindow { id: window width: 640 height: 480 visible: true Page { id: thePage anchors.fill: parent Label { id: theLabel text: "Close Policy Test" anchors.centerIn: parent } Button { anchors.top: theLabel.bottom text: "Popup BACK KEy Test" onClicked: { thePopup.open() } } Popup { id: thePopup // closePolicy: Popup.CloseOnPressOutside width: 200 height: 200 Label { text: "Press BACK Key" } } Keys.onBackPressed: { event.accepted = true theLabel.text = "BACK KEY consumed" } } // page }