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

    listview
    {
    mode:getModel(currnetindex);
    }

    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

    @listview
    {
    model:getModel(currnetindex);
    }@

    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
 

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