当ChartView的绘图量很大时,改变其窗口大小时,意味着会频繁刷新绘制,可能会卡顿,下面是解决方案:
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtCharts 2.15
ChartView {
id: root
antialiasing: false
legend.visible: false
margins.left: 0
margins.right: 0
margins.bottom: 0
margins.top: 0
backgroundColor: "#00000000"
plotAreaColor: "#00000000"
// backgroundColor: "#9000ff00"
// plotAreaColor: "#80ff0000"
backgroundRoundness: 0
dropShadowEnabled: false
//theme: ChartView.ChartThemeHighContrast
property bool windowResizing: false
property var timer: null
signal sigUpdatePlotAreaRect()
onWidthChanged: handleWindowSizeChanged()
onHeightCha