Why does Qt.quit() not close the application?



  • Why does the application doesn't close when I click in it?

    @import QtQuick 2.3
    import QtQuick.Window 2.2

    Rectangle {
    visible: true
    width: 360
    height: 360

    ListView {
       anchors.fill: parent
       id: mainList
       model: 10
       delegate:
           Rectangle {
           width: mainList.width
           height: 30
           color: (index %2 == 0) ? "white" : "lightblue"
       }
    }
    
    MouseArea {
        anchors.fill: parent
        onClicked: {
            Qt.quit();
        }
    }
    
    Text {
        text: qsTr("Hello World")
        anchors.centerIn: parent
    }
    

    }
    @

    When I click, it dispalys the message in the output

    bq. Signal QQmlEngine::quit() emitted, but no receivers connected to handle it.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.