How to get ListModel elements in C++
-
@ListModel{
objectName: "list"
ListElement{
name: "first"
}
ListElement{
name: "second"
}
}
@How can i get it's elements in c++?
I tried to get model by it's name
@ QObject list = object->findChild<QObject>("list"); @
But i do not know what to do next. -
you can access to all its children : list->children()