##// END OF EJS Templates
fixed crash in legend example
sauimone -
r1396:e5d6ed20234d
parent child
Show More
@@ -54,7 +54,6 MainWidget::MainWidget(QWidget *parent) :
54 m_chart = new QChart();
54 m_chart = new QChart();
55 m_chartView = new QChartView(m_chart, this);
55 m_chartView = new QChartView(m_chart, this);
56 m_chartView->setRubberBand(QChartView::HorizonalRubberBand);
56 m_chartView->setRubberBand(QChartView::HorizonalRubberBand);
57 m_chart->setAnimationOptions(QChart::SeriesAnimations);
58 //![1]
57 //![1]
59
58
60 // Create custom scene and view, where detached legend will be drawn
59 // Create custom scene and view, where detached legend will be drawn
@@ -143,9 +142,8 void MainWidget::addBarset()
143
142
144 void MainWidget::removeBarset()
143 void MainWidget::removeBarset()
145 {
144 {
146 m_series->clear();
145 QList<QBarSet*> sets = m_series->barSets();
147 // QList<QBarSet*> sets = m_series->barSets();
146 if (sets.count() > 0) {
148 // if (sets.count() > 0) {
147 m_series->remove(sets.at(sets.count()-1));
149 // m_series->remove(sets.at(sets.count()-1));
148 }
150 // }
151 }
149 }
General Comments 0
You need to be logged in to leave comments. Login now