I am trying to use QCustomPlot's example of the following folder, in my program:

/examples/plots

and at the same time I want it accessible from QML. So, I added <QQuickItem> and it resulted in the error stated in the title.

The code:

Qt Code:
  1. #include <QQuickItem>
  2. #include <QMainWindow>
  3. #include <QTimer>
  4. #include "../../qcustomplot.h"
  5.  
  6. namespace Ui {
  7. class MainWindow;
  8. }
  9.  
  10. class MainWindow : public QQuickItem, public QMainWindow
  11. {
  12. Q_OBJECT
To copy to clipboard, switch view to plain text mode 

What should I do to make it accessible from QML and solve the error too?