搞了一下午,把第三方库qwt添加到qt上了,我的开发环境是VS2010+QT5
这是参考网友的博客弄出来的。
#ifndef PARKSTATISTIC_H
#define PARKSTATISTIC_H
#include <QVector>
#include <qwt_plot.h>
#include <qwt_plot_curve.h>
#include <qwt_plot_magnifier.h>
#include <qwt_plot_panner.h>
#include <qwt_legend.h>
#include <qwt_point_data.h>
#include <QtWidgets/QMainWindow>
#include "ui_Parkstatistic.h"
class ParkStatistic : public QMainWindow
{
Q_OBJECT
public:
ParkStatistic(QWidget *parent = 0);
~ParkStatistic();
public slots:
void CHC_DoReviceActionSignal(QAction *action);
void on_pushButton_clicked();
pri

本文介绍了如何在QT环境中利用Qwt库绘制折线图。通过添加Qwt库,设置坐标轴标题、范围,以及添加平移和缩放功能,创建了平滑的折线图。代码中展示了如何动态更新曲线数据,为后续实现统计图功能打下基础。
最低0.47元/天 解锁文章
442

被折叠的 条评论
为什么被折叠?



