qml的ChartView有个background图层,background图层默认是有边距的,而且这个边距是没有属性与方法可以修改的,假如我要创建两个ChartView,让他们纵向紧挨着,实际结果如图:
代码如下:
ColumnLayout {
id: mainColumn
anchors.fill: parent
anchors.leftMargin: 10
spacing: 0
Item {
id:firstRow
Layout.fillWidth: true
Layout.fillHeight: true
Layout.preferredHeight: 10
}
RowLayout{
id:afRow
Layout.margins: 0
Layout.fillWidth: true
Layout.fillHeight: true
Layout.maximumHei