Rectangle{
width: 400
height: 100
anchors.centerIn: parent
Column{
width:1
height:parent.height
spacing: 5
clip: true
anchors.left: parent.left
Repeater{
anchors.fill: parent
model: parent.height/10
delegate:Rectangle{
width: 1
height: 10
color: "black"
}
}
}
Column{
width:1
height:parent.height
spacing: 5
clip: true
anchors.right: parent.right
Repeater{
anchors.fill: parent
model: parent.height/10
delegate:Rectangle{
width:1
height: 10
color: "black"
}
}
}
Row{
width: parent.width
height: 1
spacing: 5
clip: true
anchors.top: parent.top
Repeater{
anchors.fill: parent
model: parent.width/10
delegate:Rectangle{
width: 10
height: 1
color: "black"
}
}
}
Row{
width: parent.width
height: 1
spacing: 5
clip: true
anchors.bottom: parent.bottom
Repeater{
anchors.fill: parent
model: parent.width/10
delegate:Rectangle{
width: 10
height: 1
color: "black"
}
}
}
}
qml 虚线边框绘制
最新推荐文章于 2024-06-19 19:10:20 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)