小工具知识网

当前位置: 首页 > 行业知识 > qml 怎么将ChartView 的 background 图层的边距设置为 0

行业知识

qml 怎么将ChartView 的 background 图层的边距设置为 0

2026-11-10 18:07:43 来源:互联网转载

��       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.maximumHeight: 42            Layout.preferredHeight: (mainColumn.height-firstRow.height)*1/5            Text {                id: afText                text: qsTr("房颤")                Layout.alignment

上一篇:八码插件开启指南,如何安全合法地掌握正确打开方法,避免违法犯罪风险!

下一篇:Microsoft SQL Server2019占用大量磁盘空间的解决办法(占了我C盘120G的空间!!!)附SQL数据库定时清理代理作业