在qml中,使用Row,RowLayout,ColumnLayout等布局组件的时候,需要注意,
ColumnLayout{
id: xxx
anchors.top: zhongwenLayout.bottom
anchors.topMargin: 10
anchors.left: parent.left
anchors.leftMargin: 10
}
topMargin之前必须要先有一个top的对齐设置,否则margin无法生效。
其他类似。