5
  1. 联系人.json

    {"GetCategoryResult": [ {"CategoryID":"3","CategoryName":"News","CountryID":"1","Result":"OK"}, {"CategoryID":"4"," CategoryName":"Daily Paper","CountryID":"1","Result":"OK"}, {"CategoryID":"5","CategoryName":"Thanthi","CountryID":"1", "结果":"OK"}, {"CategoryID":"1","CategoryName":"Newspaper","CountryID":"1","Result":"OK"}, {"CategoryID":"2 ","CategoryName":"Magazine","CountryID":"1","Result":"OK"} ] }

  2. main.qml

    标题:ListItemData.GetCategoryResult.CategoryName

请告诉如何在qml中实现这一行--------> title: ListItemData.????

4

1 回答 1

4

ListItemData.GetCategoryResult[i] 将在该 json 中的第 i 个位置给出 u 变体

获得“日报”称号

使用 ListItemData.GetCategoryResult[1].CategoryName

于 2013-09-11T10:46:42.577 回答