Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Why does Qt.quit() not close the application?

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

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 722 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    X Offline
    xalam
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved