QtQuick.Controls 2.0:Frame Pane GroupBox
2016-06-19 21:28
645 查看
Frame Pane GroupBox建议被一层布局包裹,可以不设置width和height,他们的大小会自动适应子元素,contentHeight/contentWidth:当前内容的宽高度->不包含标题(GroupBox带标题)和边距。
总结:Frame和Pane类似,但是Frame多了边框。装上同样子元素.他们的高度和宽度相同具体看图。
SwipeView { id: swipeView anchors.fill: parent currentIndex: tabBar.currentIndex Page{ Column{ Button{ text:"Button" } Frame{ Grid{ Repeater{ model: 20 delegate: Button{ text:"Frame:"+parent.parent.parent.contentHeight+ ","+parent.parent.parent.height } } } background: Rectangle { color: "transparent" border.color: "#21be2b" radius: 2 } } Pane{ Grid{ Repeater{ model: 20 delegate: Button{ text:"Pane:"+parent.parent.parent.contentHeight+ ","+parent.parent.parent.height } } } } GroupBox{ title: "hello" Grid{ Repeater{ model: 20 delegate: Button{ text:"GroupBox:"+parent.parent.parent.contentHeight+ ","+parent.parent.parent.height } } } background: Rectangle { color: "transparent" border.color: "#21be2b" radius: 2 } } } } }
相关文章推荐
- Android Action Bar【高级UI学习】
- QtQuick动态创建组件
- 认识UITextField
- juicer模板引擎使用
- 面向HBase的内存key-value缓存的实现
- MarQueeView垂直滚动广告
- 187. Repeated DNA Sequences
- ImportError: No module named 'requests'
- UI控件之编辑文本控件EditText
- 在Bluemix 使用OpenWhisk and AlchemyAPI 开发人脸辨识应用系统
- UITableView section header 不固定
- mybatis_user_guide(3)XML配置
- UITableviewcell的性能问题
- 解决HttpServletRequest中文乱码的问题
- iOS实战-头像更新上传之后,UI不刷新
- 实用工具网站(经纬度、短链接、图片格式转换、长微博、图片压缩、uuid、繁体字)
- iOS开发 - 第02篇 - UI进阶 - 15 - 彩票(第二天)
- proBuilder编辑的模型变黑
- UITableView 关于cell与cell之间的间距
- Arduino、bootloader、BadUSB、及其相关硬件知识入门学习