#ifndef BELTSPEEDLINEWIDGET_H #define BELTSPEEDLINEWIDGET_H #include #include #include QT_CHARTS_USE_NAMESPACE class BeltSpeedLineWidget : public QWidget { Q_OBJECT public: explicit BeltSpeedLineWidget(QWidget* parent = nullptr); public slots: private: void initLineChart(); private: QChartView* m_chartView; // 图表视图 QChart* m_chart; // 图表 QLineSeries* m_series; // 数据系列 }; #endif // BELTSPEEDLINEWIDGET_H