QtQuick.Controls2.0 Header、Footer:Tabbar
来源:互联网 发布:金山软件有哪些 编辑:程序博客网 时间:2024/05/16 17:20
TabBar+header and footer 是Qt5.7的新组建,5.7提供了大量实用美观的组件Material和Universal 风格已经正式发布,在5.6中是试验版本。ApplicationWindow中提供了导航,类似于网页设计中的页头和页脚,Qtquick中 叫做 header和footer,这两个定义了固定在页面顶部的元素和底部的元素。currentIndex属性:当前Tabbar所选中的项,Tabbar中一般用新元素:TabButton来定义显示的按钮
写一段简单的代码,顶部导航和底部导航的curindex同步
import QtQuick 2.7import QtQuick.Controls 2.0import QtQuick.Layouts 1.0import QtQuick.Layouts 1.1import QtQuick.Window 2.0import QtQuick.Controls.Styles 1.4import QtQuick.Controls.Material 2.0import QtQuick.Controls.Universal 2.0ApplicationWindow { id:root visible: true; height: 480; width: 320; header: TabBar { id: headertabBar; currentIndex:footertabBar.currentIndex TabButton { text: qsTr("header Tab1"); } TabButton { text: qsTr("header Tab2") } TabButton { text: qsTr("header Tab3") } } footer: TabBar { id: footertabBar currentIndex: headertabBar.currentIndex TabButton { text: qsTr("footer Tab1"); } TabButton { text: qsTr("footer Tab2") } TabButton { text: qsTr("footer Tab3") } }}
0 0
- QtQuick.Controls2.0 Header、Footer:Tabbar
- Header Footer
- Freezed header & footer table
- UICollectionView Header footer
- 20header和footer
- <header/><main/><footer>
- Table Header and Footer View
- ReccylerView添加header和footer
- RecyclerView添加Header和Footer
- RecycleView添加header和footer
- RecyclerView 添加 Footer and Header
- RecyclerView添加Header和Footer
- RecyclerView添加Header和Footer
- RecyclerView添加header和footer
- RecyclerView添加header和footer
- tableview header footer 取消悬浮
- RecyclerView 添加 Header 和 Footer
- RecyclerView 添加header footer------(2)
- 9-CSS继承,层叠,特殊性
- 斐波那契堆
- 《HTML5移动web开发指南》——笔记3(本地存储)
- poj1321——棋盘问题(DFS)
- 如何让Mysql支持emoji(表情)
- QtQuick.Controls2.0 Header、Footer:Tabbar
- redis 五种数据类型的使用场景
- iOS App 调用QQ客户端,发起临时会话
- 前端开发代码块收集整理
- eclipse 创建maven项目时 报错 Unable to create project from archetype [org.apache.maven.archetypes:ma
- 没啥事,就发两张图
- Hibernate的级联查询和添加的分析
- 使用antd创建一个3级联动菜单栏
- 20个正则表达式