@wasawi2 wooops sorry my newby fault!!
I just had to remove the auto in the cpp file.
Therefore:
linewidget.cpp
//![1] m_series = new QLineSeries; //![1]linewidget.h
QLineSeries* m_series = nullptr;Everything under control now.
Thanks again for your fast answer @kkoehne.