Accessing the Nested Data in ListModel or alternatives
-
i am creating a nested dropdown in qml. and for this data is like this
property var countries: [
{
name: "abc",
utc: {
shortname: "a",
utc: "5.30"
}
},
{
name: "pqr",
utc: [
{
shortname: "b",
utc: "+10:00"
},
{
shortname: "c",
utc: "+11:00"
},
{
shortname: "d",
utc: "+5:00"
}
]
}
]now i want to access this data in dropdown which approach i can take?
I tried ListModel for this but ListElement will not take the nested data -
i am creating a nested dropdown in qml. and for this data is like this
property var countries: [
{
name: "abc",
utc: {
shortname: "a",
utc: "5.30"
}
},
{
name: "pqr",
utc: [
{
shortname: "b",
utc: "+10:00"
},
{
shortname: "c",
utc: "+11:00"
},
{
shortname: "d",
utc: "+5:00"
}
]
}
]now i want to access this data in dropdown which approach i can take?
I tried ListModel for this but ListElement will not take the nested data@Shubham_Senpai
Please edit your post and use the code tags to format the code you post.
Makes it much easier to read and reply :-)