Access item in ListView's delegate

  • I have a signal and ListView:

       signal userEdited(User user)
        ListView {
            delegate: userListDelegate
            model: userList

    and then the delegate component which contains button:

    Component {
          id: userListDelegate
            onClicked: {
                // here I want to emit signal with a user which is represented by the delegate
                //emit buttonClicked()

    On button click, I want to emit the signal, however I don't know how to access the whole user object of the delegate and pass it as the signal's parameter.

Log in to reply

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