qt QCharts 设置背景,背景透明
class Chartwidget : public QChartView void Chartwidget::setBackground() { m_chart->setBackgroundVisible(false); //去背景 QColor color(255,255,255,0); QPalette pal(palette()); pal.setColor(QPalette::Window, color); setAutoFillBackground(true); QPen pen(color); this->setPalette(pal); }