##// END OF EJS Templates
Fixes chart presenter crash on exit
Michal Klocek -
r981:dc6e36e81b8a
parent child
Show More
@@ -33,18 +33,18 m_index(-1),m_chart(chart)
33 33 m_timer.setInterval(3000);
34 34
35 35 //![1]
36 QLineSeries* series0 = new QLineSeries(this);
36 QLineSeries* series0 = new QLineSeries();
37 37 QPen blue(Qt::blue);
38 38 blue.setWidth(3);
39 39 series0->setPen(blue);
40 40
41 QScatterSeries* series1 = new QScatterSeries(this);
41 QScatterSeries* series1 = new QScatterSeries();
42 42 QPen red(Qt::red);
43 43 red.setWidth(3);
44 44 series1->setPen(red);
45 45 series1->setBrush(Qt::white);
46 46
47 QSplineSeries* series2 = new QSplineSeries(this);
47 QSplineSeries* series2 = new QSplineSeries();
48 48 QPen green(Qt::green);
49 49 green.setWidth(3);
50 50 series2->setPen(green);
@@ -91,6 +91,7 ChartView::~ChartView()
91 91 {
92 92 if(m_series.size()==0) return;
93 93 m_chart->removeSeries(m_series.at(m_index));
94 m_series.removeLast(); //remove QAreaSeries instance since they will be deleted when QLineSeries instance is gone
94 95 qDeleteAll(m_series);
95 96 }
96 97
General Comments 0
You need to be logged in to leave comments. Login now