Important: Please read the Qt Code of Conduct -

[solved] MouseArea onReleased signal lost after hiding presented view

  • Hi,

    I would like to present list's item details after double clicking on it and present context menu when item is pressed and held. To do so I define MouseArea in ListView delegate. In MouseArea's onPressAndHold I call method to show context menu and in onDoubleClicked I call method which hides list view and presents item details view.
    This works partially. After double click new view is presented but also context menu appears, so after showing new view onReleased signal is lost. Does anyone know what can be wrong ?
    Here is a code:
    ListView {
    id: listsList
    delegate: Rectangle {
    MouseArea {
    anchors.fill: parent
    onPressed: listsList.currentIndex = index
    onDoubleClicked: listsListModel.presentList(listId)


  • I hid other views setting their visible property to false.
    Now I use opacity property and MouseArea onReleased signal is not lost any more :)
    //visible: false

    opacity: 0

Log in to reply