先佔個位置
1.前言
之前我使用PC上的Qt實現了
2.數據接口的獲取
騰訊接口:
https://view.inews.qq.com/g2/getOnsInfo?name=disease_h5
https://view.inews.qq.com/g2/getOnsInfo?name=disease_other
{
"ret": 0,
"data": {
"lastUpdateTime": "2020-03-04 11:12:04",
"chinaTotal": {
"confirm": 80422,
"heal": 49914,
"dead": 2984,
"nowConfirm": 27524,
"suspect": 520,
"nowSevere": 6416
},
"chinaAdd": {
"confirm": 120,
"heal": 2654,
"dead": 38,
"nowConfirm": -2572,
"suspect": -67,
"nowSevere": -390
},
...........其他數據.............
"isShowAdd": true
}
}
簡單的接口:
https://ncov-api.werty.cn:2021/latest/tx/
由於iMX287A配套的屏幕比較小,只有4.3寸,分辨率400*320,顯示不了太多的信息,所以我們只顯示數據信息:
所以我們選比較簡單的接口,數據量也比較少,不會佔用太多的存儲空間:
3.Qt界面的實現
Qt 4,沒有QJSON功能,只能使用JSON解析庫,這裏選擇cJSON庫。
PC界面的運行效果
適配開發板4.3寸顯示屏
去掉標題欄,充滿整個屏幕
4.在
5.在開發板上運行Qt程序
5.1 可執行文件傳輸到開發板
5.2 開發板聯網