//方法1
QJsonObject::Iterator iteratorJson;
iteratorJson=itemObj.begin();
while (iteratorJson!=itemObj.end())
{
qDebug()<<iteratorJson.key()<<"####"<<iteratorJson.value().toString();
iteratorJson++;
}
//方法2
for (int j=0;j<itemObj.keys().count();j++)
{ key=itemObj.keys().at(j);
qDebug()<<i<<"#"<<j<<item->text();
}
Qt读取JsonObject中Key及对应列表方法
最新推荐文章于 2023-07-07 01:27:09 发布