How to update/redraw QChart after data is added to QLineSeries?
问题 I am generating some data that I want to chart using QChart & friends. This is my first time using QChart , and so basically what I did was copy the QLineSeries Example and modify it to my needs. My current code looks like this: quint64 last=0; quint64 *lastp=&last; MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) , ui(new Ui::MainWindow) , series( nullptr ) { ui->setupUi(this); QChart *chart = new QChart(); series=new QLineSeries(chart); chart->legend()->hide(); chart->addSeries