Unsolved QChartView inherits
-
Hi,
I have a problem. I try to make a class that will be a QWidget and will inherit from QChartView. But I gets error during compilation:
chartview.h:8: error: expected class-name before ‘{’ token
#ifndef CHARTVIEW_H #define CHARTVIEW_H #include <QChartView> class ChartView : public QChartView { Q_OBJECT public: explicit ChartView(QWidget *parent = nullptr); }; #endif // CHARTVIEW_H
-
Hi
Do you have QT += charts
in the .pro file ?(remember to clean all, rebuild all if you add it )