The model data in the model data



  • hello
    i have ListView control with some model. it is list of peoples. each people have number of mobile phones. so each item in list of peoples control must show 1...n items of mobile phones, color of phone, model of phone and image of phone. i need fill all data via C++
    how i can do it by qml and c++?..


  • Moderators

    Hi,

    You probably want a tree model, not a list model. Let your top-level model have 1 column, and m rows for m people. Let each top-level item contain a child model with n rows for n phones. The child model should have 4 columns, one for each property of the phone (name, colour, model, image).


Log in to reply
 

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