vs2015用quickWidget控件添加qml显示不出来东西
默认的item列表实现如下所示:
// "name": "首页", // 名字
// "icon": "qrc:/icons/bank.png", // icon
// "subItem": [] // 子成员, 没有就不需要填
// "hintNumber": -1, // 提示数值,-1表示不显示, ***不需要填*****
// "toIndex" : 跳到哪个页面索引(配合StackLayout或者qt的QStackedWidget使用) // 不能一致 ***如果是伸展的Item,则不需要填*****
/***************** 以下自动计算的,用户无需管 ****************/
// "stretch": false, // 是否伸展,当subItem数组有效时有用, ***不需要填*****
// "tier" : 0, // 层级(层级越多,item越小效果), ***不需要填*****
// "index" :
property var itemsArrays: [
{
name: "首页",
icon: "qrc:/icons/bank.png",
subItem: [
{
name: "子系统配置1",
icon: "qrc:/icons/gears.png",
toIndex: 0,
},
{
name: "子系统配置2",
icon: "qrc:/icons/gears.png",
toIndex: 1,
},
{
name: "子系统配置3",
icon: "qrc:/icons/gears.png",
toIndex: 2,
},
]
},
{
name: "当前消息",
icon: "qrc:/icons/balloon.png",
hintNumber: 1398,
toIndex: 4,
},
{
name: "告警定时",
icon: "qrc:/icons/alarm_clock.png",
hintNumber: 78,
toIndex: 5,
},
{
name: "联网配置",
icon: "qrc:/icons/web.png",
hintNumber: -1,
toIndex: 6,
},
{
name: "系统配置",
icon: "qrc:/icons/gear.png",
toIndex: 7,
},
]
加载出来的列表则是如下所示:
支持无限嵌套、非常方便、
源码已上传至专栏群(第一章底部获取)中,感兴趣的自行下载、
入群需验证订阅用户名,尽量选择"订阅专栏"、"学习会员"会验证失败