QLineunitVector New line does not have unit length 的解决

尝试用QChart的 setAnimationOptions(QChart::SeriesAnimations)出现了一个小问题,无论如何没有动画出现,查看QtCreator自己的输出发现。

原来好好的静态图突然出现了 QLineunitVector New line does not have unit length 的报错。

经过一番排除发现问题所在。

ui->graphicsView->chart()->addSeries(series);
series->append(Point);

虽然在静态图时没问题,但是设置动画之后就报前面提到错误

要调整为

series->append(Point);
ui->graphicsView->chart()->addSeries(series);

动画顺利出现。

你可能感兴趣的:(QLineunitVector New line does not have unit length 的解决)