第一步:在pro里面,添加QT += core gui charts
第二步:
#include <qchar.h>
#include <qchart.h>
#include “qpieseries.h”
//#include “qchartview.h”
#include
#include
//using namespace QtCharts;
using namespace QtCharts;
这些都是必须的。
第三步:直接调用QChart才不会报错
QChart的用法
最新推荐文章于 2024-06-05 22:31:15 发布