Qml底部导航
来源:互联网 发布:java graphics 方法 编辑:程序博客网 时间:2024/05/19 23:59
footer加上TabBar即可实现底部导航
footer: TabBar { id: bar height: 48 width: parent.width currentIndex: 0 ListModel { id: myModel ListElement { modelText: "消息"; modelSrc: "qrc:/Chat_MsgRecord.svg"; modelSrcG: "qrc:/Chat_MsgRecordG.svg";} ListElement { modelText: "联系人"; modelSrc: "qrc:/Chat_FriendManager.svg"; modelSrcG: "qrc:/Chat_FriendManagerG.svg";} ListElement { modelText: "发现"; modelSrc: "qrc:/Mobile_Find.svg"; modelSrcG: "qrc:/Mobile_FindG.svg";} ListElement { modelText: "我"; modelSrc: "qrc:/Main_P2PChat.svg"; modelSrcG: "qrc:/Main_P2PChatG.svg";} } Repeater { model: myModel TabButton { height: bar.height contentItem:Text{ text: modelText horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignBottom color: (model.index === bar.currentIndex) ? "#148014" : "#000000" } background:Image{ width: 24 height: 24 anchors.horizontalCenter: parent.horizontalCenter source: (model.index === bar.currentIndex) ? modelSrcG : modelSrc } } } }
需要完整代码请访问QtQuickExamples
阅读全文
0 0
- Qml底部导航
- 底部导航
- android底部导航栏
- Android 通用底部导航
- android底部导航栏
- Fragment实现底部导航
- android之底部导航
- android 底部导航总结
- TabHost底部导航
- 底部导航栏封装
- 底部导航栏实现
- Android底部导航栏
- 底部导航栏FragmentTabHost
- andorid底部菜单导航
- 底部导航demo
- RadioGroup实现底部导航
- 仿微信底部导航
- Fragment底部导航
- js 文件上传插件(支持上传进度信息)
- tp中订单详情中ajax更换收货地址。
- java抽象类与接口的区别
- Centos pip install mysqlclient Error
- 避免使用不必要的float(display:inline,position:relative)
- Qml底部导航
- day2-上 初识接口测试
- Android基础面试题
- 面试题集锦(持续更新)
- [剑指offer]面试题56:链表中环的入口结点
- 看图说话之二叉排序树
- ch01 OpenCV图像坐标系
- stratum协议原理
- ld: library not found for -lXXXXX 的解决方法