21,480
社区成员
发帖
与我相关
我的任务
分享
QChartView *chartView=new QChartView(this); //创建 ChartView
QChart *chart = new QChart(); //创建 Chart
chartView->setChart(chart); //Chart添加到ChartView
this->setCentralWidget(chartView);//QWidget里面没有找到类似的函数。


qchart->resize(600,400);
// 调整尺寸
int w = this->width();
int h = this->height();
this->chart()->setGeometry(0, 0, w, h);


