Hi, thank you for your answer anda_skoa
So I did what you write. But when I adding
#include <QtCharts>
using namespace QtCharts;
#include <QtCharts>
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 += core gui charts
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = PieChartTest
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
QT += core gui charts
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = PieChartTest
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
To copy to clipboard, switch view to plain text mode
Here is mainwindow.cpp where is an error with #include <QtCharts>
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QtCharts> //error C1083 here
using namespace QtCharts;
MainWindow
::MainWindow(QWidget *parent
) : ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
MainWindow::~MainWindow()
{
delete ui;
}
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QtCharts> //error C1083 here
using namespace QtCharts;
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
}
MainWindow::~MainWindow()
{
delete ui;
}
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
Bookmarks