上一篇认识了PySide,为了快速开发我们第一个测试小项目,今天主要编写窗体,里面的数据实现后面再说。
测试小项目的效果图参考第一篇文章。
首先分析一下项目需求,我们需要从一个json文件中读取数据,然后按层级关系显示在窗体中。
{
"$schema": "http://json-schema.org/draft-04/schema",
"label": "FFM",
"type": "menu",
"description": "XXX",
"items": [
{
"label": "File",
"type": "menu",
"description": "",
"items" : [
{
"label": "Export",
"type": "command",
"description": "",
"file": "ffm_export.py",
"command": "main.show()"
},
{
"label": "Impo