From 6772dd97cfaa683595fe56738699766158758690 2012-04-03 07:36:02 From: Jani Honkonen Date: 2012-04-03 07:36:02 Subject: [PATCH] Make splinechart compile --- diff --git a/examples/examples.pro b/examples/examples.pro index d377a04..e49f7b2 100644 --- a/examples/examples.pro +++ b/examples/examples.pro @@ -14,7 +14,7 @@ SUBDIRS += \ #presenterchart \ scatterchart \ scatterinteractions \ - #splinechart \ + splinechart \ stackedbarchart \ stackedbarchartdrilldown \ #tablemodelchart \ diff --git a/examples/splinechart/splinewidget.cpp b/examples/splinechart/splinewidget.cpp index b79f279..807abf1 100644 --- a/examples/splinechart/splinewidget.cpp +++ b/examples/splinechart/splinewidget.cpp @@ -76,12 +76,12 @@ SplineWidget::SplineWidget(QWidget *parent) //! [3] // create chart view - QChartView* chart = new QChartView; + QChart* chart = new QChart; chart->addSeries(series); chart->addSeries(series2); chart->addSeries(series3); - chart->setChartTitle("Spline chart example"); + chart->setTitle("Spline chart example"); chart->axisX()->setMax(1500); chart->axisY()->setMax(500); @@ -106,7 +106,8 @@ SplineWidget::SplineWidget(QWidget *parent) buttonsLayout->addStretch(); QGridLayout* mainLayout = new QGridLayout; - mainLayout->addWidget(chart, 1, 0); + QChartView *chartView = new QChartView(chart); + mainLayout->addWidget(chartView, 1, 0); mainLayout->addLayout(buttonsLayout, 1, 1); setLayout(mainLayout); //! [5]