It seems I can't find a way to include <QtCharts/QLineSeries>
in my header so Qt knows about the QLineSeries class.
- I added
Qt += charts
to my .pro file. - I added
#include <QtCharts/QLineSeries>
toMainWindow.h
- Then I delete .pro.user file and any builds I've done. And then reopen the .pro file to reconfigure the project in the cleanest way.
- Finally I set the build mode to
Release
, run QMake by right-clicking the project and selecting it and Run it.
I get the message:
...\PlottingCharts\mainwindow.h:14: error: 'QLineSeries' does not name a type
QLineSeries *series;
^
So clearly Qt doesn't know anything about QLineSeries.
For reference, the linechart
and openglseries
examples work correctly.
Any one knows what I'm missing?