Hi, thank you for your answer anda_skoa
So I did what you write. But when I adding
Qt Code:
  1. #include <QtCharts>
  2. using namespace QtCharts;
To copy to clipboard, switch view to plain text mode 
to mainwindow.cpp I have an error C1083: cannot open include file 'QtCharts': No such file or directory and in General Messages Project ERROR: Unknown module(s) in QT: charts and it points to line where is #include <QtCharts>
So I need some more files to my project? I don't get it...

To be clear I will add the code, maybe I am doing something wrong what is obvious?

Here I am adding point(3) the QT += charts
Qt Code:
  1. QT += core gui charts
  2.  
  3. greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
  4.  
  5. TARGET = PieChartTest
  6. TEMPLATE = app
  7.  
  8.  
  9. SOURCES += main.cpp\
  10. mainwindow.cpp
  11.  
  12. HEADERS += mainwindow.h
  13.  
  14. FORMS += mainwindow.ui
To copy to clipboard, switch view to plain text mode 

Here is mainwindow.cpp where is an error with #include <QtCharts>

Qt Code:
  1. #include "mainwindow.h"
  2. #include "ui_mainwindow.h"
  3.  
  4. #include <QtCharts> //error C1083 here
  5. using namespace QtCharts;
  6.  
  7. MainWindow::MainWindow(QWidget *parent) :
  8. QMainWindow(parent),
  9. ui(new Ui::MainWindow)
  10. {
  11. ui->setupUi(this);
  12. }
  13.  
  14. MainWindow::~MainWindow()
  15. {
  16. delete ui;
  17. }
To copy to clipboard, switch view to plain text mode 

It seems that I don't have a library connected with QtCharts. Should I download something additional?
EDIT: I use Open Source Licence for students if it is important