您的位置:首页 > 产品设计 > UI/UE

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
}
}

}

}

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: