Important: Please read the Qt Code of Conduct -

Model of listview

  • can i assign a model as a return of a method and call it in the mode of the listview
    like this


    and method getmodel return an abstractlistmodel and is public slot

  • yep, I've successfully implemented this with getModel returning a standard ListModel element. I assume you mean


    I don't know if having currentIndex as a the parameter for the getModel method will work the way you want though. What functionality are you looking for?

Log in to reply