Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

StackView,MouseArea push a ListView page, No responese after back using system back key.



  • StackView, when using MouseArea to push the page and the page contains ListView, there will be no response after back using the system back button, and it must be tap again. If you use button push, there is no problem.

        //This is no problem
        Button {
            anchors.centerIn: parent
            text: "Button PUSH"
            onClicked: {
                openDetail(0);
            }
        }
    
        //After push, and then use the system return key to return, the MouseArea will not respond
        MouseArea {
            width: parent.width
            height: 100
            focus: true
            Rectangle {
                anchors.fill: parent
                color: "black"
                Text {
                    anchors.fill: parent
                    text: "MouseArea PUSH - problematic"
                    color:"white"
                    horizontalAlignment: Text.AlignHCenter
                    verticalAlignment: Text.AlignVCenter
                }
            }
            onClicked: {
                openDetail(1);
            }
        }
        function openDetail(i) {
            stack.push(com_detail);
        }
    

    Demo:
    https://github.com/senlinmuvs/TestQtAndroid


Log in to reply